web analytics

Network Layer Routing (Forwarding) Logic

Routers and end-user computers (called hosts in a TCP/IP network) work together to perform
IP routing. The host operating system (OS) has TCP/IP software, including the software
that implements the network layer. Hosts use that software to choose where to send
IP packets, often to a nearby router. Those routers make choices of where to send the IP
packet next. Together, the hosts and routers deliver the IP packet to the correct destination,
as shown in the example in Figure 4-1.
Free CISCO CCNA Routing and Switching ICND1 Study Guide
Figure 4-1 Routing Logic: PC1 Sending an IP Packet to PC2
The IP packet, created by PC1, goes from the top of the figure all the way to PC2 at the
bottom of the figure. The next few pages discuss the network layer routing logic used by
each device along the path.

NOTE The term path selection is sometimes used to refer to the routing process shown in
Figure 4-1. At other times, it refers to routing protocols, specifically how routing protocols
select the best route among the competing routes to the same destination.

Host Forwarding Logic: Send the Packet to the Default Router
In this example, PC1 does some basic analysis, and then chooses to send the IP packet to
the router so that the router will forward the packet. PC1 analyzes the destination address
and realizes that PC2’s address (168.1.1.1) is not on the same LAN as PC1. So PC1’s logic
tells it to send the packet to a device whose job it is to know where to route data: a nearby
router, on the same LAN, called PC1’s default router.

To send the IP packet to the default router, the sender sends a data-link frame across the
medium to the nearby router; this frame includes the packet in the data portion of the
frame. That frame uses data link layer (Layer 2) addressing in the data-link header to ensure
that the nearby router receives the frame.

NOTE The default router is also referred to as the default gateway.

R1 and R2’s Logic: Routing Data Across the Network
All routers use the same general process to route the packet. Each router keeps an IP routing
table. This table lists IP address groupings, called IP networks and IP subnets. When a
router receives a packet, it compares the packet’s destination IP address to the entries in the
routing table and makes a match. This matching entry also lists directions that tell the router
where to forward the packet next.

In Figure 4-1, R1 would have matched the destination address (168.1.1.1) to a routing
table entry, which in turn told R1 to send the packet to R2 next. Similarly, R2 would have
matched a routing table entry that told R2 to send the packet, over an Ethernet over MPLS
(EoMPLS) link, to R3 next.

The routing concept works a little like driving down the freeway when approaching a big
interchange. You look up and see signs for nearby towns, telling you which exits to take
to go to each town. Similarly, the router looks at the IP routing table (the equivalent of the
road signs) and directs each packet over the correct next LAN or WAN link (the equivalent
of a road).

R3’s Logic: Delivering Data to the End Destination
The final router in the path, R3, uses almost the same logic as R1 and R2, but with one
minor difference. R3 needs to forward the packet directly to PC2, not to some other router.
On the surface, that difference seems insignificant. In the next section, when you read
about how the network layer uses LANs and WANs, the significance of the difference will
become obvious.

Subscribe To Get

Latest IT certification News 

Help You Pass Any IT Exam