When talking about VLANs I often see examples like this:

VLAN 10 -

VLAN 20 -

Different subnets yet different VLANs. I understand this is a must if we want communication between VLAN 10 and VLAN 20.

But if there is no need for inter-VLAN communication, can we have something like this:

VLAN 10 -

VLAN 20 -

Same subnet but different VLANs? If not then what is the point of VLAN?

  • If both vlans are never going to talk to the other, or out through a router that needs to route return traffic to the correct location, this can work... but you should really draw out both forward/reverse traffic paths. – cpt_fink Oct 1 '19 at 6:42
  • No it's not feasible to have different VLANs on same subnet . General vlan is logically segmentation of network . So each vlan had to be in different subnet – Sagar Uragonda Dec 4 '20 at 15:52

Yes, that is a legitimate use as secondary vlan.

Vlan are layer 2, ip is layer 3. Layer 2 doesn't care what happens on upper layer, only you care!

If you don't mind managing overlapping ip (because you don't need intervlan routing and you like hard troubleshooting) you can decide to use same network on different vlan.

That isn't common, neither usually a good choice if you are not a ISP: there are enough private addresses to use and it will be problematic if one day you need to implement intervlan routing.

A tipical case when it's useful is if you serve multiple customers on a layer 2 line and they don't have to speak each other without a nat. You shall use port isolation and use the community option to permit intravlan switching. Here in a nutshell how it works:

private vlan

Another application of private VLANs is to simplify IP address assignment. Ports can be isolated from each other at the data link layer (for security, performance, or other reasons), while belonging to the same IP subnet

  • 1
    Where's the connection of private VLAN to multiple use of a subnet prefix? I don't get it. – Zac67 Sep 29 '19 at 12:15
  • You can use the same prefix on different vlan.That shall be useful if you use different secondary, one per costumers, that doesn't need to communicate each other (so you don't have to worry about overlapping ip). – feligiotti Sep 29 '19 at 12:22
  • 1
    A private VLAN is a VLAN where the ports can only communicate with the uplink port(s), not between each other. You mean separate VLANs, and using the same prefix for isolation is not a very smart idea... – Zac67 Sep 29 '19 at 12:39
  • Community. Please read it all – feligiotti Sep 29 '19 at 12:41
  • Private vlans are attached to the same subnet/gateway, just because the private vlan function prevents x.x.x.10/24 and x.x.x.20/24 from communicating does not mean they are separate subnets. – cpt_fink Oct 1 '19 at 6:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.