cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
105688
Views
63
Helpful
10
Replies

Single VLAN can support multiple subnets

mahesh18
Level 6
Level 6

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

2 Accepted Solutions

Accepted Solutions

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.

View solution in original post

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

View solution in original post

10 Replies 10

Reza Sharifi
Hall of Fame
Hall of Fame

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

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
Level 1
Level 1

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

Hi,

thanks for replying.

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

thanks

mahesh

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.

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

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.

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

Hi all,

Many thanks for all for answering the question

thanks

mahesh

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card