10-26-2024 03:08 AM
Hi
I have main gateway and secondery
ip route 0.0.0.0/0 gateway1 1
ip rooute 0.0.0.0/0 gateway2 2
Assign distance by 1 and 2 to gateway but when gateway 1 is down no ip route enbale on gateway 2
For this must be used IP sla in nexus 9K?
10-26-2024 05:40 AM
i would suggest to use PBR Routing with IP SLA for this kind of requirement.
IP sla :
10-26-2024 08:51 AM
I believe that PBR is an interesting suggestion and might have some benefits. But the implementation described in OP seems that it should work. Can the OP provide more details? Ideally I would like to see the complete current running config. But if you do not want to do that then please provide the configuration syntax for the static routes, the output of show ip interface brief, and the output of show ip route.
10-26-2024 10:33 PM
If ping gateway 1 is unreachable
show ip route active gateway still gateway 1
10-26-2024 10:42 PM
Thanks For your reply If I want combine ip sla and static route
can do this on Nexus 9K Or used only pbr?
10-27-2024 01:24 AM
Thanks For your reply If I want combine ip sla and static route
Nexus code is bit different - Myself never got in to success of static route correct results, best way to use PBR as per my testing and use cases.
Other case if the you have 2 different interface connected to different side, then you can track the interface and make action.
If you rely on routing then i suggest to use PBR (especially come to nexus environment).
More information can be find here - what support what not:
10-27-2024 09:50 AM
I am glad that this response mentions ip sla. I believe that you are on the right track. There is an issue when a route (and especially a static default route) specifies that the outbound interface is Ethernet. As long as the Ethernet interface is in the up state the device will keep the static route in the routing table. The device will only remove that static route if the interface status changes to down. The result is that the next hop device is down, but the static route remains in the routing table.
The solution to this issue is ip sla. Using ip sla you check on availability of the next hop and if the next hop is not available then the static route is removed (and the alternate static route can be inserted into the routing table).
10-27-2024 03:28 PM
Hi,
Use SLA with tracking on main/primary route and failover on secondary route, it works on Nexus. You only ned to track first gateway.
feature sla sender
track 100 ip sla 100
ip sla 100
icmp-echo 1.1.1.2
ip sla schedule 100 life forever start-time now
!
ip route 0.0.0.0/0 Ethernet1/1 1.1.1.1 track 100 1
ip route 0.0.0.0/0 Ethernet1/2 2.2.2.1 track 100 2
Best,
Cristian.
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