Data Packets

Data Packets

Click “send” on a file or email or message, and you might picture it being sent like a letter to its destination. In reality, your file is torn up into small sections and reassembled at the end!

When information is sent over computer networks, specifically the internet, files are not sent in their entirety. They are sent using a system called “packet switching” that is designed to be fast, efficient, and reliable. In fact, the system was designed to enable the network to work even if part of it was destroyed. (The precursor of the internet, ARPANET, was designed by the US Department of Defense!)

Part of this process is to split up any file into a number of smaller bundles called packets. These packets contain a portion of the file, along with some meta-information about the packet. Each packet gets sent through the computer network, being passed on from router to router, until it reaches its destination. At the end, all the packets are reassembled into the original file.

A diagram of a data packet, showing header, payload and trailer

Each packet is a string of bits, 1s and 0s, which is divided up into three different sections. First is the header of the packet, which contains some of the metadata. It contains the IP address of the destination as well as of the sender. That not only enables it to reach its recipient, but also to have information resent if some packets get lost or corrupted in transit. The header also contains the packet number (very important in the reassembling stage!) and the size of the packet. Then the main section of the packet is called the payload, which is a portion of the original complete file. Finally, there is a trailer that contains error checking material that is used to make sure that the packet gets sent without any corruption or data loss.


Study tip:

cartoon of a delivery truck

One way that you can remember the sections of a packet is to visualize it. Think of a delivery truck. The driver in the front (the header) has the information about the shipment: where it’s going, who it’s coming from, etc. The main cargo section holds the payload (visualize the workers who are paid to load the shipment into the truck!), and the truck is followed (trailed) by a supervisor who checks to see if everything is done correctly (maybe she’s riding on a trailer behind). Visualization is an excellent way to remember information, especially if the way you visualize things is ridiculous or shocking: picture a comical driver and a furious supervisor throwing things at the driver while clownish workers run around dropping parts of the payload, and the image will stick in your head forever.


For more information on data packets, check out my online course “Conquer Computer Science: Networks and Data Transmission”

John Iglar

John Iglar has taught Computer Science to students aged 3 to 83. He has taught in some of the finest international schools around the world, covering the IB Diploma, IGCSE, and many more curricula! No longer tied to a school, he tutors, blogs, freelances, and creates online courses.

1 comment so far

Allen landman

This is great I will have my AP computer science class read this before we start the internet chapter.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.