What is a router? Explain its functions in a computer network.
5 marks
Question source
- Exam year
- 2083 BS / 2026 AD
- Level
- Fifth Level
- Paper
- Paper II – Information Technology and Management
- Section
- Section B: Medium Answer Questions
Model answer
Router
A router is a networking device that operates at Layer 3 (Network Layer) of the OSI model. It connects two or more different networks and forwards data packets between them based on IP addresses using a routing table. Routers are the core devices of the Internet and WANs.
Unlike a switch (which connects devices in the same network using MAC addresses), a router connects different networks.
Functions of a Router in a Computer Network
1. Packet Forwarding and Routing The router examines the destination IP address of each incoming packet and uses its routing table to determine the best path (next hop) to forward the packet toward its destination. If multiple paths exist, the router selects the optimal one based on metrics like hop count, bandwidth, or delay.
2. Inter-Network Connectivity Routers connect different networks together — for example, a company's LAN to the Internet (WAN), or two branch offices over a WAN link. Without routers, communication between different networks would be impossible.
3. Routing Table Maintenance Routers maintain a routing table that maps destination network addresses to outgoing interfaces. This table is populated by:
- Static routes — manually configured by administrators
- Dynamic routing protocols — OSPF (Open Shortest Path First), RIP (Routing Information Protocol), BGP (Border Gateway Protocol) automatically discover and update routes
4. Network Address Translation (NAT) Routers in home and office networks perform NAT — they map multiple private IP addresses (192.168.x.x) on the internal network to a single public IP address for communication with the Internet. This conserves IPv4 addresses and provides a layer of security.
5. DHCP Server Many routers include a DHCP (Dynamic Host Configuration Protocol) server that automatically assigns IP addresses to devices joining the network.
6. Traffic Management and Quality of Service (QoS) Routers can prioritize certain types of traffic (e.g., VoIP calls over file downloads) to ensure latency-sensitive applications perform well.
7. Basic Packet Filtering and Security Routers can apply Access Control Lists (ACLs) to permit or deny traffic based on IP address, port, or protocol, providing basic firewall functionality.