Header
Home | Set as homepage | Add to favorites
  Search the Site     » Advanced Search
Sections
Syndication


Blogroll:

||||| ALL Cisco-Network ARTICLES |||||  
CCIE Journey,
The CCIE Journey,


Reaching the Destination

Nov 27,2008 by alperen

image

Reaching the Destination
After a router receives a packet, the router removes the data-link framing, or the layer 2 header
and trailer, if one exists, in order to find the layer 3 destination address. Once the destination
Internal BGP 200
Unknown 255
TABLE 1 . 3 Default Administrative Distance (continued)
Source of Route Default Administrative Distance
Components of Routing Data 21
address is read, the router looks in its routing table for a route to the destination address. Assuming
a match for the destination is in the routing table, the router reads the next-hop address or exit
interface to reach the destination from the entry. If the router reads a next-hop address, it will
perform a recursive lookup on the address. This means that the router looks at the network
portion of the next-hop address and then looks in its own routing table for an entry matching this
destination address.
The router continues this process until it arrives upon an entry that designates a connected
exit interface instead of a next-hop address. Once this is accomplished, the router switches the
packet to the outbound interface’s buffer. The router discovers the type of connection between
the outbound interface and the next-hop address. After the connection type has been discovered,
the packet is encapsulated in the appropriate layer 2 encapsulation for the connection. The
packet will now be placed on the medium and forwarded to the next hop. This continues until
the packet reaches its destination.
The entire process of how a packet gets forwarded toward the destination can be broken
down into five steps:
1. As the frame’s header arrives at the router’s inbound interface, the MAC process checks
the hardware destination address against the burned-in MAC address of the interface, the
broadcast address, and any multicast addresses that the interface may be listening for.
If the MAC process finds that the hardware destination address is applicable, a cyclic
redundancy check (CRC) is performed on the frame to make sure it’s not corrupt. If the
frame passes CRC, the packet is pulled from the frame. The frame is discarded, and
the packet is stored in the router’s main memory.
2. The router searches the routing table for the longest match to the destination address found
in the packet’s header. If the router finds no match, and a default gateway does not exist,
the router will discard the packet and send an ICMP destination unreachable message to the
originating device. If the router does find a match, it will discover the next-hop address or
the connected interface for this route. If the route points to a connected interface, a recursive
lookup doesn’t need to be performed and the next step can be skipped.
3. Once the next-hop address is known, the router performs a recursive lookup. This is
performed to locate the directly connected interface on the router to forward the packet
out; it may take multiple iterations before an entry with an exit interface is found. If any
of the recursive lookups points to an IP address that the routing table has no entry for
and the default gateway is not set, the router will discard the packet and notify the
packet’s source via ICMP.
4. The packet is now switched to the outbound interface’s buffer. Assuming that the outbound
interface uses layer 2 addressing, the router attempts to learn the MAC address or
layer 2 identifier of the next-hop interface in order to map the layer 3 address to a layer 2
address. The router looks in the appropriate local table such as an ARP cache. In the case
of ARP, if the layer 2 mapping is not found, the router will broadcast an ARP request
through the outbound interface to the locally connected segment to request the MAC
address of the interface associated with the local segment of the next-hop device, which
may be another router or the final destination. Under normal circumstances, the next-hop
device sends an ARP reply with its MAC address. All other devices hearing the broadcast
22 Chapter 1  Routing Principles
will realize that the ARP request is not for them based on layer 3 address information in the
ARP header; they will not reply to the request, but instead quietly discard the ARP request
packet. No layer 2 information is necessary for many point-to-point media. If a frame is
placed on the wire, only the intended recipient will receive it, because it is the only other
device on the wire.
5. At this point, the type of connection between the directly connected interface and the nexthop
interface is known. The router encapsulates the packet in the appropriate data-link
frame for the type of connection. The outbound interface places the frame with the layer 2
address of the next-hop device on the wire. This process continues at each router that the
packet encounters until it reaches its destination.
Figure 1.1 gives you a visual example of the life of a packet:
1. The packet is encapsulated with the layer 2 frame structure of the local network and sent
from the originator to its default gateway.
2. The frame is received by R1; the data-link frame is removed; the destination address is
found in the routing table; the next hop is discovered; the outbound interface is discovered;
and the packet is switched to the outbound interface buffer.
3. The outbound interface receives the packet and resolves the layer 3 address to the layer 2
address of the next-hop router, and the packet is framed in the data-link framing of the outbound
interface. The frame, with the layer 2 address of the next-hop router, is then placed
on the medium.
4. The frame is received and dismantled by R2. The destination Network layer address is
found in the routing table, which points to a directly connected interface. The packet
is switched to the outbound interface buffer.
5. The outbound interface maps the layer 3 address to a layer 2 address that is needed to reach
the destination. The packet is framed according to the interface’s layer 2 technology and is
then placed on the medium.
6. The packet arrives at its destination.
So far, you have followed the life of a packet. You should have a grasp on what a routing
table is, how that table is populated, and how a packet reaches its destination. You now need
to focus on verifying what routes are in a routing table and what tools are used to test and
troubleshoot actual connectivity to the destinations they represent.
The life of a packet

244 times read

Related news

» Components of Routing Data
by alperen posted on Nov 27,2008
» Default Administrative Distance (continued)
by alperen posted on Nov 27,2008
» The process of translating inside local addresses
by alperen posted on Nov 27,2008
» Routing Tables
by alperen posted on Nov 27,2008
» Broadcast message on a network
by alperen posted on Dec 17,2008
Did you enjoy this article?
(total 0 votes)

comment Comments (0 posted) 

More Top News
CCSP-Cisco Certified Security Professional
Most Popular
Most Commented
Featured Author