The description above indicated that the IP implementation is
responsible for getting packets to the destination indicated by the
destination address, but little was said about how this would be done.
The task of finding how to get a packet to its destination is referred
First, it is necessary to understand the model on which IP is based. IP assumes that a system is attached to some local network. We assume that the system can send packets to any other system on its own network. (In the case of Ethernet, it simply finds the Ethernet address of the destination system, and puts the packet out on the Ethernet.) The problem comes when a system is asked to send a packet to a system on a different network. This problem is handled by gateways. A gateway is a system that connects a network with one or more other networks. Gateways are often normal computers that happen to have more than one network interface. For example, we have a Unix machine that has two different Ethernet interfaces. Thus it is connected to networks 128.6.4 and 128.6.3. This machine can act as a gateway between those two networks. The software on that machine must be set up so that it will forward packets from one network to the other. That is, if a machine on network 128.6.4 sends a packet to the gateway, and the packet is addressed to a machine on network 128.6.3, the gateway will forward the packet to the destination. Major communications centers often have gateways that connect a number of different networks.
Routing in IP is based entirely upon the network number of the destination address. Each computer has a table of network numbers. For each network number, a gateway is listed. This is the gateway to be used to get to that network. Note that the gateway doesn't have to connect directly to the network. It just has to be the best place to go to get there. For example at Rutgers, our interface to NSFnet is at the John von Neuman Supercomputer Center (JvNC). Our connection to JvNC is via a high-speed serial line connected to a gateway whose address is 22.214.171.124. Systems on net 128.6.3 will list 126.96.36.199 as the gateway for many off-campus networks. However systems on net 128.6.4 will list 188.8.131.52 as the gateway to those same off-campus networks. 184.108.40.206 is the gateway between networks 128.6.4 and 128.6.3, so it is the first step in getting to JvNC.
When a computer wants to send a packet, it first checks to see if the
destination address is on the system's own local network. If so, the
packet can be sent directly. Otherwise, the system expects to find an
entry for the network that the destination address is on. The packet
is sent to the gateway listed in that entry. This table can get quite
big. For example, the Internet now includes several hundred
individual networks. Thus various strategies have been developed to
reduce the size of the routing table. One strategy is to depend upon
Most IP experts recommend that individual computers should not try to keep track of the entire network. Instead, they should start with default gateways, and let the gateways tell them the routes, as just described. However this doesn't say how the gateways should find out about the routes. The gateways can't depend upon this strategy. They have to have fairly complete routing tables. (It is possible to do hierarchical routing, where all of the gateways on a campus know about the campus network, but direct all off-campus traffic to a single gateway with connections off-campus.) For this, some sort of routing protocol is needed. A routing protocol is simply a technique for the gateways to find each other, and keep up to date about the best way to get to every network. rfc1009.txt contains a review of gateway design and routing. However rip.doc is probably a better introduction to the subject. It contains some tutorial material, and a detailed description of the most commonly-used routing protocol.