Strings of binary code forming boxes and lines in space.
carlos castilla/

Like anything else, computer data is easiest to move when it’s divided into smaller portions. In networking, these portions are referred to as “data packets” or simply “packets.” Here’s what you need to know about them.

Network Portion Control

Suppose you need to share an image with a friend over the internet. However, it doesn’t go to your friend’s device in one piece. Instead, the image is divided into data packets, and each packet has a small portion of that image. These packets travel from your device over the internet and are then reassembled to form the original picture once they reach your friend’s device.

To ensure that all packets reach their destination successfully, they don’t just include the data but are also accompanied by metadata. This information can vary depending on the network protocol. For example, a typical data packet on the internet consists of a header and payload.

While the payload has the actual data, the header includes information about the packet, such as source IP address, destination IP address, flow label, the ID of the next packet’s header, hop limit, and more. This information reveals which part of the larger file the packet represents, its destination, and how to reassemble the file, among other things.

Some protocols may also add a trailer to a data packet. This trailer, also referred to as a footer, has information about the handling of the packet, an error checking protocol, or it just marks the packet’s end.

Why Data Packets Are Important

There are several benefits to dividing data into packets while sending it over a network. For example, the smaller size of packets allows the network to utilize its bandwidth effectively. The packets can take the best route to their destination. And if for some reason they encounter congestion or an outage, the network can reroute the packets through the path of least resistance.

Using packets is also helpful when some information is lost during transmission. For example, if one whole file were transmitted all at once and it got lost, then the entire thing would need to be sent again. But in the case of packets, if some are lost, the destination can request the lost packets, and it won’t need the complete file, conserving valuable bandwidth.

In addition, if a computer were sending the whole file instead of splitting it over a network, no other computer in the same network would be able to send data at that point. Other computers would have to wait until the ongoing transfer completes. And this approach, if applied to an extensive network like the internet, could create a massive data traffic jam.

Packet Switching: Efficient Route Planning

The globe with internet connection overlaid

Packet switching refers to a network’s ability to process data packets independently of other packets. This allows different packets of the same data to take separate routes and still reach their destination.

Thanks to packet switching, data packets from different devices and connections can travel over the same network simultaneously and still reach their destination without any issues. This is possible because each data packet has all the relevant metadata that the routers or switches in a network need to guide it to its destination.

The most common network that utilizes this approach is the internet itself, and billions of devices each day communicate with each other and share data without getting bogged down at every corner.

Packet Filtering: Taking Out the Trash

While data packets are building blocks of networks, not every packet is good or useful. That’s why packet filtering exists. It allows filtering unwanted or malicious packets at a network interface based on metadata, ports, or protocols.

Firewalls often use packet filters to protect a network from intrusion, attacks, and other malicious things. The packet filter examines the metadata of each data packet, and depending on the set rules, it allows or prevents the packet from passing.

RELATED: What Does a Firewall Actually Do?

Packet Inspection: Network Sleuthing

Wireshark can be used for packet inspecting.

Packet inspection is the process of analyzing the data packets being sent over a network in detail. It is used to debug network problems, ensure the data is in the correct order, examine security issues, eavesdrop, and more.

Network administrators use analyzer tools like Wireshark to inspect packets. These tools utilize many ways, including built-in APIs, port mirroring, and network taps, to acquire packets from the network for inspection.

Once acquired, the data packets can be studied in detail for any abnormalities or to identify what is being transferred. A network administrator can block, reroute, classify, or log data packets based on the packet inspection.

It can also be used as a part of firewall defense to make real-time decisions based on what’s in a packet and preset rules. Compared to regular packet filtering, packet inspection goes into much more detail.

Profile Photo for Gaurav Shukla Gaurav Shukla
Gaurav Shukla is a technology journalist with over a decade’s experience reporting and writing about consumer technology. His work has appeared in Android Police, XDA Developers, and NDTV Gadgets 360.
Read Full Bio »