Why Can’t We Just Send Data in One Big Chunk?

Imagine you want to send a large photograph to a friend across the internet. The image file might be several megabytes — millions of bytes of data. If the internet tried to send this file as one continuous stream along a single path, it would tie up that entire route for the duration of the transfer. No one else could use those connections until your photo finished sending. If anything went wrong halfway through — a cable fault, a router crash — the entire transfer would fail and you would have to start again from scratch.

This is clearly not how the internet works. You can browse the web, stream music, and send messages all at the same time, sharing the same network connections with millions of other users worldwide. The solution that makes this possible is called packet switching.

Packet switching is the method the internet uses to transmit data. Instead of sending a file as one big block, the data is broken into small, manageable pieces called packets. Each packet is sent independently across the network, potentially taking different routes, and is reassembled at the destination to recreate the original data.

In this topic you will learn:

Key Concept: Packet Switching Packet switching is a method of transmitting data across a network by breaking it into small packets, sending each packet independently (possibly via different routes), and reassembling them at the destination. It is the fundamental technique that makes the internet work.
Did You Know? The concept of packet switching was independently invented by two researchers in the early 1960s: Paul Baran in the United States and Donald Davies in the United Kingdom. Davies actually coined the term “packet.” Their work became the foundation of ARPANET, the precursor to today’s internet. The entire modern internet — every website, every video call, every online game — relies on packet switching.

Why Use Packet Switching?

Packet switching became the standard for computer networks because it solves several critical problems with data transmission. There are three main reasons why it is used:

1. Efficient Use of Bandwidth

When data is split into packets, multiple users can share the same network connections simultaneously. While one user’s packets travel along a link, another user’s packets can use the same link in the gaps between them. This is like a motorway where many cars from different journeys share the same road at the same time, rather than closing the entire motorway for one car to travel from start to finish.

Without packet switching, sending a large file would monopolise an entire route, wasting bandwidth whenever there were brief pauses in the transmission. Packet switching ensures that network capacity is used as fully as possible.

2. Fault Tolerance

Because each packet is sent independently and can take a different route, the network is fault tolerant. If one router or cable fails, packets can simply be rerouted around the problem. The sender does not even need to know about the failure — the network handles it automatically.

This was actually one of the original motivations for developing packet switching. The US military wanted a communication system that could survive partial destruction. If a bomb destroyed one part of the network, messages would still get through by finding alternative routes — exactly what packet switching enables.

3. Fairness

Packet switching ensures that no single user can dominate the network. Because data is broken into small packets and these packets are interleaved with packets from other users, everyone gets a fair share of the available bandwidth. Multiple users share the same network lines fairly, rather than one user blocking everyone else while their large file transfers.

Exam Tip When asked “Why is packet switching used?” in an exam, aim to give three distinct reasons: (1) efficient use of bandwidth — multiple users share connections, (2) fault tolerance — if a route fails, packets find alternative paths, and (3) fairness — no single user can monopolise the network. Always explain each point rather than just listing it.

The Structure of a Packet

A packet is not just a random chunk of data. Every packet has a carefully defined structure with three distinct parts: the header, the payload, and the trailer (sometimes called the footer). Think of a packet like a letter in an envelope — the envelope has the address on the outside (header), the letter inside (payload), and a seal on the back to confirm it has not been tampered with (trailer).

Structure of a Data Packet

  +------------------------------------------------------+
  |                      PACKET                          |
  +----------------+---------------------+---------------+
  |     HEADER     |      PAYLOAD        |    TRAILER    |
  |                |                     |               |
  | - Source IP    |  The actual data    | - Error check |
  | - Dest. IP     |  being sent         |   (checksum)  |
  | - Packet No.   |                     | - End of      |
  | - Total Pkts   |  Typically          |   packet      |
  | - TTL          |  500-1500 bytes     |   marker      |
  | - Protocol     |                     |               |
  +----------------+---------------------+---------------+
        

The Header

The header is attached to the front of every packet and contains essential information that routers and the destination computer need to handle the packet correctly. It is like the address label on a parcel. The header includes:

The Payload

