What is a packet?

Updated: May 18, 2019

I recently re-watched the HBO series "Silicone Valley" and one of my favorite quotes from the whole show stuck out to me. For those of you who have not watched the show, this quote comes from one of the main characters when asked about what he does/brings to the table for the team.

"What do I do? System Architecture. Networking and Security. No one in this house can touch me on that. But does anyone appreciate that? While you were busy minoring in gender studies and singing acapella at Sarah Lawrence, I was getting root access to NSA servers. I was a click away from starting a second Iranian revolution. I prevent cross site scripting, I monitor for DDoS attacks, emergency database rollbacks, and faulty transaction handlings. The internet, heard of it? Transfers half a petabyte of data a minute, do you have any idea how that happens? All of those YouPorn ones and zeros streaming directly to your shitty little smart phone day after day. Every dipshit who shits his pants if he can't get the new dubstep Skrillex remix in under 12 seconds. It's not magic, it's talent and sweat. People like me ensuring your packets get delivered unsniffed. So what do I do? I make sure that one bad config on one key component doesn't bankrupt the entire fucking company. That's what the fuck I do."

You can view the clip here

This gets me every time... I can't help but pause the show and laugh audibly for an extended period of time.

So... what is a packet? In layman's terms, it is a box that we use to ship information, complete with the sender's information and receiver's information - but packets are really so much more. Let's consider an email being sent and received.

The e-mail is broken into smaller parts. These are the packets. Each packet carries the information that will help it get to its destination -- the sender's IP address, the intended receiver's IP address, something that tells the network how many packets this e-mail message has been broken into and the number of this particular packet. The packets carry the data using Transmission Control Protocol/Internet Protocol (TCP/IP). Each packet contains part of the body of your message. A typical packet contains perhaps 1,000 or 1,500 bytes. Once received on the other end, the packets are reassembled to form the entire email message.

Most network packets are split into three parts:

Header - The header contains instructions about the data carried by the packet. These instructions may include:

  • Length of packet (some networks have fixed-length packets, while others rely on the header to contain this information)

  • Synchronization (a few bits that help the packet match up to the network)