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

Published by Patrick Mutisya · 14 days ago

ICT 0417 – Networks and the Effects of Using Them: Routers

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

What Is a Router?

A router is a networking device that forwards data packets between computer networks. It creates an “intersection” where multiple networks meet and decides the best path for each packet.

Key Functions of a Router

FunctionDescriptionTypical Use in IGCSE Context
Packet ForwardingExamines the destination IP address of each packet and sends it toward its target network.Moving data from a home PC to a web server on the Internet.
Network Address Translation (NAT)Translates private IP addresses used inside a local network to a single public IP address for Internet access.Allows many devices to share one ISP‑provided IP address.
DHCP ServerAutomatically assigns IP addresses, subnet masks, gateway and DNS information to devices on the local network.Simplifies setup of laptops, tablets and smartphones in a school lab.
Firewall FilteringBlocks or permits traffic based on predefined rules, enhancing security.Prevents external attacks on a school’s internal network.
Wireless Access Point (optional)Provides Wi‑Fi connectivity for wireless devices.Enables students to connect laptops and tablets without cables.

How a Router Connects Devices to the Internet

  1. Physical Connection: The router’s WAN (Wide Area Network) port is linked to the ISP’s modem using an Ethernet cable.
  2. IP Address Assignment: The ISP assigns a public IP address to the router’s WAN interface.
  3. Local Network Setup: The router’s LAN (Local Area Network) ports and/or Wi‑Fi create a private network, typically using IP addresses in the range 192.168.0.0/16.
  4. DHCP Distribution: Devices that connect (by cable or Wi‑Fi) request an IP address; the router’s DHCP server replies with a unique private address, subnet mask, default gateway (the router’s LAN IP) and DNS server details.
  5. Data Transmission: When a device requests a web page, the packet is sent to the router, which:

    1. Looks up the destination IP address.
    2. Uses its routing table to determine the next hop (usually the ISP’s network).
    3. Applies NAT, replacing the private source address with the router’s public address.
    4. Sends the packet out the WAN port toward the Internet.

  6. Return Path: Responses from the web server travel back to the router’s public address, which then uses NAT tables to forward the data to the original private device.

Storing Computer Addresses in a Router

Routers maintain several tables that store address information:

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

Routing Data Packets – The Process in Detail

When a router receives a packet, it follows this algorithm:

  1. Check the packet’s destination IP address.
  2. Search the routing table for the longest‑prefix match.
  3. If a matching entry is found, forward the packet to the indicated next‑hop interface.
  4. If no match exists, send the packet to the default gateway (often the ISP).
  5. Update the packet’s TTL (Time‑to‑Live) field; if TTL reaches zero, discard the packet and send an ICMP “Time Exceeded” message.
  6. Apply any firewall or QoS (Quality of Service) rules before transmission.

Key Terms for Revision

  • IP address – unique identifier for a device on a network.
  • Subnet mask – determines the network and host portions of an IP address.
  • Gateway – the router’s LAN address that devices use to reach external networks.
  • Packet – a formatted unit of data transmitted over a network.
  • Routing table – a set of rules that tells the router where to send packets.
  • NAT – converts private IP addresses to a public address for Internet access.
  • DHCP – protocol that automatically assigns IP configuration to devices.

Suggested Diagram

Suggested diagram: A home network showing a router connected to an ISP modem (WAN), LAN ports linking to a desktop PC and a network switch, and a wireless signal reaching a laptop and a smartphone. Include labels for public IP, private IP range, DHCP server, and NAT process.

Quick Revision Checklist

  1. Can you explain why a router is needed between a local network and the Internet?
  2. Do you know how a router assigns IP addresses to devices?
  3. Can you describe what NAT does and why it is important?
  4. Are you able to outline the steps a router takes to forward a data packet?
  5. Do you understand the purpose of the ARP, routing, and NAT tables?