Packet Routing & Network Protocols

Networks transmit data by breaking large files into smaller chunks called packets, which travel independently across routers using IP addresses. If packets take different routes or arrive out of order, the receiving device reassembles them using sequence numbers in the header.

What happens when you tap "Send"?

Type a message in the phone below and press the green send button. You'll watch your text get sliced into numbered packets, stamped with IP addresses, and routed across the world.

Your Phone 192.168.1.104 Source IP ⓘ Cell Mast ⓘ Radio ➔ Optical Fibre ISP Gateway ⓘ 81.2.14.1 Reads Dest IP DNS Resolver ⓘ 8.8.8.8 Translates URL ➔ IP Router Alpha ⓘ Path A (12ms) Router Beta ⓘ Path B (16ms) Click to Congest Router Gamma ⓘ Egress Router BBC Server ⓘ 151.101.0.81 London, UK Wikipedia Server ⓘ 208.80.154.224 Virginia, USA Python Server ⓘ 151.101.192.223 Oregon, USA
4G LTE • 100% Browser
Web Browser
DNS Lookup ➔ HTTP Page Retrieval
Different websites live on different servers across the world. DNS (8.8.8.8) translates the human domain name into the server's numeric IP so routers steer your HTTP request to the right machine!
TCP Packet Slicing:
Packet #1 of 3 (TCP)
Source IP: 192.168.1.104 ?
Destination IP: 151.101.0.81 ?
Sequence #: #1 of 3 ?
Protocol: TCP / IP ?
TTL (Time to Live):
64 hops (prevents infinite loops) ?
"<!DOCTYPE html><title>BBC News</title>"
38 bytes of text
CRC32 Checksum: 0x8F3D12A0
Valid ✓

If the trailer checksum doesn't match the recalculation at the destination, TCP discards the packet and requests a resend.

5G • Incoming 16:00
Reassembly Buffer Waiting
🔒 https://bbc.co.uk 200 OK
BBC News • Technology

All 3 response packets arrived safely and reassembled into the full webpage!

Packet #1: <!DOCTYPE html> Header ✓ Packet #2: <article> Live Tech Updates ✓ Packet #3: <footer> © BBC News 2026 ✓

Network Topologies: Interactive Network Builder & Lab

A network topology is the physical or logical arrangement of connected devices and cables. Different layouts (Star, Bus, and Mesh) balance installation costs against reliability, cable faults, and data collision risks.

Test Scenarios:
Packet Ping:
➔
Star Topology (Central Switch) ● 100% Operational
Drag any device to move. Use the tools bar on the left to add devices, connect cables, snip, or delete.

Live Topology Diagnostics

Star Topology
Nodes / Devices 6 Devices
Total Cable Links 5 Links
Cabling Cost & Scale Moderate • O(N) cables
Single Point of Failure Central Switch (SPOF)
Collision Domain Zero (Switched ports)
Redundant Paths 0 (Single link per node)

Star Topology in GCSE Computer Science

The TCP/IP 4-Layer Model

The TCP/IP model divides network communication into four modular layers so protocols can be updated without rewriting the entire system. As data travels down the stack, each layer wraps the payload in its own specialized header (encapsulation) before physical transmission.

Choose Request:
Step 1 of 8 Layer 4 • Application Sender (Encapsulation)

Application Layer

"Which software application sent this?"

User initiates a request in browser software. The HTTP protocol formats the text payload ready for the network.

Browser Client
Client Request: GET /index.html
Sender Workstation
IP: 192.168.1.50
Encapsulation ↓
Layer 4
Application Layer HTTP (Port 80)
↓ Pass down
Layer 3
Transport Layer TCP • Slices Packets & Ports
↓ Pass down
Layer 2
Internet Layer IP • Adds IP Addresses
↓ Pass down
Layer 1
Link Layer MAC Addresses & Physical NIC
Peer-to-Peer Protocol Bridges Live Transmission
End-to-End Logical Communication
Each layer communicates logically with its matching peer on the other host. Watch how headers are added on the left, transported across the wire, and stripped on the right.
Packet Transformation ⇄
Application Protocol Peer Link (HTTP / HTTPS / SMTP)
Transport Protocol Peer Link (TCP End-to-End)
Internet Protocol Peer Link (IP Logical Addressing)
Link Layer Peer Link (Hop-to-Hop Hardware Frames)
Web Server Process
Server State: Waiting for packets...
Receiver Server
IP: 151.101.0.81
Decapsulation ↑
Layer 4
Application Layer Renders Message
↑ Pass up
Layer 3
Transport Layer Reassembles Numbered Chunks
↑ Pass up
Layer 2
Internet Layer Strips & Confirms IP
↑ Pass up
Layer 1
Link Layer Strips MAC Frame
⮦ Link Layer
Ethernet Frame: Bits & Electrical Pulses
Link Layer ⮧
Packet Packaging at this Step Raw Payload
Why Use Network Layers? (AQA Core §3.5.4)
  • Modularity: Each layer is independent. Upgrading Wi-Fi to 5G doesn't break HTTP.
  • Interoperability: Different hardware and software vendors interoperate freely.
  • Decomposition: Breaks down complex network tasks into simple, manageable steps.

