Stewdent.eu
▾

Data Packets

Data packets are small chunks that large messages are broken into for transmission across a network, then reassembled at the destination.

Last updated: 22 November 2025

★★☆☆☆ Level 2computingSystemsnetworkingpacketstcppacket-switching4 min read

Report an error

What is a Data Packet?

When you send any data across a network — a web request, an email, a video stream — it is broken into small chunks called packets. Each packet travels independently through the network and is reassembled at the destination.

Think of it like sending a large book through the post by tearing out the pages, putting each in a separate envelope labelled with the page number, and posting them all. They might arrive in different orders via different routes, but the recipient can reassemble the book in the right order.

What is Inside a Packet?

Every packet has two main parts:

PartContents
HeaderSender IP address, destination IP address, packet number, total packets, checksum
PayloadThe actual data being sent (a fragment of the file, message, or web page)

The checksum is a value calculated from the data. If the packet is corrupted in transit, the checksum will not match and the receiving device knows to request the packet again.

Note

A typical maximum packet size (called the MTU — Maximum Transmission Unit) is about 1,500 bytes on most networks. A 1 MB file would be broken into roughly 670 packets.

How Packets Travel Through the Network

  1. Segmentation: The sending device breaks data into packets and numbers them
  2. Routing: Each packet is sent into the network, where routers read the destination IP and forward it towards the destination, hop by hop
  3. Different paths: Packets may travel via completely different routes — some might go via Frankfurt while others go via Amsterdam
  4. Arrival: Packets may arrive out of order, or some may be lost entirely
  5. Reassembly: The receiving device uses the packet numbers to reassemble them in the correct order

TCP vs UDP

Two main protocols govern how packets are handled:

TCP (Transmission Control Protocol):

  • Checks that every packet arrives correctly
  • Requests re-transmission of any lost or corrupted packet
  • Used for web browsing, email, file downloads — wherever accuracy matters

UDP (User Datagram Protocol):

  • Sends packets without checking they arrived
  • Faster, lower latency
  • Used for live video streaming, online gaming, video calls — where a tiny bit of lost data is acceptable but delay is not
Tip

If a video call glitches for a fraction of a second, that is UDP not bothering to resend a lost packet — it is better to carry on than to pause and wait. But if a file download loses a packet, TCP makes sure it is resent correctly.

Why Packet Switching is Efficient

Packet switching (as opposed to keeping a dedicated connection open) means:

  • Many users share the same network cables simultaneously
  • If one route is busy, packets take another route
  • The network is more resilient — a broken link does not stop communication

Practice Problems

A 4,500-byte file is transmitted over a network with a maximum packet size of 1,500 bytes. How many packets are created, and what information does the header of each packet contain?

Show answer
4,500 ÷ 1,500 = 3 packets. Each header contains: sender IP address, destination IP address, packet number (1, 2, or 3), total number of packets (3), and a checksum for error detection.

Explain why UDP is used for live video streaming rather than TCP.

Show answer
Live video streaming requires low latency (minimal delay). TCP checks every packet arrives and re-requests missing ones, which causes delays. In live streaming, a small amount of lost data (resulting in a brief glitch) is far less disruptive than pausing to wait for a re-transmitted packet. UDP sends packets without acknowledgement, keeping the stream smooth and continuous.