04-22-2010 07:49 PM - edited 03-06-2019 10:45 AM
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
Solved! Go to Solution.
04-23-2010 10:44 AM
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.
04-23-2010 11:06 AM
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
04-22-2010 08:04 PM
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
04-22-2010 08:12 PM
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.
04-22-2010 09:06 PM
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
04-23-2010 10:33 AM
Hi,
thanks for replying.
if you can explain me with example how can we do this?
thanks
mahesh
04-23-2010 10:44 AM
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.
04-23-2010 10:59 AM
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
04-23-2010 11:02 AM
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.
04-23-2010 11:06 AM
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
04-23-2010 11:17 AM
Hi all,
Many thanks for all for answering the question
thanks
mahesh
04-15-2024 02:20 PM
Hi, I am trying to simulate that on PT but I can't give command ip add second network gateway ip add + subnetmask secondary
Basically I can put only one ip add to my vlan 10 interface.
Can you help me out?
I am using 2960 switch on packet tracer
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide