08-14-2009 12:05 AM - edited 03-06-2019 07:14 AM
Hello,
I have one l3 switch. I want to create multiple Vlans on it but at the same time the Gateways for those vlans are different.
This is what is my current config :
ip default-gateway 192.168.0.1
vlan 3
ip address 192.168.0.2 255.255.255.0
untagged 1-24
exit
Now i want to create a new Vlans vlan100 and vlan200 whose default gateway is 192.168.100.1 and 192.168.200.1 resp.
Can anybody help?
How can i assign different gateways for two different Vlans? can we assign different gateway to different vlan?
pls suggest
08-14-2009 01:02 AM
First create vlan 100 and 200 then follow the steps....
SW#config t
SW(config)#int vlan 100
SW(config-if)#ip add 192.168.100.1 255.255.255.0
SW(config-if)#exit
SW(config)#int vlan 200
SW(config-if)#ip add 192.168.200.1 255.255.255.0
add the interface in desired VLANs.
SW(config)#interface range fa0/1 - 10
SW(config-if)#switchport access vlan 100
SW(config)#interface range fa0/11 - 20
SW(config-if)#switchport access vlan 200
interface fa0/1 - 10 users use 192.168.100.1 as a default gateway
and int fa0/11 - 20 users use 192.168.200.1 as a DG.
Hope ur problem sort out !!!
08-30-2009 10:59 AM
In a little more details:
The ip default-gateway is the default gateway for the switch, if it is a L2 switch or a L3 switch in L2 mode (i.e. "no ip routing" has been configured).
The default gateway for the end users will be the IP address defined on in your case VLAN 3 for the first network and VLAN 100 and 200 for the other two, as shown in the reply.
HTH
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide