we know that the ip default gateway is used for L2 switch
now if we have a layer 2 switch with ip default gateway and we activated layer 3 functionality on it , and configured a defualt route
like this :
ip default gateway x.x.x.x
ip route y.y.y.y
so which one will take more priority ???????
my opinion and plz correct me :
the L3 port will use the routing table but the L2 ports will still use the ip default gateway .....
traffic in L3 port will be checked by the cef ( adjacency table ) and if it doesnt find the destination it will use the routing tabel wher the default route is installed
traffic in L2 port will be checked by the arp table and if it doesnt find the destination it will use the default gateway .
ip default-gateway is effective when ip routing is disabled
ip route 0.0.0.0 0.0.0.0 is effective when the ip routing is enabled.
So the discriminator is the presence or absence of the command
in global configuration mode
The behaviour changes at device level not at port level
Hope to help
Thanx for ur reply
ok , but regarding to nexus switches , there is no ip default gateway command ...so what is the alternative command
other than configuring it by the dialoge
U would have been concerend if u were having other vlan interfaces on this switch which is not u r case.
So think of it like a host which is configured with ip route in order to be reachable from other subnets.