How does it work when you have multiple vlans configured on a switch, but only one "ip default-gateway " command? Which VLAN does this provide a default-gateway service to? (I think it's mabey the the management vlan)
Is there a way to put a "ip default-gateway " command in each vlan? Is is even necessary?
"ip default-gateway" command is basically used when switches are not doing any routing and working as pure layer 2 switch so that when they initiate traffic for some subnet outside their management subnet they can send traffic on default gateway.
You can have only one default-gateway configured on your switch.
When your switch has multiple vlan interfaces which means it is a layer 3 switch and doing routing and when your switch is configured to route with IP, it does not need to have a default gateway set.
I think that you were a bit too quick in responding and did not think this through well. Mohammed makes a good point aboutn the use of default-gateway. If a layer 2 switch does not configure ip default-gateway then it will be able to communicate with other devices within the same management VLAN/subnet but will not be able to communicate with anything outside of that subnet.
You are absolutely right and I believe I told the original poster about the use on my first post
" ("ip default-gateway" command is basically used when switches are not doing any routing and working as pure layer 2 switch so that when they initiate traffic for some subnet outside their management subnet they can send traffic on default gateway. ) "
But when the original poster again asked that if everything is in same subnet including the switch management vlan then he do not need the default gateway.
I responded "YES YOU GOT IT" . So I believe from original poster's second reply he understood when he need default gateway and when he don't.
Think of it as if the default gateway configured on a PC. It is used in order for the switch management to be reachable across other routed networks, if you are trying to reach your switch from a PC not on the same LAN.
We are pleased to announce availability of Beta software for 16.6.3. 16.6.3 will be the second rebuild on the 16.6 release train targeted towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are looking for early feedback from custome...