
Internet Routing
In a packet switching system, routing refers to the process of choosing a path
over which to send packets (IP datagrams), and router refers to a computer
making such a choice. Both hosts and gateways participate in IP routing, which
can be divided into two forms: direct routing and indirect routing. Direct routing
involves the transmission of IP datagrams from one machine directly to another.
Direct routing can occur only if the two machines are attached to the same
physical transmission system (e.g., a single Ethernet). Indirect routing is neces-
sary when the destination is not on a directly attached network, requiring the
sender to pass the datagram through a gateway for delivery.
To transfer an IP datagram over a single network, the sender encapsulates the
IP datagram in a physical frame, maps the destination IP address to a physical
address, and uses the network hardware to deliver it. To see if a destination lies
on one of the directly connected networks, the sender extracts the network
portion of its own IP address(es). A match indicates that the IP datagram can be
sent directly. If no match is made, the sender passes the IP datagram to a
gateway. The IP datagram will continue from gateway to gateway until it
reaches a gateway that can deliver the IP datagram directly.
Table-Driven IP Routing
Each host or gateway uses a table-driven routing algorithm to determine where
an IP datagram should be sent. The IP routing algorithm employs an Internet
routing table (or IP routing table) that stores information about possible desti-
nations and how to reach them.
Figure 1-11 shows an example of how routing tables are used. In the figure, the
routing table gives the routes that gateway G uses. Because G connects directly
to networks 20.0.0.0 and 30.0.0.0, it can reach any host on those networks
directly. Given an IP datagram destined for a host on network 40.0.0.0, G routes
it to address 30.0.0.7 (gateway H). H will then deliver the IP datagram directly.
G can reach address 30.0.0.7 because both G and H attach directly to network
30.0.0.0.
This routing technique keeps routing tables small (since each gateway need not
have every host’s individual address) and makes routing decisions efficient.
ACST-0351-005
Chapter 1
June 1996
Introduction
1-25