An enterprise router with default settings maintains the following simplified IPv4 routing table excerpt:
text
Codes: C - connected, S - static, O - OSPF
O 10.12.0.0/16 [110/20] via 172.16.1.1, 00:15:30, GigabitEthernet0/0
S 10.12.32.0/20 [1/0] via 172.16.2.1, GigabitEthernet0/1
O 10.12.32.0/24 [110/50] via 172.16.3.1, 00:08:12, GigabitEthernet0/2
S 10.12.32.16/28 [200/0] via 172.16.4.1, GigabitEthernet0/3
The router receives an IP packet addressed to destination . Which two statements correctly describe how the router processes and forwards this packet?
- The router forwards the packet out GigabitEthernet0/3 toward next-hop 172.16.4.1 because the /28 route provides the longest prefix match.Answer
- The router evaluates prefix length before administrative distance, ignoring lower administrative distance values on broader subnets.Answer
- CThe router forwards the packet out GigabitEthernet0/1 because static routes with an Administrative Distance of 1 take precedence over Administrative Distance 200.
- DThe packet matches 10.12.32.0/24 via GigabitEthernet0/2 because host address 10.12.32.22 is outside the valid usable host range of the /28 network.
Answer
The router forwards the packet out GigabitEthernet0/3 toward 172.16.4.1 using the longest prefix match (/28), and ignores lower administrative distance routes because prefix length comparison takes precedence over administrative distance.
When a router receives a packet, it searches its routing table for all matching prefixes and selects the route with the longest prefix match (most specific subnet mask). The destination address 10.12.32.22 matches four entries, but 10.12.32.16/28 has the longest prefix length (/28). Thus, the router forwards the packet via GigabitEthernet0/3. Administrative Distance is ignored when comparing different prefix lengths.
Step-by-Step Solution
Key Concept
Router Forwarding Decision Logic (Longest Prefix Match)