Configure Static Route Using IP Address of Next-Hop

in this lesson, we are going to configure static route using the IP address of the next-hop. The router derived the exit interface from the next hop. For example, in Figure 1, three static routes configured on Router0 using the IP address of the next hop, Router1.

You can also see the Routing table for Router0. The static routes are created using the IP address of the next-hop router. So, for packet forwarding, it should also require an exit interface of the router. The process determines an exit interface for the packet called route resolvability. It is vary depending upon the type of forwarding mechanism using the router. Cisco Express Forwarding is the default mechanism on most platforms running IOS 12.0 or later.

If we have no mechanism how the packet forwarding processing occur Router0. For example, if Router0 has a packet destined for the network, on Router1:

The Router0 look at its routing table for a match and finds that the next-hop for the packet is, So it has to send the packets to this address. as indicated in the red rectangle in the figure. But here the problem is the exit interface which is not mentioned in this routing entry.

So, Router0 must now decide the exit interface connected to IP address to send a packet destined for network. The Router0 searches its routing table second time for match. This time, the address has matched the route for the directly connected network with the exit interface fast Ethernet 0/0, as indicated in a rectangle of yellow color in the figure. So, the router then sends the packet to this interface.

You can see that the router takes two routing table lookup processes to send a packet to the network network. If a router needs multiple lookups in the routing table before forwarding a packet. This process is called a recursive lookup. The recursive lookups consume router resources which are casing the performance of the router and overall network.

A recursive static route is valid (that is, it is a candidate for insertion in the routing table) only when the specified next hop resolves; either directly or indirectly, to a valid exit interface.

Cisco Express Forwarding (CEF) Mechanism

It is a packet-switching technique using within Cisco routers to optimize the forwarding of packets and increase the packet switching speed.  Before the CEF there were 2 methods used for packet forwarding- process Switching and Fast-Switching. The CEF is working around two main components:

Forwarding Information Base (FIB)

The Forwarding Information Base (FIB)  is an optimized version of the routing table. The FIB contains destination information including next-hop information. The FIB provides a very easy way for routing table lookup and making an easy forwarding decision for the router.  

Adjacency Table

The adjacency table contains the information of layer 2 or switching linked to a particular FIB entry; avoiding the need for an ARP request for each table lookup

The information in both of the above tables works together. So there is no recursive lookup needed for next-hop IP address lookups. In other words, a static route using a next-hop IP requires a single lookup when CEF is working on the router

Following is the video of configuring static route using the ip address of the next-hop router.