The payload is the middle section of the packet and contains the actual data being transmitted. This is the useful content — a piece of an image, a fragment of a web page, part of an email message, or a segment of a video stream.

The payload is typically between 500 and 1,500 bytes in size. The maximum payload size is determined by the network’s Maximum Transmission Unit (MTU). On most networks, the MTU is 1,500 bytes. Keeping packets small means they can be transmitted quickly and retransmitted efficiently if an error occurs.

The Trailer (Footer)

The trailer is attached to the end of the packet and serves two important purposes:

Common Mistake: Students sometimes confuse the header and the trailer. Remember: the header contains addressing and routing information (source IP, destination IP, sequence number, TTL, protocol) and is at the front of the packet. The trailer contains error checking data and an end marker and is at the back of the packet. Think of it this way: the header tells the network where to send the packet; the trailer checks that the packet arrived correctly.
Key Concept: Packet Structure Every packet has three parts: (1) Header — source IP, destination IP, packet number, total packets, TTL, and protocol; (2) Payload — the actual data (500–1,500 bytes); (3) Trailer — error checking checksum and end-of-packet marker. You must know all three parts and what each contains for the exam.

How Packet Switching Works: Step by Step

Now that you understand the structure of a packet, let us walk through the entire process of how data gets from one computer to another using packet switching. Imagine you are sending an image from your computer in London to a friend’s computer in Edinburgh.

Step 1: Data Is Split into Packets at the Source

Your computer takes the image file and divides it into small chunks. Each chunk becomes the payload of a packet. If the image is 15,000 bytes and each payload can hold 1,500 bytes, the file will be split into 10 packets.

Step 2: Each Packet Is Labelled

Your computer adds a header to each packet containing the source IP address (your computer), the destination IP address (your friend’s computer), the packet’s sequence number (1 of 10, 2 of 10, etc.), the total number of packets (10), a TTL value, and the protocol. A trailer with error-checking data is also added.

Step 3: Packets Are Sent Across the Network Independently

The packets are sent out onto the network. Crucially, each packet is treated as an independent unit. They do not have to travel together or follow the same route. Each packet makes its own way through the network.

Step 4: Routers Examine Each Packet and Forward It

At each point in the network, a router examines the packet’s destination IP address in the header. The router consults its routing table to determine the best next step (the “next hop”) for the packet to take towards its destination. The router then forwards the packet to the next router along the route.

Step 5: Packets May Take Different Routes

Because the internet is a complex mesh of interconnected routers and links, there are usually many possible paths between two points. Different packets from the same file may take completely different routes. Packet 1 might travel through Manchester and Leeds, while Packet 2 goes through Birmingham and Sheffield. Routers make decisions based on current network conditions — if one route is congested or a link has failed, they redirect packets along a different path.

Packets Taking Different Routes

  SOURCE (London)                         DESTINATION (Edinburgh)
       |                                         ^
       |---> Router A ---> Router C ---> Router F ---> |  (Packet 1, 3, 7)
       |                                               |
       |---> Router A ---> Router D ---> Router F ---> |  (Packet 2, 5)
       |                                               |
       |---> Router B ---> Router E ---> Router F ---> |  (Packet 4, 6, 8, 9, 10)
        

Step 6: Packets Arrive at the Destination (Possibly Out of Order)

Because packets take different routes, they may arrive at the destination at different times and in a different order from which they were sent. Packet 5 might arrive before Packet 2, or Packet 10 might arrive before Packet 3. This is completely normal in packet switching.

Step 7: Packets Are Reassembled in the Correct Order

The destination computer uses the sequence numbers in each packet’s header to put all the packets back in the correct order. It knows it needs 10 packets (from the “total packets” field), so it waits until all 10 have arrived, then arranges them from 1 to 10 and extracts the payload from each one to reconstruct the original image file.

Step 8: Error Checking and Retransmission

The destination checks each packet’s checksum (in the trailer) to verify the data was not corrupted during transmission. If a packet is damaged or missing (perhaps it was discarded because its TTL reached zero, or it was lost due to a network error), the destination sends a request back to the source asking for that specific packet to be re-sent. Only the damaged or missing packets need to be retransmitted — not the entire file.

