Previous Page: Creating Subnets  Next Page: Error and Control Messages

Routing

The term routing refers to the transmission of a datagram from one node to another on the same or a different network. The route refers to the path that is chosen to transmit an IP datagram from its origin to its destination, based on the IP addresses contained in the datagram.

When a datagram is sent to a node on another network, the network portions of the source and the destination IP addresses are different. When the packet is received by a router that connects the source to the destination network, the router forwards the packet on the correct interface to reach the destination, as shown in Figure 14. Two networks are connected if at least one router is attached to both networks.

Figure 14
How the router connects the source to the destination network
How the router connects the source to the destination network

Each host has a default router or a list of routers in other networks. When IP sends a datagram the following happens:

  1. IP searches the routing table of the sending node for a default route or a path to the destination IP address.
  2. IP extracts the address of the default router or next-hop router from the route entry.
  3. IP requires ARP to map the next-hop address to its hardware address.
  4. IP transmits the packet to the next hop.
  5. IP repeats Steps 1 through 4 until the final destination is reached.


  Previous Page: Creating Subnets  Next Page: Error and Control Messages