Describe the role and function of a router in a network
2.1 Networks including the Internet
Objective – Describe the role and function of a router in a network
A router is a networking device that interconnects two or more separate networks and forwards data packets between them. It operates at the Network layer (Layer 3) of the OSI model, using logical (IP) addresses to decide the best path for each packet.
Why a Router is Needed – Purpose & Benefits
Inter‑network communication: Switches and hubs work at Layer 2 and can only forward frames within the same broadcast domain. A router is required to move traffic between different IP sub‑nets or between a LAN and a WAN.
Traffic control: By separating broadcast domains, a router reduces unnecessary traffic, improves performance and adds a layer of security.
Scalability: Routers allow many small networks to be combined into larger, hierarchical structures such as the Internet.
Typical LAN Hardware (Cambridge syllabus)
Component
Function in a LAN
Network Interface Card (NIC)
Provides a physical connection for each device to the LAN.
Switch
Connects multiple NICs and forwards frames within the same LAN (Layer 2).
Router
Connects the LAN to other LANs, WANs or the Internet (Layer 3).
Cabling (twisted‑pair, fibre, etc.)
Physical medium for data transmission.
Caption: Each device’s role as defined in the Cambridge syllabus – the router is the only Layer 3 device, linking the LAN to external networks.
Key Functions of a Router
Packet forwarding – Receives a packet, reads the destination IP address and sends it out the appropriate interface.
Routing decision – Uses a routing table and routing algorithms (e.g., distance‑vector, link‑state) to select the optimal path.
Network segmentation – Creates separate broadcast domains, preventing broadcast storms across networks.
Network Address Translation (NAT) – Maps many private IP addresses to a single public address, enabling multiple devices to share one Internet connection.
DHCP relay – Forwards DHCP requests from a client on one subnet to a DHCP server on another.
Security – Implements Access Control Lists (ACLs) and firewall rules to filter traffic by IP address, port or protocol.
Quality of Service (QoS) – Prioritises time‑sensitive traffic such as VoIP or video streaming.
Wireless gateway (optional) – Many routers combine Ethernet ports with Wi‑Fi radios, providing both wired and wireless connectivity while using the same routing engine.
Router Operation – Step‑by‑Step Process
Incoming packet arrives on an interface.
The router reads the packet’s destination IP address.
It looks up the destination in its routing table.
If a matching entry exists, the router determines the next‑hop address and the outgoing interface.
The packet header is updated (TTL decremented, checksum recalculated).
The packet is transmitted out the selected interface.
Key takeaway: A router decides “where to send next” for every packet by consulting its routing table and then forwards the packet out the appropriate link.
Routing Table Example
Destination Network
Subnet Mask
Next Hop
Interface
Metric
192.168.1.0
255.255.255.0
Direct
eth0
0
10.0.0.0
255.0.0.0
192.168.1.254
eth0
10
0.0.0.0
0.0.0.0
203.0.113.1
eth1
20
Mathematical View of Routing
The shortest‑path problem can be expressed as:
\$\min{p \in P{s,d}} \sum_{(u,v) \in p} w(u,v)\$
where Ps,d is the set of all possible paths from source s to destination d, and w(u,v) is the cost (metric) of traversing link (u,v). Algorithms such as Dijkstra’s compute this minimum efficiently.
Router Placement in Common Topologies
Star topology: The router sits at the centre, linking the star‑wired LAN to a WAN or the Internet.
Mesh topology: Routers (or layer‑3 switches) act as nodes, providing multiple redundant paths between sites.
Hybrid topology: A combination of star and mesh; routers link the individual star‑sub‑networks together.
Suggested diagram – two star‑LANs (each with a switch) connected by a router. The router is highlighted in red.
Routers in Different Network Contexts
Context
Typical Use of a Router
LAN‑to‑LAN
Connects two local area networks, e.g., two office floors.
LAN‑to‑WAN
Provides the gateway from a campus LAN to the Internet or a corporate WAN.
WAN‑to‑WAN (Backbone)
Links two ISP networks or two data‑centre sites using high‑speed links.
Support for Client‑Server and Peer‑to‑Peer Models (exam‑style examples)
Client‑server: A student on Subnet A (192.168.1.0/24) opens a web browser to access a database server on Subnet B (10.0.0.0/8). The router receives the TCP/IP request, looks up the destination network (10.0.0.0), forwards the packet to the next‑hop, and returns the server’s response to the client.
Peer‑to‑peer: Two gamers are on different subnets (192.168.1.0/24 and 192.168.2.0/24). When they start a multiplayer session, each game client sends packets to the other’s IP address; the router routes those packets across the two LANs, enabling direct communication without a central server.
Thin‑Client vs. Thick‑Client Environments (optional extension)
Extension: Thin clients rely heavily on the network for processing, so router bandwidth, latency and QoS settings have a greater impact on user experience. Thick clients perform most processing locally; the router mainly handles occasional data transfers and updates.
Wired vs. Wireless Networks (concise comparison)
Wired (Ethernet): Uses copper or fibre cables, provides a stable, high‑capacity link with low latency.
Wireless (Wi‑Fi): Uses radio waves (802.11), offers mobility but can be affected by interference and typically has higher latency than wired links.
In both cases the router’s routing function (IP‑based forwarding) is identical; only the physical layer differs.
Why Routers Are Essential for the Internet
They interconnect millions of autonomous systems, forming the global Internet backbone.
Routing protocols such as BGP exchange reachability information, allowing data to travel across diverse networks.
Routers abstract complex internal topologies behind a single IP prefix, enabling scalability.
Summary
The primary role of a router is to direct traffic between distinct networks using logical IP addresses. By maintaining routing tables, performing NAT, relaying DHCP, enforcing ACL‑based security, supporting QoS, and handling both wired and wireless links, routers provide efficient, reliable and secure communication across LANs, WANs, and the global Internet. They also enable client‑server, peer‑to‑peer and cloud‑based environments, making them indispensable in modern networking.
Support e-Consult Kenya
Your generous donation helps us continue providing free Cambridge IGCSE & A-Level resources,
past papers, syllabus notes, revision questions, and high-quality online tutoring to students across Kenya.