Refer to the following partial IPv4 routing table output from 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
O 172.31.0.0/16 [110/20] via 10.1.1.1, GigabitEthernet0/0
D 172.31.50.0/24 [90/307200] via 10.2.2.2, GigabitEthernet0/1
S 172.31.50.96/28 [1/0] via 10.3.3.3, GigabitEthernet0/2
When the router receives an IP packet destined for , which TWO statements correctly describe how the router makes its forwarding decision?
- The router selects the route 172.31.50.96/28 because it has the longest matching prefix length (/28) for destination 172.31.50.100.Answer
- The packet is forwarded out interface GigabitEthernet0/2 toward next-hop IP address 10.3.3.3.Answer
- CThe router forwards the packet to next-hop 10.2.2.2 because dynamic routing protocols take precedence over static routes regardless of subnet mask.
- DThe router drops the packet because destination address 172.31.50.100 is outside the valid usable host range of the subnet 172.31.50.96/28.
Answer
The router forwards the packet out interface GigabitEthernet0/2 toward next-hop 10.3.3.3 after selecting 172.31.50.96/28 as the longest prefix match.
When an IPv4 packet arrives, a router evaluates all matching routes in its routing table and selects the entry with the longest prefix length (most specific subnet mask). Here, destination 172.31.50.100 matches 0.0.0.0/0 (/0), 172.31.0.0/16 (/16), 172.31.50.0/24 (/24), and 172.31.50.96/28 (/28). The /28 route is the longest match. Therefore, the router forwards the packet out interface GigabitEthernet0/2 to next-hop 10.3.3.3.
Step-by-Step Solution
Key Concept
Router Forwarding Decision Logic (Longest Prefix Match)