Networks

Networking Interactive Hub

Nine tools covering every networking topic on the GCSE and A-Level specification.

TCP/IP Stack

Click a layer to read what it does and what its protocols are. Then use the Protocol Drill below to test yourself.

Application Layer
PDU: Message
HTTP HTTPS FTP SMTP DNS POP3 IMAP SSH
Transport Layer
PDU: Segment (TCP) / Datagram (UDP)
TCP UDP
Internet Layer
PDU: Packet
IP ICMP ARP

Encapsulation

Travelling down the sender's stack, each layer adds its own header. Travelling up the receiver's stack, each layer strips its header back off.

Application
DATA (e.g. HTTP request)
Transport
TCP/UDP header
+
DATA
Internet
IP header
+
TCP/UDP
+
DATA
Network Access
Frame header
+
IP
+
TCP/UDP
+
DATA
FCS Trailer

Application Layer

The top layer - this is where user-facing protocols operate. When you browse a website, send an email, or transfer a file, the application layer protocol handles the rules of communication.

PDU name: Message

Key protocols:
  • HTTP (port 80) - web browsing
  • HTTPS (port 443) - encrypted web browsing
  • FTP (port 20/21) - file transfer
  • SMTP (port 25) - sending email
  • POP3 (port 110) - retrieving email (downloads and deletes from server)
  • IMAP (port 143) - email access (keeps mail on server)
  • DNS (port 53) - resolves domain names to IP addresses
  • SSH (port 22) - secure remote access

Protocol Drill

Which layer does this protocol belong to?

HTTP
Which TCP/IP layer handles this protocol?
Score: 0 / 0

Network Topology Builder

Select a component from the palette then click the canvas to place it. Switch to Connect mode and click two components to wire them. Drag to reposition. Right-click to delete.

Components

💻Computer
🖥Server
🔀Router
🔌Switch
Hub
📡WAP
🛡Firewall
🖨Printer
Connect
Select a component and click the canvas to place it.

Guided Challenges

Use the canvas above to complete each challenge, then press Check.

Challenge 1: Star Topology
Build a star topology: place 1 switch and at least 4 computers, all connected to the switch. This is the most common topology in modern LANs.
Star
Challenge 2: Bus Topology
Build a bus topology: place 1 hub and at least 3 computers, all connected to the hub. Every device shares a single communication line.
Bus
Challenge 3: WAN Connection
Build two separate LANs (each with a switch and 2+ computers) and connect them via a router. This simulates a basic WAN / internet gateway setup.
WAN
Challenge 4: Identify the Topology
Press Load then look at the diagram and identify what topology has been loaded. Choose below.
Quiz

Subnet Calculator

Enter an IP address and subnet mask. The calculator shows the binary AND operation used to derive the network address, broadcast address, and usable host range - exactly as required in exams.

IP Address
. . .
Subnet Mask
. . .
Common masks:
Binary working - AND operation

Test Yourself

Calculate the network address, broadcast address, and number of usable hosts for the IP and mask below.

Network Address:
Broadcast Address:
Usable Hosts:

Packet Switching Simulator

The message CodeBash: Number 1 programming platform! is split into 4 numbered packets. Each travels via a different route through 6 routers. Packet 3 ("programming") is dropped mid-route and must be retransmitted - watch the gap appear in the message then fill in when the retransmit arrives.

Use Step to advance one hop at a time. Use Play to run continuously.

1. Message Breakdown - Splitting into Packets

"CodeBash: Number 1 programming platform!"
Sequence: 1
"CodeBash:"
Src IP: 192.168.1.10
Dst IP: 10.0.0.50
Src MAC: A4:C3:F0:11
Proto: TCP port 80
Sequence: 2
" Number 1"
Src IP: 192.168.1.10
Dst IP: 10.0.0.50
Src MAC: A4:C3:F0:11
Proto: TCP port 80
Sequence: 3 [DROPPED]
" programming"
Src IP: 192.168.1.10
Dst IP: 10.0.0.50
Src MAC: A4:C3:F0:11
Proto: TCP port 80
Sequence: 4
" platform!"
Src IP: 192.168.1.10
Dst IP: 10.0.0.50
Src MAC: A4:C3:F0:11
Proto: TCP port 80
Ethernet frame structure for each packet:
Eth Header
14 bytes
IP Header
20 bytes
TCP Header
20 bytes
PAYLOAD
"CodeBash:" etc.
FCS
4 bytes

2. Routing Across the Network - 6 Routers

Press Play or Step to begin the simulation.
Step: 0 / 9

3. Destination - Reassembly Buffer

Packets arrive out of sequence order. They are held in the buffer below until all arrive, then sorted by sequence number to reconstruct the original message.

Seq: 1
awaiting...
Seq: 2
awaiting...
Seq: 3
awaiting...
Seq: 4
awaiting...
Message being reconstructed at destination:
Waiting for packets...
Message fully reassembled: "CodeBash: Number 1 programming platform!"

DNS Resolution

Domain Name System (DNS) translates human-readable domain names (e.g. www.codebash.co.uk) into IP addresses that routers can use. Press Next Step to walk through each stage using exact exam terminology.

