SLIDE 1 / 10
CSZone.co.uk
OCR H446 · Component 1 · 1.3.4

Routing and
Packet Switching

OCR A Level Computer Science · cszone.co.uk
H446 SpecA Level
Learning Objectives

By the end of this topic you will be able to:

Explain what packet switching is and how data is broken into packets
Describe the structure of a packet (header, payload, trailer)
Explain how routers use routing tables to forward packets
Describe routing algorithms and compare static vs dynamic routing
Packet Switching

Packet Switching

Packet switching divides data into small fixed-size chunks called packets before transmission. Each packet is routed independently across the network and reassembled in the correct order at the destination.
Advantages
Efficient use of network bandwidth — packets can use different routes avoiding congestion
Resilient — if one path fails, packets are rerouted automatically
Allows multiple simultaneous communications to share the same link
vs Circuit Switching
Circuit switching establishes a dedicated path for the entire session (traditional telephone calls). Bandwidth is reserved even when idle — less efficient. Packet switching is used on the internet.
Packet Structure

Anatomy of a Packet

HEADER
PAYLOAD (DATA)
TRAILER
Header Contains
Source IP · Destination IP · Packet sequence number · Time-to-live (TTL) · Protocol
Trailer Contains
Checksum (error detection) — receiver recomputes and compares to verify packet integrity during transmission.
Routing

Routing Tables and Algorithms

Routing table: a table held by each router listing known networks and the best next-hop to reach them. When a packet arrives, the router looks up the destination IP, finds the best match in the table, and forwards accordingly.
Static routing: routes are manually configured by a network administrator. Simple and predictable, but does not adapt to network changes or failures. Suitable for small, stable networks.
Dynamic routing: routers exchange routing information automatically using protocols (RIP, OSPF, BGP). Routes adapt to topology changes. More complex but resilient and scalable for large networks like the internet.
TTL (Time To Live): a counter decremented by each router. When TTL reaches 0, the packet is discarded. Prevents packets from circulating indefinitely in routing loops.
Exam Practice
OCR H446 Style · 4 marks
Explain the advantages of packet switching over circuit switching for data communication on the internet.
[4 marks]
1
In packet switching, network bandwidth is shared — multiple data streams use the same link simultaneously, unlike circuit switching where bandwidth is reserved exclusively even when idle.
1
Packets can take different routes through the network, avoiding congested or failed links — the network is more resilient to failures.
1
If a link fails, packets are automatically rerouted by routers using dynamic routing — there is no need to re-establish a connection from scratch as circuit switching requires.
1
Packet switching is more efficient for bursty data (web browsing, email) where data is not sent continuously — no bandwidth is wasted during idle periods.
Common Mistakes

Don't Lose Marks

!
Saying packets always arrive in order — packets are routed independently and may arrive out of order. The receiving end reassembles them in the correct sequence using the sequence numbers in the packet header.
!
Confusing the checksum with the sequence number — the checksum detects transmission errors in a packet; the sequence number identifies the packet's position in the original data stream for reassembly. These are different fields serving different purposes.
!
Saying TTL is a time limit in seconds — TTL is a hop count, not a time value. It is decremented by 1 at each router hop. When it reaches 0 the packet is discarded to prevent infinite loops.
1.3.4c Complete
Well done! ✓
Routing and Packet Switching
Return to lesson to continue