Exam Tip The eight steps of packet switching are a common exam question. You might be asked to “describe how data is transmitted across the internet using packet switching” for 4–6 marks. Make sure you cover: data split into packets, packets labelled with headers, packets sent independently, routers forward packets, packets may take different routes, packets arrive out of order, reassembled using sequence numbers, error checking and retransmission of damaged packets.

The Role of Routers in Packet Switching

Routers are the unsung heroes of the internet. Without them, packets would have no way of finding their destination. A router is a networking device that sits at junctions in the network and makes decisions about where to send each packet next.

What Do Routers Do?

Think of routers like traffic police at junctions. Each officer looks at the address on a package, checks their map, and points it in the right direction towards the next junction. No single officer knows the entire route — they just know the best next step from their position.

Key Concept: Routers Routers examine the destination IP address in a packet’s header, consult their routing table, and forward the packet to the next hop towards its destination. They are responsible for directing traffic across the internet, managing congestion, and rerouting packets when links fail.

Real-World Analogy: Sending a Book by Post

One of the best ways to understand packet switching is through a simple analogy. Imagine you want to send a book to a friend, but the postal service will only accept envelopes, not heavy parcels. Here is what you would do:

  1. Tear out the pages: You carefully remove each page from the book. Each page is like a packet’s payload — a small piece of the original data.
  2. Number the pages: You write a page number on each one (e.g., “page 14 of 200”). This is like the sequence number in the packet header.
  3. Put each page in a separate envelope: Each envelope has your address (source IP), your friend’s address (destination IP), and the page number. The envelope is the header, and the page inside is the payload.
  4. Post the envelopes separately: You drop all 200 envelopes in the postbox. The postal service does not send them all together on the same van — they get mixed in with other people’s mail and may travel via different sorting offices and delivery routes.
  5. Envelopes arrive at different times: Your friend starts receiving envelopes over several days. Page 47 might arrive before page 3. Page 150 might arrive on Tuesday while page 12 arrives on Wednesday. This is just like packets arriving out of order.
  6. Your friend reassembles the book: Using the page numbers, your friend puts all the pages back in the correct order (1, 2, 3 ... 200) and reconstructs the book. This is reassembly using sequence numbers.
  7. Check for missing pages: If any envelopes were lost in the post, your friend notices the gap (e.g., page 87 is missing) and contacts you to re-send just that page. This is like error checking and retransmission.

This analogy captures the essential ideas of packet switching: breaking data into pieces, labelling them, sending them independently through a shared system, and reassembling them at the destination.

Exam Tip Analogies like the “book by post” example can be very useful in exams. If a question asks you to “explain packet switching,” using an analogy alongside the technical explanation shows the examiner that you truly understand the concept. However, always include the correct technical terms (packets, header, payload, sequence number, router, reassembly) alongside the analogy — an analogy alone may not earn full marks.

Packet Switching vs Circuit Switching

To fully understand packet switching, it helps to compare it to the older method it replaced: circuit switching. Circuit switching is the technology used by traditional telephone networks.

How Circuit Switching Works

In circuit switching, a dedicated path (circuit) is established between the sender and receiver before any data is transmitted. This path remains exclusively reserved for that communication for the entire duration of the connection, even during silences or pauses. Think of an old-fashioned telephone call: when you dial a number, the telephone exchange creates a continuous electrical circuit from your phone to the other person’s phone. That circuit is yours alone until you hang up.

Comparison Table

