How Routers Transfer Packets
All nodes on an IP network maintain routing information in routing tables. These tablescontain information of how to reach systems that are attached to both local and remote networks. Therouting tables are generated from local configuration information and from routing protocol messagesthat is exchanged with neighboring systems.
When a host system initially sends a packet, it looks up the packet's destination address inits routing table to determine if the destination is on the local network. If yes, the packet goesdirectly to the host with that IP address. If not, the packet goes to a router on the localnetwork.
When a router receives a packet, the router checks its routing table to determine if thedestination address is for a system on one of it's attached networks or if the message must beforwarded through another router. It then sends the message to the next system in the path to thedestination.
This process is repeated on each router that receives the message until the message reachesthe destination system.
Routers transfer packets in the following manner:
The following figure shows a network topology with three networks that are connected by tworouters.
Figure1-4A Network Topology With Three Interconnected Networks
Router R1 connects networks 192.9.200.0/24 and192.9.201.0/24. Router R2 connects networks 192.9.201.0/24 and192.9.202.0/24.
Host A examines its routing tables for the path to 192.9.202.10. The localnetwork address range does not cover this address, but there is a previously learned default routethrough router R1 that covers the address. Therefore, Host A sends the packet to Router R1.
Router R1 examines its routing tables. No local network's address range covers the destinationaddress, but there is a known route to network 192.9.202.0/24 through Router R2that covers the address, Router R1 sends the packet to Router R2.
Router R2 is connected directly to network 192.9.202.0/24. The routingtable lookup reveals that 192.9.202.10 is on the attached network. Router R2sends the packet directly to Host B.
If Host A on network 192.9.200.0/24 sends a message to Host B on network192.9.202, the following events occur: