05-19-2007 06:39 AM - edited 03-05-2019 04:10 PM
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?
Any help is appreciated!
Thanks,
Chris
05-19-2007 06:54 AM
Hi Chris,
"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.
HTH
Ankur
*Pls rate all helpfull post
05-19-2007 06:54 AM
Hi,
I think that you are talking about a layer 2 switch, and in this case "ip default-gateway " command is used for managing the switch and it is not used to route VLAN traffic.
HTH, please do rate all helpful replies,
Mohammed Mahmoud.
05-19-2007 07:15 AM
Yes, it is on a layer 2. So hypothetically, this command is not needed as long as the management vlan/subnet is the same accross your network, right?
05-19-2007 07:17 AM
Hi Chris,
You got it!!
Regards,
Ankur
05-19-2007 05:46 PM
Ankur
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.
HTH
Rick
05-20-2007 04:11 AM
Hi Rick,
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.
Regards,
Ankur
05-19-2007 07:18 AM
Hi,
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.
HTH, please do rate all helpful replies,
Mohammed Mahmoud.
05-19-2007 07:38 AM
I got it now. Thank you all for your help!
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: