07-25-2025 11:17 PM
I have a static route next hop with both output interface and address specified.
I am aware that there is no significant change in operation, but please tell me the reason/intention for using them separately.
Also, please let me know if there are any advantages to specifying the output interface.
ip route 172.1.0.0 255.255.0.0 1.1.1.1
ip route 172.2.0.0 255.255.0.0 GigabitEthernet0/1 1.1.1.1
Solved! Go to Solution.
07-25-2025 11:59 PM
Hello
ip route 172.1.0.0 255.255.0.0 1.1.1.1 = this is called a recursive static route because the router needs to perform a cef lookup to find the route entry for that specified next-hop ip address, -as no interface is specified there is a potential for a different interface to be selected due to topology convergence which could cause unwarranted route path selection or outage.
ip route 172.2.0.0 255.255.0.0 GigabitEthernet0/1 1.1.1.1 = this is known as full specified static route and the best type of static route to use.
As the interface and next-hop ip address is known to the router so no recursive next-hop is performed and as such if the specific interface was to fail the static route will be withdrawn so less potential for unwarranted route path selection or outage.
Lastly
ip route 172.2.0.0 255.255.0.0 GigabitEthernet0/1 = this is known as a directly connected static route - this i would say is the least applicable to use,
As no next-hop is specified this telling the router that the network stated in the static is directed connected which will result in the router to arp on that interface for a next-hop ip resulting in cpu/memory usage, imagine having a directly connected default route, this will be telling the router that any route not in the route table is then directed connected via this interface and as such it will arp for every network known by that directed connected default route
07-25-2025 11:59 PM
Hello
ip route 172.1.0.0 255.255.0.0 1.1.1.1 = this is called a recursive static route because the router needs to perform a cef lookup to find the route entry for that specified next-hop ip address, -as no interface is specified there is a potential for a different interface to be selected due to topology convergence which could cause unwarranted route path selection or outage.
ip route 172.2.0.0 255.255.0.0 GigabitEthernet0/1 1.1.1.1 = this is known as full specified static route and the best type of static route to use.
As the interface and next-hop ip address is known to the router so no recursive next-hop is performed and as such if the specific interface was to fail the static route will be withdrawn so less potential for unwarranted route path selection or outage.
Lastly
ip route 172.2.0.0 255.255.0.0 GigabitEthernet0/1 = this is known as a directly connected static route - this i would say is the least applicable to use,
As no next-hop is specified this telling the router that the network stated in the static is directed connected which will result in the router to arp on that interface for a next-hop ip resulting in cpu/memory usage, imagine having a directly connected default route, this will be telling the router that any route not in the route table is then directed connected via this interface and as such it will arp for every network known by that directed connected default route
07-26-2025 12:28 AM - edited 07-26-2025 04:54 AM
ip route 172.2.0.0 255.255.0.0 GigabitEthernet0/1 1.1.1.1 <<- this only need
Why? When static route is deleted from RIB
When the egress interface is down to prevent blackhole.
Here static route check health of egress interface is it up or down.
Don't add two static route' use only one.
MHM
07-26-2025 04:40 AM
several good posts
https://learningnetwork.cisco.com/s/article/static-dynamic-routing-pdf
https://community.cisco.com/t5/routing/static-route-with-outgoing-interface-as-next-hop/m-p/4768808
Regards, ML
**Have fun labbing!!!***
***Please Rate All Helpful Responses ***
07-26-2025 05:45 AM
Hello @CHISHIUNG
This static route checks the health of the specified egress interface (Gi0/1). It will be removed from the RIB if this interface goes down, thereby preventing traffic blackholing.
By specifying both the outgoing interface and next hop IP, the router ensures the route is only valid when the interface is operational and the next hop is reachable through it !
This avoid the need for a second static route or tracking object, keeping the configuration simple and reliable...
07-26-2025 06:46 AM
. . . please tell me the reason/intention for using them separately.
The others have provided great replies, but to expand upon a point mentioned in @paul driver 's initial reply, static routing can be used recursively. What this means, the next hop IP doesn't need to be the physical next hop.
For example.
R1 E1 192.168.1.1/24 <> 192.168.1.2/24 R2 192.168.2.1/24 <> 192.168.2.2/24 R3
R1 E2 192.168.3.1/24 <> 192.168.3.2/24 R4 192.168.2.3/24 <>
On R1 you could have:
ip route 172.1.0.0 255.255.0.0 192.168.2.2 !R3's
provided you also had something like:
ip route 192.168.2.0 255.255.255.0 192.168.1.2 !R2's
ip route 192.168.2.0 255.255.255.0 192.168.1.3 !R4's
But, if for some reason, you only wanted 172.1.0.0/16 to flow via R4
You could:
ip route 172.1.0.0 255.255.0.0 E2 192.168.2.2
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide