Skip to main content
4 of 4
added 124 characters in body
Zac67
  • 91.5k
  • 4
  • 76
  • 143

there is no way to communicate between two VLANs using only layer 2.

That is correct.

VLANs can communicate with other VLANs when they both use the same trunk link to connect to the same layer 2 switch.

Not at all. As you stated, the point of using VLANs is to separate traffic on L2.

A trunk link is an efficient way to connect multiple VLANs across switches. The VLANs stay separate all the same.

VLANs with the same default gateway can communicate with other VLANs under the same layer 2 switch

Also not necessarily true. VLANs can be separated by several L3 hops/gateways.

The same default gateway = same gateway IP address cannot be true since VLANs need to use distinct IP subnets, and each gateway needs to be part of that subnet.

native VLAN can access other VLANs under the same layer 2 switch.

That might be true if you do it wrong. A frame from the 'native' VLAN is transmitted without VLAN tag on a trunk, so if you use different VLAN IDs as native on both sides of the trunk, those VLANs are bridged and effectively become one. Many would argue that you should tag all VLANs on a trunk, generally, to avoid that problem.

Other than being transmitted without tag, the native VLAN is nothing special, so the general statement is false.

if 2 VLANs are in the same IP subnet, can they communicate ?

Generally not. In your diagram VLANs 2 and 3 are actually bridged (as described above), essentially becoming one VLAN/broadcast domain with different IDs left and right. That would work but should be considered a configuration error.

If the VLANs weren't bridged, nodes couldn't even communicate using L3 gateways since they'd expect the destination to be 'on link' but it isn't. (You could make it work by putting up some elaborate NAT scheme or proxy ARP that I won't dive into here.)

So, if you do it right,

  • nodes on different VLANs cannot communicate directly on layer 2.
  • nodes on different VLANs and different IP subnets can communicate on layer 3 using gateways when those are set up appropriately (belong to the same routing domain, essentially).
  • those gateways may be routers or L3 switches.
Zac67
  • 91.5k
  • 4
  • 76
  • 143