Routing Decisions Based on the Routing Table
Before the packet arrives at R1, R1 will have built the routing
table with the expectation that it will need to know this information one day.
In the internetwork used for the example in this chapter, there are three IP
networks, so R1's routing table lists three IP networks. Each line in the
routing table lists the IP network, along with the routing instructions for this
router. These instructions tell R1 how to forward packets so that they will
reach each network.
When R1 receives the Ethernet frame from Hannah, it first
checks for errors. If there are no errors, R1 discards the Ethernet header and
trailer and is left with the original IP packet. That IP packet is listed
underneath R1 in Figure 11-10. From that
point, the process of routing works as follows:
Match the destination IP address in the packet to the list of
entries in the routing table.
After a match is found, send the packet out the outgoing
interface, to the next-hop router, as listed in that entry of the routing
For instance, notice the routing table entry for network
22.214.171.124. You know from Chapter 10
that network 126.96.36.199 includes all IP addresses between 188.8.131.52 through
184.108.40.206, inclusive. Of course, the web server's IP address, 220.127.116.11, is
in that range, so the packet matches that entry in the routing table.
The last two columns of the routing table tell R1 what to do
with packets so that they are delivered successfully to the right destinations.
From Figure 11-10, it's pretty obvious
that R1 should forward the packet out its Ethernet2 interface, so that R2 gets
the packet next. In this case, notice that the routing table entry for network
18.104.22.168 lists Ethernet2 as the outgoing interface. It also references R2's IP
address as the next-hop router. The next-hop router is
simply the next router that needs to receive the packet so that the packet will
be delivered correctly. The outgoing interface is the
interface on this router out which the packet should be forwarded next.
In short, a router receives a packet, matches its routing
table, and decides to forward that packet based on the instructions in the
routing table. That process is typically called "routing," and it is sometimes
called a forwarding decision. However, R1
is not yet finished. Now let's move on to R1's last step for this packet.