Router – Why do Vlans need routers to communicate

Networkroutersubnettopologyvlan

Why do devices on two separate VLANs (Virtual LANs) implemented on the same switch require a router to communicate?

Best Answer

Why Vlans need routers to communicate?

Brief answer, they don't. A VLAN is a virtual LAN. It is a means of logically dividing one physical switch into multiple virtual switches.

If you have two different physical switches (no VLANs configured) can the devices connected to each switch communicate? No, not unless there is something that facilitates or allows the communication between the separate switches.

Simplest solution is then providing a physical connection between the two switches (i.e. connect a network cable between the two). This now allows devices on one switch to communicate devices on the second switch...at least at L2. This also works with VLANs. If you simply want L2 communication between two different VLANs, all you need to do is provide a connection between the two.

A router is necessary for L3 communication to take place. Say you have multiple devices all connected to one switch with no VLANs (or all to a single VLAN) with half of the devices using a 192.168.10.0/24 subnet and the other half using 10.168.10.0/24. Can any two devices on different subnets communicate with each other? The answer is yes and no.

Yes, they can when you are talking about L2 communications. But if you want to connect to them using L3 (i.e. IP), then no. To allow devices on two different L3 subnets to communicate, the traffic must be routed across the L3 boundary. This is where the router comes into the picture.

The likely source of your question is the common perception that a single VLAN is associated to a single IP subnet. While this is often the case, it is not always so. You can use multiple different IP subnets on a single VLAN, and you can use a single subnet on multiple VLANs. Both are possible, although you really should understand how this works and more importantly why you would want to do so before you do.