cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
804
Views
0
Helpful
7
Replies

How add multiple Gateway On Nexus 9K

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?

 

7 Replies 7

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.

HTH

Rick

If ping gateway 1 is unreachable

show ip route active gateway still gateway 1

Thanks For your reply If I want combine ip sla and static route

can do this on Nexus 9K Or used only pbr?

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:

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/93x/ip-sla/configuration/guide/b-nexus-9000-series-nx-os-ip-slas-configuration-guide-93x.html

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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

HTH

Rick

Cristian Matei
VIP Alumni
VIP Alumni

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.