Refer to the following partial output from the `show ip route` command on a Cisco router:
text
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 10.0.0.1, GigabitEthernet0/0
S 172.20.0.0/16 [1/0] via 10.1.1.1, GigabitEthernet0/1
O 172.20.12.0/24 [110/30] via 10.2.2.2, GigabitEthernet0/2
D 172.20.12.64/27 [90/3072] via 10.3.3.3, GigabitEthernet0/3
S 172.20.12.64/30 [1/0] via 10.4.4.4, GigabitEthernet0/4
The router receives an IP packet destined for . Which TWO statements correctly describe how the router processes and forwards this packet?
- The router forwards the packet out interface GigabitEthernet0/3 toward next-hop IP 10.3.3.3.Answer
- The route 172.20.12.64/27 is selected over 172.20.0.0/16 because Longest Prefix Match takes precedence over Administrative Distance.Answer
- CThe router forwards the packet out interface GigabitEthernet0/4 because static routes with an Administrative Distance of 1 are preferred over EIGRP routes.
- DThe router forwards the packet out interface GigabitEthernet0/1 because the static route 172.20.0.0/16 has a lower Administrative Distance than the EIGRP route.
Answer
The router forwards the packet out interface GigabitEthernet0/3 toward next-hop IP 10.3.3.3, and the route 172.20.12.64/27 is selected over 172.20.0.0/16 because Longest Prefix Match takes precedence over Administrative Distance.
When a router receives a packet, it compares the destination IP address against all entries in its routing table. The matching route with the longest prefix length (most specific mask) is selected. Here, 172.20.12.70 matches 0.0.0.0/0 (/0), 172.20.0.0/16 (/16), 172.20.12.0/24 (/24), and 172.20.12.64/27 (/27). The /27 route is the longest match, so traffic is sent via next-hop 10.3.3.3 out GigabitEthernet0/3. Administrative Distance is ignored because prefix lengths differ.
Step-by-Step Solution
Key Concept
Router Forwarding Decision Logic and Longest Prefix Match (LPM) Precedence