Soru

Zorluk: KolayRouter Forwarding Decision Logic

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 172.31.50.100172.31.50.100, which TWO statements correctly describe how the router makes its forwarding decision?

  1. 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.Cevap
  2. The packet is forwarded out interface GigabitEthernet0/2 toward next-hop IP address 10.3.3.3.Cevap
  3. C
    The router forwards the packet to next-hop 10.2.2.2 because dynamic routing protocols take precedence over static routes regardless of subnet mask.
  4. D
    The 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.

Cevap

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.

Adım Adım Çözüm

1
Evaluate all routing table entries that match the destination IP address 172.31.50.100.
The destination matches four entries: 0.0.0.0/0, 172.31.0.0/16, 172.31.50.0/24, and 172.31.50.96/28.
All four network routes encompass the destination IP address 172.31.50.100.
2
Apply the Longest Prefix Match (LPM) rule to select the best route.
172.31.50.96/28 is chosen because /28 is the longest prefix mask (most specific match).
A router always prefers the route with the highest number of matching network bits before considering Administrative Distance or Metric.
3
Identify the next-hop IP and egress interface configured for the winning route.
The entry 172.31.50.96/28 specifies next-hop 10.3.3.3 and egress interface GigabitEthernet0/2.
The router uses the exact forwarding attributes bound to the selected longest matching route entry.

Anahtar Kavram

Router Forwarding Decision Logic (Longest Prefix Match)
Bu soruyu puanla