Refer to the following partial IPv4 routing table excerpt 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 10.50.16.0/20 [110/20] via 10.1.1.2, GigabitEthernet0/0
O 10.50.16.32/27 [110/30] via 10.3.3.2, GigabitEthernet0/2
D 10.50.16.32/28 [90/307200] via 10.2.2.2, GigabitEthernet0/1
The router receives two separate IPv4 unicast packets with destination IP addresses 10.50.16.45 and 10.50.16.20. Which two statements accurately describe how the router forwards these packets?
- The packet destined for 10.50.16.45 is egressed out GigabitEthernet0/1 because the 10.50.16.32/28 entry represents the longest prefix match.Cevap
- BThe packet destined for 10.50.16.45 is egressed out GigabitEthernet0/0 because static and default routes take administrative priority over EIGRP.
- CThe packet destined for 10.50.16.20 is dropped because it fails to match the 10.50.16.32/27 or 10.50.16.32/28 specific subnets.
- The packet destined for 10.50.16.20 is egressed out GigabitEthernet0/0 because 10.50.16.0/20 is the most specific matching prefix for that destination address.Cevap
Cevap
The router forwards the packet destined for 10.50.16.45 out interface GigabitEthernet0/1 using the 10.50.16.32/28 route, and forwards the packet destined for 10.50.16.20 out interface GigabitEthernet0/0 using the 10.50.16.0/20 route.
When a router receives a packet, it compares the packet's destination IP address against all routing table entries and selects the route with the most specific subnet mask (the longest prefix length). For the destination host 10.50.16.45, the route 10.50.16.32/28 has a 28-bit mask, which is more specific than /27, /20, or /0, so it is egressed out interface GigabitEthernet0/1. For the destination host 10.50.16.20, it falls within the subnet range 10.50.16.0 to 10.50.31.255 associated with the 10.50.16.0/20 prefix. Since host address .20 does not reach the starting boundary .32 of the /27 or /28 subnets, 10.50.16.0/20 is its most specific matching route, and the packet is egressed out interface GigabitEthernet0/0.
Adım Adım Çözüm
Anahtar Kavram
Longest Prefix Match (LPM) Decision Logic