How to Configure Static Route with Next-Hop Address
In this lesson, we are going to configure a static route using the Next-Hop address. The router derived the exit interface from the next hop. For example, in Figure 1, three static routes are configured on Router0 using the next-hop addresses.
You can also see the Routing table for Router0. The static routes are created using the IP address of the next-hop router. So, packet forwarding should also require a router’s exit interface.
The process determines an exit interface for the packet called route resolvability. Route resolvability is variable depending upon the type of forwarding mechanism used by the router. Cisco Express Forwarding is the default mechanism on most platforms running IOS 12.0 or later.
If we have no mechanism for how the packet forwarding processing occurs, Router0. For example, if Router0 has a packet destined for the network 192.168.20.0/24, on Router1:
Router0 looks at its routing table for a match and finds that the next-hop address for the packet is 10.10.10.2. So, as indicated in the red rectangle in the figure, it has to send the packets to this address. 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 10.10.10.2 to send a packet destined for the 192.168.20.0 network. The Router0 searches its routing table a second time for the 10.10.10.2 match.
This time, the address matches the route for the directly connected network 10.10.10.0 with the exit interface fast Ethernet 0/0, as indicated in a yellow rectangle 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 192.168.20.0/24 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, affecting the router’s performance and the 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 used 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 address and other 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 address lookups. In other words, a static route using a next-hop address requires a single lookup when CEF is working on the router. The following is the video of configuring a static route using the IP address of the next-hop router.