A network packet is a small chunk of data sent across a network. When a large file is transmitted, it is split into many packets that can each travel independently — by different routes if necessary — and are reassembled at the destination. This is the basis of packet switching.
Why is data split into packets rather than sent all at once?
Imagine sending a 10,000-page manuscript by post. You could pack it all into one crate — but if that crate is delayed or lost, everything is lost. Alternatively, you post 100 bundles of 100 pages, each labelled with its order. If one bundle is delayed, only that bundle needs to be resent, and the 99 others arrive on time. Packets work the same way.
The practical benefits of splitting data into packets:
- Fault tolerance — if a packet is lost or corrupted, only that packet is retransmitted, not the entire file.
- Efficient network use — multiple users' packets interleave on the same link; the network never sits idle waiting for one large transmission to finish.
- Flexible routing — each packet can take a different path through the network, avoiding congested or broken links.
- Manageable error checking — a small packet is quick to verify; checking one huge file is slower and if it fails, everything must be resent.
What are the three parts of a network packet?
Every packet has a defined structure. At GCSE level, you need to know three sections:
| Section | Also called | What it contains |
|---|---|---|
| Header | — | Source IP address, destination IP address, sequence number, protocol identifier, TTL (time to live) |
| Payload | Body / data | The actual data being sent (a portion of the file, message, or webpage) |
| Trailer | Footer | Error-checking information — typically a checksum or CRC (Cyclic Redundancy Check) |
| HEADER | PAYLOAD | TRAILER |
source IP destination IP seq. number checksum
protocol TTL port numbers
The sequence number is crucial: it tells the receiving computer how to reassemble packets in the correct order, even if they arrive out of sequence.
What is the role of IP addresses in a packet?
The packet's header contains both the source IP address (the sender's address) and the destination IP address (the recipient's address). Routers read the destination IP address to decide which direction to forward the packet.
This is analogous to a postal address on an envelope: the postal service reads the destination and routes the envelope without opening it. Similarly, every router along the packet's path reads the destination IP, looks it up in its routing table, and forwards the packet one hop closer to the destination.
How do routers forward packets?
A router is a network device that connects multiple networks and decides where to send each incoming packet. The forwarding process:
- Packet arrives at a router's input port.
- Router reads the destination IP address in the header.
- Router consults its routing table — a list of known network prefixes and which outgoing link leads toward each.
- Router forwards the packet on the best outgoing link and decrements the TTL by 1.
- If TTL reaches 0, the packet is discarded (preventing packets from circling forever in a loop).
In packet switching, each router makes an independent forwarding decision. Two packets from the same file might travel completely different routes — packet 1 via Amsterdam, packet 3 via New York — and still arrive at the same destination, where they are reassembled.
What is the difference between packet switching and circuit switching?
| Feature | Packet switching | Circuit switching |
|---|---|---|
| How connection works | No dedicated path; packets routed independently | A dedicated circuit reserved for the duration of the call |
| Efficiency | High — links shared among many users | Low — circuit idle if sender pauses |
| Fault tolerance | High — packets can reroute around failures | Low — circuit failure ends the session |
| Used in | The internet | Traditional telephone networks (PSTN) |
| Latency | Variable (router queuing delay) | Consistent (dedicated path) |
The internet uses packet switching because it is efficient and resilient. Traditional phone networks historically used circuit switching because voice calls require consistent, low-latency delivery — though modern VoIP (voice over IP) now uses packet switching for calls too.
What happens when packets arrive out of order?
The transport layer protocol — typically TCP (Transmission Control Protocol) — handles reassembly:
- The sending computer assigns a sequence number to each packet.
- Packets travel independently and may arrive out of order.
- The receiving computer's TCP implementation buffers the packets and reorders them by sequence number.
- TCP also checks for missing packets (a gap in the sequence numbers) and requests retransmission.
- Once all packets are received and correctly ordered, TCP passes the complete data to the application.
This is why TCP/IP is called a reliable protocol: it guarantees that data is delivered completely, in order, and without errors — or notifies the sender that delivery has failed.
Frequently asked questions
How large is a typical network packet?
The size varies by protocol. The most common limit is 1500 bytes for Ethernet (the MTU — Maximum Transmission Unit). If an application sends a message larger than the MTU, the network layer automatically fragments it into smaller packets. The TCP/IP stack handles this fragmentation and reassembly transparently — the application just sends data, and the network deals with the packaging.
What is TTL (Time to Live) and why is it needed?
TTL is a counter in the IP header, initially set to a value like 64 or 128. Each router that forwards the packet decrements the TTL by 1. If TTL reaches 0, the router discards the packet and sends an ICMP "time exceeded" message back to the sender. TTL prevents packets from circulating indefinitely in routing loops, which could otherwise consume network bandwidth forever. The ping and traceroute commands use TTL to measure network paths.
Is UDP also based on packets?
Yes — UDP (User Datagram Protocol) also sends data as packets using the same underlying IP infrastructure. The difference is that UDP is unreliable: it sends packets without guaranteeing delivery, ordering, or error recovery. This makes UDP faster, which is useful for real-time applications (video streaming, online games, VoIP) where a slightly late or missing packet is preferable to the delay caused by waiting for retransmission.
What is a packet sniffer?
A packet sniffer is software that captures and displays network packets as they travel across a network. Legitimate uses include network diagnostics (Wireshark is a well-known tool). Illegitimate uses include intercepting plaintext passwords on HTTP connections. This is precisely why HTTPS and TLS encryption are essential — a packet sniffer on an unencrypted network can read every byte of HTTP traffic.
Master packet switching, network protocols, and all GCSE networking concepts with personalised coaching from Professor Turing at aitutors.me.