cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15828
Views
6
Helpful
8
Replies

How to add Default Route in Nexus switch

amitga001
Level 1
Level 1

Hi ,

I am very new for nexus switches now i have to put default route towards one of my firewall to get the internet access can anybody help to know what exactly the commands i need to put into the switch.

It;s really urgent...

Thanks in Advance.

8 Replies 8

Mark Malone
VIP Alumni
VIP Alumni

Its the same as a router/switch basically just use the / 10.1.1.1 being your next-hop or you can set your interface Instead

ip route 0.0.0.0/0 10.1.1.1
 

Ohh really but i was reading some blog where its mentioned that we need to put below command:

vrf context management ip route 0.0.0.0/0 10.2.1.1

What it means

That's for your management vrf interface the purpose of that default route is to manage the switches remotely , is the nexus 5k or 7k ? if its 5k its vrf default as it will be most likely l2 but if its l3 7k you can use whats a default vrf route as well as there isolated from each other

depends on your overall setup just try both 1 should work for you

Example my default in mgmt. setup on 7k
vrf context management
  ip route 0.0.0.0/0 172.21.9.254

interface mgmt0
  vrf member management
  ip address 172.21.9.7/24

standard default

ip route 0.0.0.0/0 192.168.10.254

My device is 6k and use as a L3 device.

service dhcp
ip dhcp relay
vrf context KEEPALIVE
vrf context management
vpc domain 10
  peer-switch
  role priority 1000
  system-priority 4000
  peer-keepalive destination 1.1.1.1 source 2.2.2.2 vrf KEEPALIVE
  delay restore 60
  peer-gateway
  ip arp synchronize
 

Then you will be able to have a mgmt. vrf default route and a standard default route if needed as they will be isolated by the vrf

Thanks that will be very helpful.

Much appreciated

ok one more question still i need to run only ip route 0.0.0.0/0 10.1.1.1 this command right??