It is clear that hosts on two different VLANs can't directly communicate on a single switch, but how do they communicate to each other at all? Do they use a router? How does it work?

4 Answers 4


Two separate VLANs must communicate through a layer-3 device, like a router.

Devices on a VLAN communicate with each other using layer-2. Layer-3 must be used to communicate between separate layer-2 domains.

Assuming the most common communications (layer-2 is ethernet and layer-3 is IP), when a host on a VLAN wants to communicate with another host on the same VLAN, it discovers the other hosts layer-2 (e.g. MAC) address with something like ARP, and it sends the frame to the MAC address.

When a host on one VLAN wants to send something to a host on another VLAN, it must use a layer-3 (e.g. IP) address. The host will use layer-2 to send the frames to its defined gateway (router). The router will strip off the layer-2 frame and inspect the layer-3 packet for the destination layer-3 address. The router will then look up the next hop for the layer-3 address. It will then create a new layer-2 frame for the layer-3 packet based on the layer-2 LAN on the interface where it needs to send the packet for the next hop. Other routers which may be in the path to the end LAN will repeat this process until the frame is placed on the final VLAN, where the receiving host gets the frame.

You should search for the OSI model and learn how it works. Just remember that it is a model, and some things in the real world don't necessarily work exactly like the model would predict, but it will give you a gross understanding of how data travel from an application on one host to an application on another host.


A Vlan is a broadcast domain . By default hosts in single Vlan communicates to each other . But host in different Vlans won't communicate to each other , to ensure communication between different Vlans host routing between Vlans is mandatory for Configuring routing between Vlan layer3 device is required .

inter-Vlan routing or by using layer3 device SVi can be configured with different Vlans and make them talk to each .


Two devices on the same VLAN can communicate even if they have different subnet addresses. If the two are aware of their MAC adresses. You can define the MAC address of a device using ARP command on command line of a PC. Nonetheless I am not totally sure if this is sufficient if you carry on this operation only on one of the two devices.

  • 1
    While static ARP entries enable L2 communication, most IP stacks will drop the packet when its destination is a non-local IP address.
    – Zac67
    Commented Jun 25, 2017 at 8:24

Hostes within a VLAN are defined in collision domains. So they communicate by layer 2 devices while 2 VLANs are defined by broadcast domains. So communications between 2 VLANs has to be with routing.

  • 3
    A VLAN can consist of many collision domains, at least one per switch port. Note that CSMA/CD and half-duplex mode are largely obsolete.
    – Zac67
    Commented Apr 30, 2021 at 5:32
  • 2
    A collision domain could even span multiple VLANs, when they're trunked across a repeater hub.
    – Zac67
    Commented Apr 30, 2021 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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