QuestionQ895

IP Connectivity

A router has learned three destination prefixes: 10.0.0.0/8, 10.0.0.0/16, and 10.0.0.0/24.

When the show ip route command is run, which output is returned?

  • A Gateway of last resort is 172.16.1.1 to network 0.0.0.0o E2 10.0.0.0/8 [110/5] via 192.168.1.1, 0:01:00, Ethernet0o E2 10.0.0.0/16[110/5] via 192.168.2.1, 0:01:00, Ethernet1o E2 10.0.0.0/24[110/5] via 192.168.3.1, 0:01:00, Ethernet2
  • B Gateway of last resort is 172.16.1.1 to network 0.0.0.0o E2 10.0.0.0/8 [110/5] via 192.168.1.1, 0:01:00, Ethernet0
  • C Gateway of last resort is 172.16.1.1 to network 0.0.0.0o E2 10.0.0.0/24[110/5] via 192.168.3.1, 0:01:00, Ethernet2
  • D Gateway of last resort is 172.16.1.1 to network 0.0.0.0o E2 10.0.0.0/16[110/5] via 192.168.2.1, 0:01:00, Ethernet1o E2 10.0.0.0/24[110/5] via 192.168.3.1, 0:01:00, Ethernet2
Explanation

A routing table stores separately learned routes for different network prefixes, including both less-specific and more-specific matches. The longest-prefix rule is used when choosing how to forward traffic for a particular destination, but show ip route displays all installed routes. Because /8, /16, and /24 are distinct prefixes, all three appear in the routing table output.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!