A Cisco router displays the following output from the command `show ip route`:
text
Gateway of last resort is not set
10.45.12.0/24 is variably subnetted, 4 subnets, 4 masks
O 10.45.12.0/25 [110/20] via 192.168.1.2, 00:14:22, GigabitEthernet0/0
D 10.45.12.64/26 [90/307200] via 192.168.2.2, 00:08:15, GigabitEthernet0/1
S 10.45.12.80/28 [1/0] via 192.168.3.2
O E2 10.45.12.88/30 [110/20] via 192.168.4.2, 00:02:10, GigabitEthernet0/3
The router receives an IP packet with a destination address of . Which next-hop address and exit interface will the router select to forward this packet?
- 192.168.4.2 via GigabitEthernet0/3 because the /30 subnet mask provides the longest prefix match for the destination address.Cevap
- B192.168.3.2 because static routes have an administrative distance of 1, taking priority over dynamic routing protocols.
- C192.168.2.2 via GigabitEthernet0/1 because EIGRP has a lower administrative distance (90) than OSPF (110).
- D192.168.1.2 via GigabitEthernet0/0 because intra-area OSPF routes are preferred over external OSPF (O E2) routes.
Cevap
The router forwards the packet to next-hop address 192.168.4.2 via interface GigabitEthernet0/3 because 10.45.12.88/30 provides the longest prefix match.
When a router receives a packet, it compares the destination IP address against all entries in the routing table and forwards the packet using the route with the most specific subnet mask (longest prefix match). For destination 10.45.12.89, all four table entries encompass the address, but 10.45.12.88/30 has the longest prefix length (/30), making next-hop 192.168.4.2 via GigabitEthernet0/3 the correct path.
Adım Adım Çözüm
Anahtar Kavram
Longest Prefix Match (LPM) Rule
Tahmini Süre:1m 15s