Refer to the following routing table snippet from a Cisco router:
text
Codes: C - connected, S - static, R - RIP, B - BGP, O - OSPF, D - EIGRP
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
D 172.16.0.0/16 [90/2172416] via 10.10.10.2, GigabitEthernet0/0/1
O 172.16.32.0/19 [110/30] via 10.20.20.2, GigabitEthernet0/0/2
S 172.16.32.0/21 [1/0] via 10.30.30.2, GigabitEthernet0/0/3
O 172.16.36.0/24 [110/10] via 10.40.40.2, GigabitEthernet0/0/4
S* 0.0.0.0/0 [1/0] via 10.0.0.1, GigabitEthernet0/0/0
Which two statements correctly describe how the router forwards traffic based on this routing table? (Select two.)
- A packet destined for 172.16.36.50 is forwarded out GigabitEthernet0/0/4 because 172.16.36.0/24 provides the longest prefix match.Answer
- A packet destined for 172.16.40.1 is forwarded out GigabitEthernet0/0/2 because 172.16.32.0/19 is a more specific match than 172.16.0.0/16.Answer
- CA packet destined for 172.16.36.50 is forwarded out GigabitEthernet0/0/3 because the static route has a lower administrative distance than OSPF.
- DA packet destined for 172.16.34.100 is forwarded out GigabitEthernet0/0/1 because non-classful subnets like /21 are ignored in hardware forwarding tables.
Answer
The router forwards traffic destined for 172.16.36.50 out GigabitEthernet0/0/4 based on the /24 longest prefix match, and forwards traffic destined for 172.16.40.1 out GigabitEthernet0/0/2 based on the /19 longest prefix match.
When a router performs a destination lookup, it selects the route with the most specific match (longest prefix length, or highest subnet mask number). The administrative distance and routing metric are ignored during this lookup phase because the candidate routes represent different destination network ranges. Therefore, 172.16.36.50 matches the /24 route out GigabitEthernet0/0/4, while 172.16.40.1 falls within the 172.16.32.0/19 subnet (range 172.16.32.0 to 172.16.63.255) and matches /19 over /16.
Step-by-Step Solution
Key Concept
Router Forwarding Decision Logic (Longest Prefix Match Rule)
Estimated Time:2m 0s