Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

vlan gateway

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
New Member

Re: vlan gateway

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

Bronze

Re: vlan gateway

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

206
Views
0
Helpful
2
Replies
CreatePlease to create content