Soru

Zorluk: OrtaRouter Forwarding Decision Logic

A Cisco router receives an IPv4 packet on an ingress interface that must be forwarded to a remote destination. Place the router forwarding decision and processing steps in the correct chronological order from packet arrival to egress transmission.

  1. 1Extract the destination IPv4 address from the incoming packet header.
  2. 2Search the routing table for matching entries and select the route with the longest prefix mask.
  3. 3Identify the designated exit interface and next-hop IPv4 address from the winning route entry.
  4. 4Query the ARP cache to resolve the Layer 2 MAC address associated with the next-hop IPv4 address.
  5. 5Decrement the IPv4 Time-to-Live (TTL) value, recalculate the header checksum, and encapsulate the packet into a new Layer 2 frame for egress.

Cevap

The correct sequence of router forwarding decision steps is: 1. Extract the destination IPv4 address from the incoming packet header. 2. Search the routing table for matching entries and select the route with the longest prefix mask. 3. Identify the designated exit interface and next-hop IPv4 address from the winning route entry. 4. Query the ARP cache to resolve the Layer 2 MAC address associated with the next-hop IPv4 address. 5. Decrement the IPv4 Time-to-Live (TTL) value, recalculate the header checksum, and encapsulate the packet into a new Layer 2 frame for egress.
When an IPv4 packet arrives on a router interface, the router first parses the IP header to extract the destination IP address. Next, it consults the routing table to find matching network prefixes, selecting the route entry with the longest prefix mask (most specific match). From this winning entry, the router extracts the designated exit interface and next-hop IP. It then queries its ARP cache to discover the destination MAC address corresponding to that next-hop IP. Finally, the router modifies the IP header by decrementing the TTL and recalculating the checksum, encapsulates the packet in a fresh Layer 2 frame with new source/destination MAC addresses, and transmits it out the exit interface.

Adım Adım Çözüm

1
Packet Ingress and IP Parsing
The router receives the Layer 2 frame, verifies the checksum, and extracts the target IPv4 destination address.
The router cannot perform routing table lookups until the destination IP address is identified.
2
Routing Table Lookup via Longest Prefix Match
The router compares the destination IP against entries in the routing table and selects the prefix with the greatest number of matching subnet bits.
Longest Prefix Match (LPM) is the fundamental rule governing packet forwarding lookup in IP routing tables.
3
Forwarding Information Extraction
The winning route entry reveals the egress interface and the next-hop gateway address.
The next-hop address and exit interface are required to prepare the outgoing data link layer frame.
4
Layer 2 Address Resolution
The router looks up the next-hop IPv4 address in its ARP table to find its corresponding MAC address.
Ethernet encapsulation requires a valid destination MAC address for the next-hop device on the multi-access segment.
5
Header Modification and Egress Encapsulation
The router decrements TTL, updates the IP checksum, wraps the packet in a new Layer 2 frame with local source MAC and next-hop destination MAC, and transmits it.
This completes the Layer 3 forwarding operation and sends the packet toward its final destination.

Anahtar Kavram

Router Forwarding Decision Logic and Packet Lifecycle
Bu soruyu puanla