cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
50037
Views
36
Helpful
15
Replies

Multiple VLANS within the same Subnet ?

hugochengym
Level 1
Level 1

Hi all

Is it possible to configure multiple VLAN (Voice VLAN , Data VLAN) in same subnet which is used for Cisco UC? If so, any configuration example? and also any critical performance issue? Thanks!

 

Hugo

15 Replies 15

acampbell
VIP Alumni
VIP Alumni

Hugo,

The best solution would be to break your subnet up into 2 smaller subnets.

Lets say you have been allocated 10.10.10.0/24.
You could break this down:-

VLAN 10 DATA 10.10.10.0/25
VLAN 100 VOICE 10.10.10.128/25

!
int vlan 10
desc DATA VLAN
ip add 10.10.10.1 255.255.255.128
no shut
!
!
int vlan 100
desc VOICE VLAN
ip add 10.10.10.129 255.255.255.128
no shut
!


Regards
Alex

 

 

Regards, Alex. Please rate useful posts.

Thanks Alex. any solution without amend the netmask?

Hugo

 

I think that the answer to your question depends on how your interpret the question (and perhaps to some extent on whether you look at this question from layer 2 or from layer 3). Let us think of an example where we have ports Eth 1/1, 1/2, and 1/3 in vlan 100 and Eth 1/4, 1/5, and 1/6 in vlan 200. And let us think that all of the hosts have addresses configured in network 192.168.1.0 (so perhaps the addresses are Eth1/1 is 192.168.1.1, and Eth 1/2 is 192.168.1.2, Eth1/3 is 192.168.1.3, Eth 1/4 is 192.168.1.4, Eth 1/5 is 192.168.1.5, and Eth 1/6 is 192.168.1.6).

 

So from the perspective from layer 2 we do have two vlans in the same subnet. But from the perspective of layer 3 we have a problem. You would not be able to configure (on the same switch) interface vlan 100 with an address in that subnet and interface vlan 200 with an address in that subnet. The IOS would complain about overlapping addresses.

 

And from a functionality standpoint it would not work. The host at 192.168.1.1 would believe that 192.168.1.4 was in its same subnet and would arp for 192.168.1.4. But since arp is only propagated within its own broadcast domain the arp would not be seen by 192.468.1.4 and they would not be able to communicate.

 

So the realistic answer to your question is that no you can not have multiple vlans in the same subnet.

 

HTH

 

Rick

HTH

Rick

Hi Richard,

I know it's an old Question but it has relevance to my problem, so I hope it's okay to take up the thread again.

If it's not possible to have the same subnet on different VLAN on the same switch how do I then share a printer between VLAN 100 and VLAN 200 as the printer vil have an IP of one of the subnet only?

We could perhaps provide better answers if we knew more about your network and how it is set up. But based on the limited information that we know here is my response. Is it correct to assume that the printer is configured with an IP address, mask, and gateway? And correct to assume that devices in the network that need to print will send the print output to the printer using its IP address? If we assume that the printer will have its IP address in VLAN 100 then devices in VLAN 100 will ARP for the printer and will send their print output directly to the printer while devices in VLAN 200 will send the print output using their default gateway to reach the printer in VLAN 100.

 

HTH

 

Rick

HTH

Rick

Hi Richard,

Sorry, forget you don't have a crystal ball :-). the setup is a RV110W a D-link layer 2 switch and 2 wap121. I have VLAN 10, VLAN 20 and VLAN 30 plus VLAN 1 as management VLAN.

it's 3 different offices using the same ISP/router and the same printer. no one from one VLAN may have access to computers on the other offices VLAN.

the printer is now on VLAN 10

It seems that you have a set of mutually contradictory requirements. If you have a requirement to share the printer then there is a requirement to route between VLAN/subnets. But if there is also a requirement that you can not route between subnets then this prevents sharing the printer.

 

Perhaps one solution to think about would be to establish another VLAN. Put only the printer in that VLAN and route from the other VLANs to the VLAN with the printer. Would the policy requirements of your network allow that?

 

HTH

 

Rick

HTH

Rick

there are no Policies set in the network or the RV110W.

Put it in it's own VLAN sound as a good idea. I have no idea how to route from one VLAN to another VLAN, and tick the Inter-VLAN routing box gives access to all VLANs from all VLANs? I suppose that the routing you write about has to be set in the static routing? but which IP subset to put where?

Thanks for your patience with a Rookie :-)

 

Villy

Villy

I am not familiar with the RV110W and its capabilities. So my ability to give advice for it is quite limited. From the screen print which you included it looks like there might not be a workable solution for your requirements.

 

In the IOS based routers with which I am more familiar there are several things which might work. It might be possible to configure each office/vlan in its own VRF which would prevent offices from accessing each other but be able to access the printer in the global table. Or it would be possible to enable routing between the vlans/subnets and to implement access lists to prevent office to office communication while allowing office to printer access.

 

HTH

 

Rick

HTH

Rick

Wow thanks a lot sir.your statement cleared my confusion once and for all.

great explanation! thx

I was able to configure 2 vlans in same switch within same subnet, infact just same ip! I was not able to ping/telnet/ssh into the switch from a host to one of the vlans (the vlan with larger number to be precise).

 

Vlan10 - 192.168.1.1 255.255.255.0

host10a - 192.168.1.100 255.255.255.0 connected to Fa0/10

host10b - 192.168.1.101 255.255.255.0 connected to Fa0/11

 

Vlan20 - 192.168.1.1 255.255.255.0

host20a - 192.168.1.100 255.255.255.0 connected to Fa0/20

host20b - 192.168.1.101 255.255.255.0 connected to Fa0/21

 

Vlan 30 : 192.168.1.1 255.255.255.0

 

10a can ping 10b and Vlan10's ip, but not 20a and 20b (coz they are in different vlan)

20a can ping 20b. Cant ping Vlan20's  ip. Cant ping 10a and 10b as well (coz they are in different Vlan)

 

Now move ports 10 and 11 to vlan 30.

20a can ping 20b and Vlan20's ip, but not 10a and 10b (coz they are in different vlan)

10a can ping 10b. Cant ping Vlan30's  ip. Cant ping 20a and 20b as well (coz they are in different Vlan)

 

 

change

 

 

Hi Srikanth,

Can you please explain to me more detail how to setup the network?

I would like to have exactly setup like your describe. Multiple VLANS with the same IP range and same Subnet.

 

I have Cisco manage switch SG350-10P. I created multiple VLANS but couldn't set the same IP range.

 

Thank you.

 

 

devils_advocate
Level 7
Level 7

I think the answer to your question is no, you cannot have a single subnet assigned to two Vlans.

As Richard explains below, it would work at a purely Layer 2 level but you would not be able to route between them or between them and others subnets as only one Layer 3 port could exist in that single subnet.

Why are you trying to do this?

If you have a device capable of Layer 3 then you should be able to segment the address spaces between vlans.

Review Cisco Networking products for a $25 gift card