What Are Data Packets?

When most people talk about computers, networking, and the internet, the general term “data” is used to refer to the information being transmitted and received. But data is just a simple term that means “information” and doesn’t provide any useful information about exactly how that information is being formatted, transmitted, received, and understood. Therefore, in computer terms, a more accurate way to describe the way that information is being sent around the world on the internet is in the form of a data packet (sometimes known as a “network packet” or a “datagram”).

Just like it sounds, a data packet is a small, fixed-size “packet” (package, block, or message) containing data in a specified format. When you send something like an email across the internet, it is broken down into data packets, and each packet is addressed, sent, routed, and received independently. In fact, the very definition of the internet is “a network of computers that use protocols and data packets to exchange information.”

Perhaps the easiest way to think of a data packet is like an old-fashioned letter with an envelope that is sent through the postal system. The information in the letter is the data that you want to send (called the “payload”), but there is additional information on the outside of the envelope called the “header.” The address information on the outside of “envelope” (the header) helps tell all the routers and switches along the way (the “postal system”) where to deliver the information (the payload) and who sent it.

Note: It’s possible to encrypt data in the payload, but the address and other information in the header must be in plaintext according to the rules of the protocol being used. Therefore, it is impossible to completely disguise the sender and recipient of data packets on a network.

There are several different protocols for data packets, but one of the most common is the IPv6 protocol. For data packets sent with this protocol, the header will contain the following information:

  • The IP address of the sender (128 bits in size).
  • The IP address of the destination (128 bits in size).
  • The protocol in which the packet is formatted (four bits in size).
  • The traffic class (priority) of the packet (eight bits in size).
  • Flow label (if part of multiple transmissions – 20 bits in size).
  • Payload size (16 bits in size).
  • Information about reassembly (if applicable – eight bits in size).
  • Hop limit – Maximum number of router/switch hops (TTL) before the packet “dies” (eight bits in size).

Note: The destination address part of the header also includes so-called ICMP (internet control message protocol) messages. Therefore, commands like “ping” are contained in the destination address section of the packet’s header.

All packets, regardless of type, will have the following:

  • Sender’s address and address of the destination.
  • The protocol used to format the packet (either TCP or UDP).
  • How to reassemble the packet with other, related packets into one file.
  • The payload (the information you want to send).
  • Error checking information to verify that the packet was received intact.
  • A trailer to tell computers that they’ve come to the end of the packet.

The error checking information is normally expressed in something called a Cyclic Redundancy Checksum (CRC). It’s something like the (numeric) answer to a math question. If all the numeric data inside the packet (a count of all the “1’s” (in binary form, all data is expressed in 0’s and 1’s) in the file) add up to the answer (CRC number), then the computer will know that the data was received intact.

The maximum size of a single IP (Internet Protocol) packet’s payload is 64 kilobytes, but the maximum size of a packet on an Ethernet network is just 1.5 kb. And point-to-point (P2P) uses packets that are eight bits in size. Any file larger than these maximum limits are divided up into smaller parts and placed into multiple data packets to be transmitted sequentially.

Note: Because of the way the internet works, not all packets belonging to a single file will take the same route to their destination. Packets are semi-autonomous and can seek out a new, more efficient path if there is congestion, blockage, or a slowdown somewhere in the network. This freedom to always find a more efficient route is one of the key reasons why the internet is so fast and powerful. It’s also why the internet is called a “packet-switched” network because each switch (or node, router, gateway, et cetera) handled data on a packet-by-packet basis.

Because each packet is semi-autonomous, the receiver can detect if one packet has failed to to make it to its destination and can ask the sender to re-send it. Packets that are not received for whatever reason are called “dropped” packets. For example, if you’ve ever streamed a video online and seen the picture become jagged or freeze for a moment, that is the result of dropped packets.

Fun fact: Packets can sometimes crash/collide into one another and thus “die”. Fortunately, the small size of a data packet means it’s really easy for the transmitter to recreate and send another copy.

Most modern browsers can process up to eight data packets simultaneously. This helps speed up the process of “loading” a website. And the more packets that that can be processed simultaneously, the faster information is received, meaning you’ll download a song more quickly or be able to successfully stream a higher-quality video file.

A “mangled” packet, sometimes called an invalid packet, is a packet that’s missing critical information in its header or trailer. Most of the time, this is a result of an mistake, but one way to execute a DDoS (distributed denial of service) attack is to deliberately send invalid packets in order to disable or bypass firewalls, routers, and other security measures. Mangled packets are also sometimes sent by malefactors to reveal weaknesses in the network by noting which services are forced to restart or reboot after becoming disabled by mangled packets.

The term data packet was invented in 1965 by Donald Davies, one of the inventors of packet-switched computer networks. He deliberately chose the word “packet” after consulting with a language expert because he wanted a word that would be easy to translate into other languages. The term “packet” itself comes from Dutch ships that were called “packet boats” because they transported bundles (packs) of mail.