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

Attention: The Cisco Support Community site will be in read only mode on Dec14, 2017 from 12:01am PST to 11:30am for standard maintenance. Sorry for the inconvenience.

New Member

1 IP subent for 2 VLANs? Possible?

Hi Sir,

I have a few questions on Vlan and IP subnet.

Q1. Can I have one subnet used on 2 Vlans? From my understanding, it is recommended to have one IP subnet used for one VLAN.

Q2. If I can use 1 IP subnet which has a prefix of /23 for 2 VLANs, then under what circumstances that we have to use this approach?

Q3.How can I use 1 IP subnet for 2 VLANs? Any sample of configuration guide?

Thank you.




Re: 1 IP subent for 2 VLANs? Possible?

As far as IP addressing is concerned, the VLAN interfaces will behave in the same way as physical interfaces: that is, you cannot have overlapping IP ranges on two interfaces.

You can do the opposite, i.e. have more than one subnet on a single interface, by using the keywod "secondary". In that case, the subnet may or may not overlap, as you wish.

The only way I can think of to put the same IP range on two VLAN - and I have never tried this, so I don't know if it would work - is to create a BVI interface and to bridge the two VLANs together. Of course, you would get the same IP range, as well as the same broadcast domain, on both sides.

This is all logical, if you think about it - if the router had a packet for that an IP address in that range, which VLAN would it send it to?

Kevin Dorrell


Hall of Fame Super Silver

Re: 1 IP subent for 2 VLANs? Possible?


It does not work to have 1 IP subnet on two VLANs. A VLAN is a layer 2 broadcast domain and should have a unique IP subnet. The basic problem is that the layer 3 interface forwarding into the first VLAN believes that all of the subnet is locally connected into that VLAN and can nor forward to addresses in the same subnet but in a different VLAN.

If you have one subnet and you have 2 VLANs then what you can think about doing is to split the subnet in two parts (wich creates two smaller but independent subnets) and put a unique subnet onto each VLAN. Your question mentions possibly having a /23. If for example you have you could divide that and have in one subnet on the first VLAN and have in the second subnet on the second VLAN. That approach will work. So you can split the subnet and use the parts but you can not put the same subnet into 2 VLANs.



New Member

Re: 1 IP subent for 2 VLANs? Possible?


basically what you are going to do to make this work is take a L3 switch and build the two vlans you want (will refer to them as X and Y) in the SUP


console (enable) set vlan x name x state active

vlan x created

console (enable) set vlan y name y state active

vlan y created

Now you are going to get into the layer 3 portion of the L3 device, whatever that may be, and assuming you are using 1 class C subnet for your IP space, your command structure would look something like this

(# = whatever IP structure you want to use)

router#(config) int vlan x

router#(config-int) ip add #.#.#.1

router#(config-int) no shut

router#(config-int) int vlan y

router#(config-int) ip add #.#.#.129

router#(config-int) no shut

again, this is a very basic configuration! Depending on the piece of equipment you are trying to configure this on... you should do some research on intervlan routing. 9 times out of 10 depending on the equipment, you will find step by step procedures more taylored to your needs

CreatePlease to create content