cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
313
Views
5
Helpful
5
Replies

Static route Next hop address and output interface

CHISHIUNG
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

5 Replies 5

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

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.

https://www.cisco.com/c/en/us/support/docs/dial-access/floating-static-route/118263-technote-nexthop-00.html

MHM

M02@rt37
VIP
VIP

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...

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Joseph W. Doherty
Hall of Fame
Hall of Fame

. . . 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