FeaturePacket SwitchingCircuit Switching
Connection type No dedicated path — packets find their own routes independently A dedicated path (circuit) is established and held open for the entire session
Bandwidth usage Efficient — bandwidth is shared among many users; unused capacity is available to others Wasteful — the circuit is reserved even during silences or idle periods
Fault tolerance High — if a route fails, packets can be rerouted automatically Low — if any part of the circuit fails, the entire connection is lost
Data order Packets may arrive out of order and must be reassembled Data arrives in order because it follows a single path
Setup time No setup needed — packets are sent immediately A circuit must be established before data can flow (setup delay)
Suitable for Internet, email, web browsing, file transfer, streaming Traditional telephone calls, dedicated private connections
Example The internet Traditional landline telephone network (PSTN)
Guaranteed quality No guarantee — packets may be delayed, lost, or arrive out of order Guaranteed bandwidth and consistent quality for the duration of the call
Common Mistake: Students sometimes say that circuit switching is “bad” and packet switching is “good.” In reality, each has advantages for different situations. Circuit switching guarantees consistent quality and data order, making it ideal for real-time voice calls. Packet switching is more efficient and fault tolerant, making it ideal for internet traffic. The exam expects you to discuss the strengths and weaknesses of both methods objectively.
Key Concept: Packet vs Circuit Switching Packet switching breaks data into independent packets that share network paths — efficient and fault tolerant, but packets may arrive out of order. Circuit switching establishes a dedicated path for the entire communication — guaranteed quality but wasteful of bandwidth. The internet uses packet switching; the traditional telephone network used circuit switching.

Test Your Knowledge

Try these interactive exercises to check your understanding of packet switching. Read each question carefully and think about your answer before clicking.

Exercise 1: Packet Assembly Challenge

Packets have arrived at the destination out of order! Read the packet information and click the packets in the correct sequence order (from first to last) to reassemble the original message.

Score: 0 / 0

Exercise 2: Packet Switching Quiz

Test your knowledge of packet switching concepts. Read each question and select the correct answer.

Score: 0 / 0

Exercise 3: Packet Part Identifier

Read the description below and identify which part of a packet it belongs to: Header, Payload, or Trailer.

Score: 0 / 0

Practice Questions

Click on each question to reveal the answer. Try to answer in your head or on paper first before checking!

Q1: Define the term “packet switching” and explain why it is used on the internet.

Answer: Packet switching is a method of transmitting data across a network by breaking it into small units called packets. Each packet is sent independently across the network, potentially taking different routes, and is reassembled at the destination using sequence numbers. It is used on the internet because: (1) it makes efficient use of bandwidth — multiple users share the same network connections by interleaving their packets; (2) it is fault tolerant — if a route fails, packets can be rerouted via alternative paths; (3) it is fair — no single user can monopolise the network because data is sent in small packets that are mixed with other users’ traffic.

Q2: Name and describe the three parts of a data packet.

Answer: A data packet has three parts: (1) Header — contains routing and control information including the source IP address, destination IP address, packet sequence number, total number of packets, TTL (Time to Live), and the protocol. The header is used by routers to forward the packet and by the destination to reassemble packets. (2) Payload — contains the actual data being transmitted (e.g., part of an image, web page, or email). The payload is typically 500–1,500 bytes. (3) Trailer (footer) — contains error checking data (a checksum) used to verify the packet was not corrupted, and an end-of-packet marker that indicates where the packet ends.

Q3: Explain what TTL (Time to Live) is and why it is necessary.

Answer: TTL (Time to Live) is a value stored in the header of each packet. It is set to a number (e.g., 64) when the packet is first sent. Each time the packet passes through a router, the TTL is decremented (reduced) by one. If the TTL reaches zero, the packet is discarded by the router. TTL is necessary because without it, a misdirected or lost packet could keep circling the network indefinitely, passing from router to router in a loop. This would waste bandwidth and could cause network congestion. TTL ensures that packets have a limited lifespan and are eventually removed from the network if they cannot reach their destination.

Q4: Describe the role of a router in packet switching.

Answer: A router is a networking device that directs packets across the network towards their destination. When a router receives a packet, it: (1) examines the destination IP address in the packet’s header; (2) consults its routing table — a database that maps destination addresses to the best next hop (the next router along the path); (3) forwards the packet to the appropriate next router; (4) decrements the TTL by one (and discards the packet if TTL reaches zero). Routers also help manage congestion by detecting busy routes and redirecting packets via less congested paths. Their routing tables are updated dynamically as network conditions change.

Q5: Compare packet switching and circuit switching. Give one advantage and one disadvantage of each.

Answer: Packet switching — Advantage: bandwidth is used efficiently because multiple users share network connections, and unused capacity is available to others. Disadvantage: packets may arrive out of order and must be reassembled, and there is no guaranteed bandwidth or quality of service. Circuit switching — Advantage: a dedicated path is established, guaranteeing consistent bandwidth and data arriving in order, which is ideal for real-time communication like voice calls. Disadvantage: the dedicated circuit is reserved even during periods of silence, wasting bandwidth that could otherwise be used by other communications. Also, if any part of the circuit fails, the entire connection is lost.

Q6: A 9,000-byte file is transmitted using packet switching with a maximum payload of 1,500 bytes. Describe what happens step by step.

Answer: (1) The file is split into packets: 9,000 ÷ 1,500 = 6 packets. Each packet contains up to 1,500 bytes of the file in its payload. (2) Each packet is given a header containing the source IP, destination IP, sequence number (1 of 6, 2 of 6, etc.), total packets (6), TTL, and protocol. A trailer with a checksum is also added. (3) The 6 packets are sent independently across the network. (4) Routers at each junction examine the destination IP and forward each packet towards the destination. (5) Packets may take different routes and arrive out of order. (6) The destination uses the sequence numbers to reassemble the 6 packets in the correct order (1, 2, 3, 4, 5, 6). (7) The destination checks each packet’s checksum. If any packet is corrupted or missing, it sends a request for retransmission of that specific packet.

Q7: Explain why packet switching is described as “fault tolerant.” Use an example to support your answer.

Answer: Packet switching is fault tolerant because each packet is routed independently across the network. If one router or network link fails, packets do not all fail with it. Instead, routers detect the failure, update their routing tables, and redirect subsequent packets via alternative paths. For example, if a user in London is sending data to a server in New York, and a transatlantic cable between two routers fails, the packets that have not yet been sent will be automatically rerouted through a different cable or path. The sender does not even need to know about the failure — the network handles it transparently. In contrast, circuit switching would lose the entire connection if any part of the dedicated circuit failed.

Q8: Using the “book by post” analogy, explain how packet switching works. Make sure to link each step of the analogy to the correct technical term.

Answer: Imagine sending a book by post: (1) You tear out each page — this is like splitting data into packets (each page is a payload). (2) You number each page (e.g., page 1 of 200) — this is like adding a sequence number to the packet header. (3) You put each page in a separate envelope with your address and the recipient’s address — the envelope represents the header (with source and destination IP addresses), and the page inside is the payload. (4) You post them separately — each envelope (packet) travels independently through the postal system (network). (5) Envelopes travel via different sorting offices — this is like packets being routed via different paths by routers. (6) Envelopes arrive at different times and in a jumbled order — this mirrors packets arriving out of order. (7) The recipient uses page numbers to put the book back together — the destination uses sequence numbers to reassemble packets. (8) If any pages are missing, the recipient asks you to re-send just those pages — this is like error checking and retransmission of corrupted or lost packets.

Key Vocabulary

This table summarises the essential terms for this topic. Use it for revision and to check your understanding.

TermDefinition
Packet switchingA method of transmitting data by breaking it into small independent packets, sending them across the network (possibly via different routes), and reassembling them at the destination
PacketA small unit of data transmitted across a network, consisting of a header, payload, and trailer
HeaderThe front section of a packet containing routing and control information: source IP, destination IP, sequence number, total packets, TTL, and protocol
PayloadThe middle section of a packet containing the actual data being transmitted, typically 500–1,500 bytes
Trailer (footer)The end section of a packet containing error-checking data (checksum) and an end-of-packet marker
Sequence numberA number in the packet header indicating its position in the original data (e.g., packet 3 of 10), used for correct reassembly
TTL (Time to Live)A counter in the packet header decremented by each router; if it reaches zero, the packet is discarded to prevent infinite loops
ChecksumA mathematical value in the trailer used to detect whether the packet data was corrupted during transmission
RouterA networking device that examines packet headers and forwards packets towards their destination using routing tables
Routing tableA database maintained by a router that maps destination addresses to the best next hop for forwarding packets
Next hopThe next router along the path that a packet should be forwarded to, as determined by the current router’s routing table
Circuit switchingAn older method of communication where a dedicated path is established between sender and receiver for the entire duration of the connection
BandwidthThe maximum amount of data that can be transmitted over a network connection in a given time, measured in bits per second
Fault tolerantThe ability of a system to continue functioning when part of it fails — in packet switching, packets reroute around failures
ProtocolA set of rules governing how data is transmitted and received across a network (e.g., HTTP, SMTP, FTP)
ReassemblyThe process of putting packets back in the correct order at the destination using their sequence numbers to reconstruct the original data
MTU (Maximum Transmission Unit)The largest size of packet (in bytes) that a network can transmit; commonly 1,500 bytes on most networks

