Network Design and Operations

A router's routing table holds three routes: a static route 10.0.0.0/8 (next hop router A, administrative distance 1), 10.1.0.0/16 learned by OSPF (router B, 110) and 10.1.1.0/24 learned by RIP (router C, 120). To which router is a packet for 10.1.1.5 sent?

  1. ARouter A (the static route)
  2. BRouter B (the OSPF route)
  3. CRouter C (the RIP route)
Show answer and explanation

Answer: C. Router C (the RIP route)

The three routes have different prefix lengths, so each is installed in the routing table as a separate route. When forwarding a packet, the router chooses the matching route with the longest prefix and does not compare administrative distances. 10.1.1.5 matches all three, but the longest, the /24 RIP route, is chosen and the packet goes to router C. Administrative distance is used only to decide which of several routes to the same destination with the same prefix length goes into the routing table.

  • A. The static route has the highest preference, but the /8 is the shortest match, so it is not chosen.
  • B. The /16 also matches, but the longer /24 matches too, so it is not chosen.
  • C. Correct. The /24 route, the longest match, is chosen.
Practice this topic Back to topic

Related calculators

Books on Network Design and Operations Ad

As an Amazon Associate I earn from qualifying purchases.

More Network Design and Operations questions

  1. Which statement correctly describes a link-state routing protocol?
  2. In OSPF, router R1 has three paths to a network beyond R4. Path A uses a 10 Gbps link R1–R5 and a 1 Gbps link R5–R4; path B is a direct 100 Mbps link R1–R4; and path C uses 1 Gbps links R1–R2, R2–R3 and R3–R4. The cost of each link is "reference bandwidth 10 Gbps ÷ link bandwidth", and the cost beyond R4 is the same for all paths. Which path does R1 choose?
  3. On the internet, which protocol exchanges routing information between the networks run by organizations such as ISPs (ASes, autonomous systems) and chooses routes based on attributes such as the sequence of ASes a route has passed through (AS_PATH) and on each organization's policy?
  4. Hosts in VLAN 20 (192.168.20.0/24) are to get addresses from a DHCP server, 10.0.0.5, on another network. A DHCP relay agent is therefore configured on the L3 switch interface 192.168.20.1, which is VLAN 20's default gateway. Which statement correctly describes what the relay agent does?
  5. Which DNS resource record specifies the mail server that receives email addressed to a domain?

Comparisons in this topic