Know and understand the operation and purpose of a router including connecting networks and devices to the internet, storing computer addresses in a router, routing data packets

4. Networks and the Effects of Using Them

Objective

Know and understand the operation and purpose of a router, including:

  • Connecting networks and devices to the Internet
  • Storing computer addresses in a router
  • Routing data packets between networks

4.1 Routers – Operation & Purpose

What Is a Router?

A router is a Layer 3 (Network‑layer) device that forwards data packets between different IP networks. It works like a road‑junction, examining each packet’s destination address and choosing the best “road” (next‑hop) for it.

Key Functions of a Router

FunctionDescriptionTypical IGCSE Example
Packet ForwardingReads the destination IP address and sends the packet toward its target network.A home PC requests a web page from a server on the Internet.
Network Address Translation (NAT)Maps many private IP addresses to a single public IP address, conserving public address space and providing a basic security barrier.Ten devices share one ISP‑provided IP address.
DHCP ServerAutomatically assigns IP address, subnet mask, default gateway and DNS details to devices on the LAN.Laptops, tablets and smartphones receive configuration instantly in a school lab.
Firewall / ACL FilteringApplies rules that permit or block traffic, protecting the internal network from unwanted inbound connections.Blocks external attempts to access a school’s internal file server.
Wireless Access Point (optional)Provides IEEE 802.11 Wi‑Fi connectivity for wireless devices.Students connect laptops and tablets without cables.

Why NAT Is Needed

  • IP‑address scarcity: The world has far fewer public IPv4 addresses than devices; NAT lets many private devices share one public address.
  • Basic security: Private addresses are not visible on the Internet, so external hosts cannot directly address devices inside the LAN.
  • Simplified management: Changing the ISP’s public address does not require re‑configuring every internal device.

Storing Computer Addresses in a Router

Routers keep several tables that act as “address books”.

  • ARP Table – maps IP addresses to MAC (hardware) addresses on the local LAN.
  • Routing Table – lists destination networks, the next‑hop IP address and the outgoing interface.
  • NAT Translation Table – records active private‑to‑public address mappings for each session.

Routing Protocols & the Default Gateway

  • Static routing – the administrator manually enters routes into the routing table. Predictable and common in small home or school networks.
  • Dynamic routing – the router learns routes automatically.

    • RIP (Routing Information Protocol): Uses hop count as a metric; updates are broadcast every 30 seconds.
    • OSPF (Open Shortest Path First): Uses link‑state advertisements and calculates the shortest‑cost path.
    • When a router receives an update, it adds or modifies entries in its routing table without user intervention.

  • Default gateway – the router’s LAN IP address (e.g., 192.168.0.1). All devices send packets destined for any network outside their own subnet to this address.

How a Router Connects Devices to the Internet

  1. Physical connection: The router’s WAN port is linked to the ISP’s modem with an Ethernet cable.
  2. Public IP assignment: The ISP provides a public IP address to the router’s WAN interface (often via DHCP).
  3. Local network creation: LAN ports and/or Wi‑Fi create a private network, usually using the 192.168.0.0/16 range.
  4. DHCP distribution: Devices request an IP address; the router replies with a unique private address, subnet mask, default gateway (router’s LAN IP) and DNS server details.
  5. Data transmission – example (web request):

    1. The device sends the packet to the router’s LAN IP (default gateway).
    2. The router looks up the destination IP in its routing table.
    3. Finding no more‑specific match, it forwards the packet to the WAN interface (the ISP’s network).
    4. Before leaving, NAT replaces the private source address with the router’s public address.
    5. The packet travels across the Internet to the web server.

  6. Return path: Responses arrive at the router’s public address, the NAT table translates them back to the original private address, and the router forwards the data to the correct device.

Routing Data Packets – Detailed Process

When a router receives a packet it follows this algorithm:

  1. Read the packet’s destination IP address.
  2. Search the routing table for the longest‑prefix (most specific) match.
  3. If a match is found, select the indicated next‑hop interface; otherwise use the default gateway.
  4. Apply any firewall/ACL rules; drop the packet if a rule denies it.
  5. Decrement the TTL (Time‑to‑Live) field; if TTL reaches 0, discard the packet and send an ICMP “Time Exceeded” message.
  6. Perform NAT (if required) and forward the packet out the chosen interface.

Common Network Devices – Quick Comparison

