cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1003
Views
0
Helpful
3
Replies

VLAN with multiple subnets

Joe.Lorenz
Level 1
Level 1

Hi --

I have a cat 3560 switch with VLANS.  I would like to setup a VLAN port to be able to have 2 ip address ranges on it.

192.168.4.1 and 192.168.2.1.    I am not sure how to configure the Gig E port to do this.

Do I setup two sub interfaces?  Any assistance would be greatly appreciated.

Thank you

Joe

3 Replies 3

Reza Sharifi
Hall of Fame
Hall of Fame

Joe,

Usually you correspond one vlan to one subnet, so for example

vlan 20 192.168.2.1/.24

vlan 40 192.168.4.1/24

You create an svi for each vlan

config t

inter vlan 20

ip add 192.168.2.1 255.255.255.0

inter vlan 40

ip add 192.168.4.1 255.255.255.0

then you assign what ever ports you want to each vlan

example

config t

inter gi1/0/10

switchport mode access

switchport access vlan 20

inter gi1/0/20

switchport mode access

switchport access vlan 40

HTH

Reza

Richard Burts
Hall of Fame
Hall of Fame

The reply from Reza is a good explanation of how it is usually done. But it fails to address the point in the original post where Joe was quite clear that he wanted 2 subnets on the same interface.

The way that it is usually done makes an assumption that there is a one to one correspondence between VLAN and subnet. Joe says he needs a 2 to 1 correspondence. He can get that by configuring a secondary address on the VLAN interface.

HTH

Rick

Sent from Cisco Technical Support iPhone App

HTH

Rick

HI,

You use "secondary" keyword  and can have multiple IP subnets under the same interface. However, there is a limitation depending on the device as how many secondary subnets you can have.

inter vlan 10

ip add 192.168.2.1 255.255.255.0

ip add 192.168.4.1 255.255.255.0 secondary.

Also just be mindful of secondary ip address limitations.

HTH

Regards

Kishore

Review Cisco Networking for a $25 gift card