How to Succeed in the Exam

Exam Tip: Know the Packet Structure You must be able to name the three parts of a packet (header, payload, trailer) and list what each contains. A common 3–4 mark question asks: “Describe the structure of a data packet.” Make sure you mention specific header fields (source IP, destination IP, sequence number, TTL, protocol) rather than just saying “the header contains information.”
Exam Tip: Describe the Process Step by Step When asked to describe how packet switching works, structure your answer as a step-by-step process: data split into packets, headers added, packets sent independently, routers forward packets, different routes taken, packets arrive out of order, reassembled using sequence numbers, error checking and retransmission. This logical structure makes your answer clear and thorough.
Exam Tip: Packet vs Circuit Switching Comparison You may be asked to compare packet switching and circuit switching. Always discuss both methods and give advantages and disadvantages of each. Key comparison points: dedicated path vs shared routes, bandwidth efficiency, fault tolerance, data ordering, setup time, and typical use cases (internet vs telephone network).
Exam Tip: Use Technical Vocabulary Precisely Use the correct terms: “packet,” “header,” “payload,” “trailer,” “sequence number,” “checksum,” “TTL,” “routing table,” “next hop.” Examiners award marks for precise technical language. Avoid vague phrases like “the packet has some information on it” — instead, name the specific fields.
Exam Tip: Calculations You may be asked to calculate the number of packets needed to transmit a file. The formula is: number of packets = file size ÷ maximum payload size (round up if there is a remainder). For example, a 10,000-byte file with a 1,500-byte payload = 10,000 ÷ 1,500 = 6.67, rounded up to 7 packets.

Past Paper Questions

Try these exam-style questions, then click to reveal the mark scheme answer.

Describe the process of packet switching when data is sent across a network. [4] marks

Mark scheme:

  • Data is broken into packets (1)
  • Each packet contains the source and destination IP addresses and a sequence number (1)
  • Packets may take different routes across the network to reach the destination (1)
  • Packets are reassembled in the correct order at the destination using the sequence numbers (1)
Explain one advantage and one disadvantage of packet switching. [2] marks

Mark scheme:

  • Advantage: if one route is blocked or congested, packets can take alternative routes / more reliable / efficient use of bandwidth (1)
  • Disadvantage: packets may arrive out of order and need to be reassembled / this adds processing overhead / latency for real-time applications (1)

Packet Switching in Your Daily Life

Now that you understand packet switching, you can appreciate that every single thing you do online relies on this process. Consider these everyday activities:

The beauty of packet switching is that all of these activities happen simultaneously across the same network infrastructure. Your web browsing packets, your friend’s video stream, and a business’s email traffic all share the same routers and cables, each packet finding its own way to its destination. This sharing is what makes the internet so powerful and efficient.

Challenge yourself: Next time you experience slow internet or a video buffer, think about what might be happening at the packet level. Are packets being delayed because the network is congested? Are some being lost and retransmitted? Understanding packet switching gives you insight into why your internet sometimes behaves the way it does.

Final Thought Packet switching is one of the most important concepts in computer networking. It is the mechanism that allows billions of devices to share the internet simultaneously, that makes the network resilient to failures, and that enables everything from email to video calls to online gaming. Understanding how data is split into packets, labelled, routed, and reassembled is fundamental to GCSE Computer Science and to understanding the digital world around you.