cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
373
Views
0
Helpful
2
Replies

vlan gateway

mpak12345
Level 1
Level 1

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

2 Replies 2

vaib7av.shirkul
Level 1
Level 1

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 !!!

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

Review Cisco Networking products for a $25 gift card