Data Packets: The Building Blocks of Networks

Data packets are the building blocks of the network

Cars on the street like data packets traveling a fiber optic cable.

Xiao Lng Fng / EyeEm / Getty Images

A packet is a basic unit of communication over a digital network. A packet is also called a datagram, a segment, a block, a cell, or a frame, depending on the protocol used for data transmission. When data is transmitted, it is broken into similar structures of data before transmission, called packets. The packets are reassembled to the original data chunk once they reach the destination.

Structure of a Data Packet

The structure of a packet depends on the type of packet it is and on the protocol. A packet has a header and a payload. The header keeps overhead information about the packet, the service, and other transmission-related data. For example, data transfer over the internet requires breaking down the data into IP packets, which is defined in IP (internet protocol).

An IP packet includes:

  • The source IP address. The IP address of the machine sending the data. 
  • The destination IP address. The machine or device to which the data is sent.
  • The sequence number of the packets. A number that puts the packets in order such that they are reassembled in a way to get the original data back exactly as it was prior to transmission. 
  • The type of service.
  • Flags.
  • Other technical data.
  • The payload. This is the bulk of the packet (the above is considered overhead) and is the data being carried.

Packets and Protocols

Packets vary in structure and functionality depending on the protocols that implement the packets. VoIP uses the IP protocol and IP packets. On an Ethernet network, for example, data is transmitted in Ethernet frames.

In the IP protocol, the IP packets travel over the internet through nodes, which are devices and routers (technically called nodes in this context) found on the way from the source to the destination. Each packet is routed toward the destination based on its source and destination address. At each node, the router decides, based on calculations involving network statistics and costs, to which neighboring node it is more efficient to send the packet.

This is part of packet switching which flushes the packets on the internet, and each packet finds its own way to the destination. This mechanism uses the underlying structure of the internet for free, which is the main reason VoIP and internet calls are free or inexpensive.

Contrary to traditional telephony where a line or circuit between the source and destination has to be dedicated and reserved (called circuit switching), hence the heavy cost. Packet switching exploits existing networks for free.

Another example is the TCP (Transmission Control Protocol), which works with IP in a TCP/IP suite. TCP is responsible for ensuring that data transfer is reliable. To achieve that, it checks whether the packets arrived in order, whether any packets are missing or have been duplicated, and whether there is any delay in packet transmission. It controls this by setting a timeout and signals called acknowledgments.

Bottom Line 

Data travels in packets over digital networks and all of the data, whether it's text, audio, images, or video, come broken down into packets that are reassembled in devices or computers. This is why, for instance, when a picture loads over a slow connection, chunks of it appear one after the other.