DevicePrimary PurposeOSI Layer(s)Typical School Use
RouterConnects different networks; forwards packets between them.Network – Layer 3Provides Internet access and Wi‑Fi for classrooms.
SwitchConnects multiple devices within the same LAN; forwards Ethernet frames.Data Link – Layer 2Expands the number of wired ports in a computer lab.
HubSimple multi‑port repeater; broadcasts incoming signals to all ports.Physical – Layer 1Rarely used today; sometimes for basic demonstration of collisions.
Network Interface Card (NIC)Enables a device to connect to a network (wired or wireless).Physical & Data Link – Layers 1‑2Built‑in Ethernet or Wi‑Fi adapters in laptops and desktops.
BridgeConnects two LAN segments and filters traffic based on MAC addresses.Data Link – Layer 2Joins separate classroom networks without routing.

Wi‑Fi Standards

StandardFrequency (GHz)Typical Max Speed (Mbps)Notes
802.11a554Less interference, older equipment.
802.11b2.411Long range, low speed.
802.11g2.454Widely used, compatible with b.
802.11n2.4 / 5600MIMO, good for classrooms.
802.11ac51300+High‑density environments.
802.11ax (Wi‑Fi 6)2.4 / 52400+Improved efficiency, lower latency.

Wi‑Fi, Bluetooth and the Router’s Wireless Access Point

  • Modern routers include a built‑in Wireless Access Point (WAP) that broadcasts Wi‑Fi using the IEEE 802.11 standards listed above.
  • Wi‑Fi provides high‑speed, short‑range networking (typically up to 30 m indoors) for laptops, tablets and smartphones.
  • Bluetooth (IEEE 802.15.1) is a Personal Area Network (PAN) protocol for very short‑range, low‑power links (e.g., wireless mouse, headset). It is not routed by the router and does not use IP addresses.
  • Secure Wi‑Fi uses WPA2‑Personal or WPA3‑Personal encryption; the router’s admin password should be changed from the factory default.

Cloud Computing – The Router’s Role

Cloud services such as Google Drive, Microsoft 365 or virtual learning environments are accessed over the Internet. The router enables this in three key ways:

  1. Internet connectivity: The WAN link carries all traffic to and from cloud servers.
  2. DNS resolution: The router forwards DNS queries (via the ISP’s DNS or a configured server) so devices can translate domain names (e.g., drive.google.com) into IP addresses.
  3. Quality of Service (QoS) & Port‑forwarding: For real‑time cloud applications (video‑conferencing, online exams) the router can prioritise traffic and keep required ports open, ensuring a stable connection.
  4. NAT allows many devices to reach cloud servers using a single public IP address.

Key Terms for Revision

  • IP address – Unique numeric identifier for a device on an IP network.
  • Subnet mask – Determines which part of an IP address is the network and which is the host.
  • Gateway (default gateway) – The router’s LAN IP address used by devices to reach external networks.
  • Packet – Formatted unit of data transmitted at the Network layer.
  • Routing table – Set of rules that tells the router where to send packets.
  • NAT (Network Address Translation) – Converts private IP addresses to a public address for Internet access.
  • DHCP (Dynamic Host Configuration Protocol) – Automatically assigns IP configuration to devices.
  • ARP (Address Resolution Protocol) – Resolves IP addresses to MAC (hardware) addresses on the local LAN.
  • TTL (Time‑to‑Live) – Prevents packets from circulating indefinitely; decremented at each hop.
  • Static vs Dynamic routing – Manual entry of routes versus automatic learning via protocols such as RIP or OSPF.
  • ACL (Access Control List) – Set of firewall rules that permit or deny traffic.

Suggested Diagram

Home/School network diagram: ISP modem ⇄ WAN port of router (public IP). Router’s LAN ports connect to a switch, which connects to a desktop PC. The router also provides Wi‑Fi to a laptop and a smartphone. Labels should show the public IP, private IP range (e.g., 192.168.0.x), DHCP server, NAT process, default gateway (router’s LAN IP) and a simple routing‑table entry.

Quick Revision Checklist

  1. Can you explain why a router is required between a local network and the Internet?
  2. Do you know how a router stores computer addresses (ARP, routing, NAT tables)?
  3. Can you describe what NAT does, why it is needed, and the security benefit it provides?
  4. Are you able to outline the step‑by‑step process a router follows to forward a data packet, including firewall/ACL checking?
  5. Do you understand the difference between static and dynamic routing and the role of the default gateway?
  6. Can you identify the main functions of a router compared with switches, hubs, NICs and bridges?
  7. Do you know the basic security and safety measures related to routers and Wi‑Fi?
  8. Can you give an example of how a router enables access to cloud services (DNS, QoS, NAT, port‑forwarding)?