Single VLAN can support multiple subnets

Answered Question
Apr 22nd, 2010
User Badges:

Hi all,


I was reading cisco book where it says Sinle vlan can support multiple subnets.Because switch ports are configured for vlan  number only and not a network address any station connected to a poprt can present  ant subnet address range.


if someone can please explain me this with example.


thanks


mahesh

Correct Answer by Reza Sharifi about 7 years 3 months ago

Hi Mahesh,


Take a look at the config example I have below:


interface Vlan10
ip address 20.20.20.1 255.255.255.0 secondary
ip address 30.30.30.1 255.255.255.0 secondary
ip address 10.10.10.1 255.255.255.0
end



Again, not recommended but this is just for your info:


HTH

Reza

Correct Answer by Federico Coto F... about 7 years 3 months ago

As stated above, there are some circumstances where you can have multiple IP subnets in the same VLAN.

I think however, that we come to the same conclusion where you should have a 1-to-1 relation between VLAN and IP subnets as a recommended design.


If you find yourself in a situation where you must aggregate different subnets on the same VLAN, my opinion is to consider a redesign.


VLANs are L2 and are just a concept that switches know about and IP subnets are L3.

So, as I said, technically you can have multiple IP subnets on the same VLAN but again, not recommended solution.


Federico.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Reza Sharifi Thu, 04/22/2010 - 20:04
User Badges:
  • Super Bronze, 10000 points or more
  • Cisco Designated VIP,

    2017 LAN

Hi Mahesh,


Yes, it is possible to have multiple subnets in the same vlan. You would just assign multiple subnets under the same vlan interface but it is not a common practice at all.  The cleanest way is to have one subnet per vlan to keep you broadcast domains separate.


HTH

Reza

Federico Coto F... Thu, 04/22/2010 - 20:12
User Badges:
  • Green, 3000 points or more

As Reza said, the recommendation is to have:


1 VLAN = 1 IP subnet = 1 Broadcast Domain


VLAN is a L2 concept, therefore technically is possible to have multiple IP subnets (L3) on the same VLAN.

However this practice is not recommended at all.


Federico.

dscarfe Thu, 04/22/2010 - 21:06
User Badges:

There some legimate reasons to have multiple IP subnets on the same vlan.  For example, you might need to increase the size of a subnet due to address exhaustion.  If an adjacent subnet isn't available to supernet with, one possible solution is to add another subnet as a secondary IP interface.  A large drawback to this solution is that hosts in the same vlan, but in different subnets, would require a router to communicate.


While this might serve well as a migration tool, it isn't the cleanest way to configure a network.  It is still better to have a 1:1 relationship between vlans and ip subnets.


Later,


Dave

mahesh18 Fri, 04/23/2010 - 10:33
User Badges:

Hi,


thanks for replying.


if you can explain me with example how can we do this?


thanks

mahesh

Correct Answer
Federico Coto F... Fri, 04/23/2010 - 10:44
User Badges:
  • Green, 3000 points or more

As stated above, there are some circumstances where you can have multiple IP subnets in the same VLAN.

I think however, that we come to the same conclusion where you should have a 1-to-1 relation between VLAN and IP subnets as a recommended design.


If you find yourself in a situation where you must aggregate different subnets on the same VLAN, my opinion is to consider a redesign.


VLANs are L2 and are just a concept that switches know about and IP subnets are L3.

So, as I said, technically you can have multiple IP subnets on the same VLAN but again, not recommended solution.


Federico.

mahesh18 Fri, 04/23/2010 - 10:59
User Badges:

Hi thanks for great reply


i mean to know command  syntax for multiple subnets on single vlan

this i need to know only?


thanks

mahesh

Federico Coto F... Fri, 04/23/2010 - 11:02
User Badges:
  • Green, 3000 points or more

Depends on your setup.

For example, if you have a L2 switch.... computers can connect to ports on the same VLAN, and the computers belonging to different subnets.


No extra configuration needed.


Federico.

Correct Answer
Reza Sharifi Fri, 04/23/2010 - 11:06
User Badges:
  • Super Bronze, 10000 points or more
  • Cisco Designated VIP,

    2017 LAN

Hi Mahesh,


Take a look at the config example I have below:


interface Vlan10
ip address 20.20.20.1 255.255.255.0 secondary
ip address 30.30.30.1 255.255.255.0 secondary
ip address 10.10.10.1 255.255.255.0
end



Again, not recommended but this is just for your info:


HTH

Reza

mahesh18 Fri, 04/23/2010 - 11:17
User Badges:

Hi all,


Many thanks for all for answering the question


thanks

mahesh

Actions

This Discussion