How to Configure Directly Connected Static Route
Another way to configure a static route is the option of using the exit interface to specify the next-hop address. Before the CEF, this method is used to avoid the recursive lookup problem. But now the CEF resolve the recursive lookup problem.
In Figure 1, the same topology that we already discussed in the previous lesson. In this lesson, we should configure directly connected static routes on Router1 using exit interfaces.
So using the IP route command we have configured static route using exit interface for network 192.168.10.0/24 and network 192.168.30.0/24. You can see the full command in the second part of the figure below.
The routing table for Router1 is shown in the third part of the figure below. When someone sends a packet 192.168.10.0/24 network, Router1 looks for a match in the routing table and finds that it can forward the packet out of its Fast Ethernet 0/0 interface.
The process required no further lookups. So, now you can compare the routing table using an IP address of the next-hop and routing table using an exit interface of the router.
The routing table with configuring a directly connected static route with an exit interface resolves the exit interface in a single search, instead of two searches. Therefore it resolves the recursive routing problem without using CEF.
The routing table entry indicates “directly connected”, but the administrative distance of the static route is still 1. Only a directly connected interface can have an administrative distance of 0.
For point-to-point routers, we can use static routes that point to the exit interface or to the next-hop address. But the use of static routes using an exit interface on point-to-point networks is very common, which make CEF mechanism unnecessary.
For multipoint/broadcast interfaces, it is more appropriate to use static routes that point to a next-hop address. Following is the video to configure a static route using a directly connected static route.