Quick Review of IP Routing

IP routing is concerned with the choice of a path over which the IP datagrams, destined to a given host, are sent. And it is important to emphasize the word destination here. Even though there may exist advanced techniques that rely on attributes such as the source address, the classic definition of routing considers the destination address as the sole criterion for path selection.

The main tasks pertaining to the routing process are listed in the following:

  1. Gathering routing information: either manually (static routing) or with the use of dynamic routing protocols.
  2. Installing entries in the routing table: before installing a path in the routing table, two comparisons are performed by a Cisco router: if two equal length network prefixes are available to a destination, the router prefers the one with the lowest Administrative Distance (AD). For two equal length prefixes that have the same AD value, that with the lowest cost (from the perspective of the routing protocol in place) is chosen.
  3. Searching for the longest prefix match: when a packet arrives at the incoming interface, its destination IP address is extracted and compared with each entry available in the routing table. The comparison that results in the longest bitwise match for the network mask will be selected. (The last possibility of finding a match is to use a Default Route, if one is available).
  4. Forwarding the packet on the outgoing interface: when a match happens in step 3, it points to an entry in the routing table that has an associated outgoing interface. This last step includes the construction of the appropriate L2 header for this interface.

To simplify matters, I normally divide the IP routing process in two parts: building the routing table (control plane) and using the table to forward packets (data plane).

The figure below depicts a scenario in which the host is using the routing services  provided by the “blue” router to forward packets to the destination with address After consulting its routing table, the router concludes that the intended host is reachable via its Ethernet1 interface (using R1 as the next-hop).

Overview of IP Routing

** Notes:

  • The simplest routing case happens when the incoming and outgoing interfaces are directly connected to the same router. In this type of situation steps 1 and 2 are not necessary.
  • When two routes to a given destination point to the same outgoing interface and have equalvalues for AD and cost, they are both installed in the routing table. In such a situation, load sharing takes place.

Leave a comment

Filed under English, Routing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s