Question

Difficulty: MediumRouting Table Components

An administrator inspects the IPv4 routing table on a Cisco router and observes the following partial output:

text
Codes: C - connected, S - static, D - EIGRP, O - OSPF, B - BGP

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 4 subnets, 4 masks
O 10.200.0.0/16 [110/50] via 172.16.1.1, 00:24:12, GigabitEthernet0/1
D 10.200.64.0/18 [90/2172416] via 172.16.2.1, 02:15:04, GigabitEthernet0/2
S 10.200.64.0/24 [120/0] via 172.16.3.1, GigabitEthernet0/3
B 10.200.64.0/20 [20/100] via 172.16.4.1, 05:10:20, GigabitEthernet0/4

Which two statements accurately describe how the router will forward packets based on these routing table components? (Select two.)

  1. Packets destined for 10.200.64.50 are forwarded out interface GigabitEthernet0/3 because the /24 prefix length represents the longest prefix match.Answer
  2. Packets destined for 10.200.70.15 are forwarded via next-hop 172.16.4.1 out interface GigabitEthernet0/4.Answer
  3. C
    Packets destined for 10.200.64.50 are forwarded out interface GigabitEthernet0/2 because EIGRP has a lower administrative distance (90) than the static route (120).
  4. D
    Packets destined for 10.200.70.15 are forwarded via next-hop 172.16.2.1 because the /18 route has a lower metric than the BGP route.

Answer

Packets destined for 10.200.64.50 are forwarded out GigabitEthernet0/3 due to the longest prefix match (/24), and packets destined for 10.200.70.15 are forwarded via next-hop 172.16.4.1 out GigabitEthernet0/4 because /20 is the most specific matching prefix.
A Cisco router forwards packets by comparing the destination IP address against the routing table using the Longest Prefix Match rule. For 10.200.64.50, the /24 entry offers the highest mask length among all matching routes, directing traffic out GigabitEthernet0/3. For 10.200.70.15, the host IP address falls within the 10.200.64.0/20 range (10.200.64.0 to 10.200.79.255), which is more specific than the /18 or /16 entries and excludes the /24 entry. Therefore, it uses the BGP route via 172.16.4.1.

Step-by-Step Solution

1
Determine the subnet ranges and prefix lengths for all candidate entries in the routing table snippet.
10.200.0.0/16 covers 10.200.0.0 - 10.200.255.255 (/16);
10.200.64.0/18 covers 10.200.64.0 - 10.200.127.255 (/18);
10.200.64.0/20 covers 10.200.64.0 - 10.200.79.255 (/20);
10.200.64.0/24 covers 10.200.64.0 - 10.200.64.255 (/24).
Routing decisions prioritize prefix length (specificity) over all other route parameters.
2
Evaluate destination IP address 10.200.64.50.
Matches /16, /18, /20, and /24 routes. The /24 static route is the longest match.
24 bits is greater than 20, 18, and 16 bits. Administrative distance (120 vs 90) is irrelevant across different prefix lengths.
3
Evaluate destination IP address 10.200.70.15.
Matches /16, /18, and /20 routes, but falls outside the /24 subnet. The /20 BGP route is the longest matching route.
70 is within the range 64-79 (/20), but outside 64.0-64.255 (/24). The next-hop is 172.16.4.1 via GigabitEthernet0/4.

Key Concept

Longest Prefix Match Forwarding Logic
Rate this question