What is the primary function of a router in a computer network?
2024
What is the primary function of a router in a computer network?
Answer: B. To connect multiple networks together — Network devices are classified by the OSI layer they operate at and the specific job they perform. A device operating at the data-link layer (Layer 2)…
- A.
To connect devices within the same network
- B.
To connect multiple networks together
- C.
To filter incoming traffic based on IP addresses
- D.
More than one of the above
- E.
None of the above
Attempted by 2565 students.
Show answer & explanation
Correct answer: B
Network devices are classified by the OSI layer they operate at and the specific job they perform. A device operating at the data-link layer (Layer 2) forwards frames between ports using MAC addresses within one network -- this is switching. A device operating at the network layer (Layer 3) forwards packets between separate networks using IP addresses and a routing table to select the best path -- this is routing. A device that inspects traffic against a configured rule set to permit or block it -- typically by IP address, port, or protocol -- is performing security/policy filtering, most commonly associated with a firewall or an access-control list.
The question asks for the primary, defining function of a router. Interconnecting separate networks and forwarding data between them based on destination IP addresses is exactly the Layer-3 routing job described above, so "To connect multiple networks together" captures the router's defining role.
Checking this against each of the other listed descriptions:
"To connect devices within the same network" describes Layer-2 frame forwarding by MAC address inside one broadcast domain -- a distinct job from forwarding between separate networks.
"To filter incoming traffic based on IP addresses" describes a policy-enforcement action -- permitting or dropping packets against a configured rule set. A router can indeed be configured to do this through an access-control list, but that is an optional capability added on top of forwarding; it is the defining job of a firewall, not of the device the question asks about.
"More than one of the above" would require at least two of the listed descriptions to each independently capture the primary, defining role. Only the Layer-3 inter-network forwarding description does so: Layer-2 switching within one network is a different device's defining job, and IP filtering is a configured extra rather than a defining role.
"None of the above" would require that not one of the listed descriptions names the primary function the question asks about. The Layer-3 description -- forwarding packets between separate networks using destination IP addresses -- does name it, so that condition is not met.
Cross-checking against the OSI model confirms this: any device that makes forwarding decisions purely from a Layer-3 destination IP address, across separate broadcast domains, is by definition performing routing -- confirming that connecting multiple networks together is the router's primary function. This also matches the official answer key for the BPSC TRE 3.0 (Class 11-12) Computer Science paper held on 22 July 2024, from which this question is taken.