Public Key Cryptography & Key Exchange

Data sent across a network, like a WhatsApp message, is often encrypted so that if the data is intercepted, it cannot be read. However, encryption normally relies on both the sender and receiver knowing the same secret key. So, how do we share a secret encryption key over a network without someone listening being able to find out what that key is? One method is Public Key Cryptography — demonstrated below using the classic Paint Pot Analogy from Simon Singh's The Code Book.

1 Initial State
➔
2 Share Public Key
➔
3 One-Way Paint Mix
➔
4 The Packet Swap
➔
5 Shared Key Match
➔
6 WhatsApp E2EE

Private Keys in Studios, Public Key on Open Wire

Alice holds her private key on her device. Bob holds his private key on his device. The public key is in the public space.

EVE'S KNOWLEDGE: Public Base Color Only
KEY STATUS: No secret key established
A

Alice

Sender Device
Private Space
Net

Public Network Wire

Open Channel
Public Space
Eve's Network Monitor
PROMISCUOUS WI-FI CAPTURE
Public Base:
Yellow
Alice Mixture:
Unknown
Bob Mixture:
Unknown
Shared Secret:
?
LOCKED
B

Bob

Receiver Device
Private Space

Encryption Concepts & Exam Notes

Plaintext vs Ciphertext

Plaintext: The original, readable message before encryption (for example, "Meet at the cafe at 4pm!").

Ciphertext: The encrypted, scrambled data transmitted across the network (for example, 0x53 0x65 0x65...). Without the secret key, it appears as random noise.

Symmetric vs Asymmetric Encryption

Symmetric: Uses one single secret key to both encrypt and decrypt (such as AES). It is fast and computationally lightweight, but introduces the Key Exchange Problem: transmitting the key across an insecure network risks interception.

Asymmetric: Uses a mathematically linked key pair (a Public Key to encrypt and a Private Key to decrypt, or Diffie-Hellman key exchange). This resolves the key-sharing dilemma across public channels.

Why WhatsApp and HTTPS Use Hybrid Encryption

Asymmetric mathematics (such as 2048-bit modular exponentiation) requires intensive CPU processing and is too slow for large files or live video streams.

The Solution: Modern networks use Asymmetric Key Exchange (Diffie-Hellman) for a fraction of a second to establish a shared secret key, and then immediately switch to fast Symmetric Encryption (AES) for all subsequent message traffic.

Common Exam Pitfall: The Public Key

Common Mistake: Suggesting that "the public key must be kept secret so unauthorized users cannot access it."

Key Principle: The Public Key is intentionally public and broadcast openly. It can only be used to encrypt data or mix pigments. Only the corresponding Private Key can decrypt the resulting data.

Networks Revision Guide & Key Exam Traps

Key definitions, network architectures, and exam traps for Paper 2 (§3.5). Review packet switching, TCP/IP 4-layer protocols, topology trade-offs, and public key encryption.

1. What are the 3 parts of a packet?

Exam questions consistently test this exact trio:

  • Header: Sender IP, Recipient IP, Packet Sequence Number, Total Packets, and Protocol.
  • Payload: The slice of actual user data.
  • Trailer: Checksum (CRC) for error detection.

2. IP Address vs MAC Address

  • MAC Address: Physical address burnt into the NIC by the manufacturer. 48 bits written in hex. Used locally (LAN).
  • IP Address: Logical address assigned by the network. 32-bit (IPv4) or 128-bit (IPv6). Used across the internet (WAN).

3. Domain Name System (DNS)

Computers route numbers, humans remember words. When you type bbc.co.uk, your computer queries a DNS server to look up the corresponding IP address (e.g. 151.101.0.81) before sending the request.

4. Router vs Switch vs WAP

  • Router: Connects different networks (LAN to WAN). Reads IP addresses to choose optimal paths.
  • Switch: Connects devices on the same local network. Reads MAC addresses.
  • WAP: Uses radio waves to connect wireless devices to a wired network.

Key Exam Traps to Avoid

  • Trap 1: The Internet is the physical worldwide network of cables and routers. The World Wide Web is the collection of web pages accessed via HTTP over the Internet!
  • Trap 2: In packet switching, packets take independent routes and arrive out of order—they do not travel on a dedicated single wire.