🌐
Browser / Client
Your device
💾
Local DNS Cache
On your device
🔍
Recursive Resolver
ISP DNS server
🌍
Root Nameserver
13 in the world
🏷
TLD Nameserver
.uk / .com domain
📋
Authoritative Nameserver
codebash.co.uk records
Press Next Step to begin the DNS resolution process...
Exam Glossary - Key DNS Terms
Recursive Resolver A DNS server (usually run by your ISP) that performs the full resolution process on behalf of the client. It contacts root, TLD, and authoritative nameservers in sequence, then caches and returns the result. The client only ever talks to the resolver.
Root Nameserver The top of the DNS hierarchy. There are 13 sets of root nameservers worldwide. They do not hold IP addresses for specific domains - they hold the addresses of TLD nameservers. They respond with a referral, not a direct answer.
TLD Nameserver Manages a top-level domain such as .com, .uk, or .org. When queried, it returns a referral to the authoritative nameserver responsible for the specific domain requested.
Authoritative Nameserver The definitive source of information for a specific domain. It holds DNS records (A records, CNAME records etc.) and returns the actual IP address. It is "authoritative" because its answer is final.
DNS Cache A temporary store of recently resolved domain name to IP address mappings. Both the client device and the recursive resolver maintain a cache. If a result is cached and has not expired (TTL has not elapsed), the full lookup process is skipped.
TTL (Time To Live) A value (in seconds) set by the domain owner that dictates how long a DNS record may be cached before it must be re-queried. After TTL expires, the resolver must perform the full lookup again.

HTTP Request / Response Cycle

HTTP (HyperText Transfer Protocol) defines the rules for communication between a web browser (client) and a web server. Because HTTP uses TCP at the Transport layer, a reliable connection must be established first via the three-way handshake before any data is transferred.

The sequence below shows every message exchanged when you type a URL into your browser and press Enter. Press Next Step to walk through it. This is a common 6-mark exam question.
TCP Handshake HTTP Exchange Connection Close
💻
Browser (Client)
192.168.1.50
🖥
Web Server
104.21.8.12 : port 80

Protocol Reference

All major networking protocols with their TCP/IP layer, port number, transport type, and purpose. Filter by layer to focus on what you need.

ProtocolLayerPortTransportPurpose

IP Addressing

Explore IPv4 binary conversion, MAC addresses, and IPv6. Use the drill to practise converting between decimal and binary - a common exam calculation.

Binary to Decimal

Toggle bits to build an IP address. Each bit's column weight is shown above.

0.0.0.0

Decimal to Binary

Enter a dotted decimal IP and see the full binary representation.

. . .

What is an IPv4 Address?

An IPv4 address is a 32-bit number written as four decimal octets separated by dots (e.g. 192.168.1.100). Each octet represents 8 bits and ranges from 0 to 255. IPv4 supports approximately 4.3 billion unique addresses.

The subnet mask determines which part of the address identifies the network and which part identifies the host within that network. Routers use the network address (IP AND subnet mask) to forward packets.

IPv4 is divided into classes (A /8, B /16, C /24) and private address ranges (10.x.x.x, 172.16-31.x.x, 192.168.x.x) that are not routed on the public internet.

MAC Address

A MAC (Media Access Control) address is a 48-bit hardware address permanently assigned to a network interface card (NIC) by the manufacturer. It is written as 6 pairs of hexadecimal digits separated by colons, e.g. A4:C3:F0:85:AC:2D.

MAC addresses operate at the Network Access layer and are used for delivery within a local network (LAN). Unlike IP addresses, they do not change when a device moves between networks.

The first 3 bytes (24 bits) identify the manufacturer (OUI - Organisationally Unique Identifier). The last 3 bytes identify the specific device.

MAC Address Explorer

Click any hex byte to change it. The binary breakdown is shown below.

First 3 bytes (OUI): A4:C3:F0 - identifies the manufacturer
Last 3 bytes: 85:AC:2D - identifies the specific device

IPv6

IPv4's 32-bit address space (approximately 4.3 billion addresses) is exhausted. IPv6 uses 128-bit addresses, providing approximately 3.4 x 1038 unique addresses - enough for every grain of sand on Earth to have trillions of addresses.

An IPv6 address is written as 8 groups of 4 hexadecimal digits separated by colons:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

Leading zeros within each group may be omitted, and one consecutive sequence of all-zero groups may be replaced with :::

2001:db8:85a3::8a2e:370:7334

IPv6 Address Breakdown

Total bits: 8 groups x 16 bits = 128 bits
Written as: 32 hexadecimal characters (each hex digit = 4 bits)
Unique addresses: 2128 = approx. 3.4 x 1038

IPv4 vs IPv6 Comparison

FeatureIPv4IPv6
Address length32 bits128 bits
FormatDotted decimalColon-separated hex
Address space~4.3 billion~3.4 x 1038
NAT needed?Yes (address exhaustion)No
HeaderVariable length, more complexFixed 40-byte header
StatusStill dominantGrowing adoption

Binary Conversion Drill

Convert the IP address to its binary representation. Write each octet as 8 bits, separated by dots.

Convert -- to binary:

Client-Server vs Peer-to-Peer

Two fundamentally different network models. In client-server, all clients communicate through a dedicated central server. In peer-to-peer (P2P), each device acts as both client and server, communicating directly with others. Press Animate to see a request flow through each model.

Client-Server

  • Centralised control and security
  • Easy to back up and manage data centrally
  • User accounts managed centrally
  • Consistent performance for clients
  • Server is a single point of failure
  • Expensive to set up and maintain
  • Server becomes a bottleneck under load

Peer-to-Peer (P2P)

  • No single point of failure
  • Cheap and easy to set up
  • Each peer can share resources directly
  • Scales well as more peers join
  • No centralised security or backup
  • Difficult to manage or audit devices
  • Performance varies between peers
Press Animate to see a request flow through each model simultaneously.