System Administration Guide: IP Services

How Routers Transfer Packets

The IP address of the recipient, a part of the packet header, determines how the packet is routed. If this address includes the network number of the local network, the packet goes directly to the host with that IP address. If the network number is not the local network, the packet goes to the router on the local network.

Routers maintain routing information in routing tables. These tables contain the IP address of the hosts and routers on the networks to which the router is connected. The tables also contain pointers to these networks. When a router receives a packet, the router consults its routing table to see if the table lists the destination address in the header. If the table does not contain the destination address, the router forwards the packet to another router that is listed in its routing table. Refer to Configuring Routers for detailed information on routers.

The following figure shows a network topology with three networks that are connected by two routers.

Figure 3–3 Three Interconnected Networks

Diagram shows a sample of three networks that are connected by two routers.

Router R1 connects networks 192.9.200 and 192.9.201. Router R2 connects networks 192.9.201 and 192.9.202. If host A on network 192.9.200 sends a message to host B on network 192.9.202, the following events occur:

  1. Host A sends a packet out over network 192.9.200. The packet header contains the IPv4 address of the recipient host B,

  2. None of the machines on network 192.9.200 has the IPv4 address Therefore, router R1 accepts the packet.

  3. Router R1 examines its routing tables. No machine on network 192.9.201 has the address However, the routing tables do list router R2.

  4. R1 then selects R2 as the “next hop” router. R1 sends the packet to R2.

  5. Because R2 connects network 192.9.201 to 192.9.202, R2 has routing information for host B. Router R2 then forwards the packet to network 192.9.202, where host B accepts the packet.