What Are VLANs And How Do They Work?

what are vlans and how do they work.

What Are VLANs And How Do They Work?

What is VLAN

If you are learning the basics of networking, you will definitely not be separated from the name VLAN. Maybe right now you are confused about what a VLAN is. In this post the admin will explain to you what a VLAN is and how it works.

Also read: Types of Computer Networks and Their Definitions


1. What are VLANs?

2. VLAN history

3. Types of VLANs

4. Type of VLAN Port Type

5. Untagged VLAN

6. Tagged VLANs

7. Native VLAN

8. How VLANs Work

9. When Do You Need a VLAN?

10. Advantages of VLANs

11. Lack of VLANs

12. Conclusion

What are VLANs?

VLAN (Virtual LAN) is a subnetwork that can group devices on physical Local Area Networks (LAN) separately. A LAN is a group of computers and devices that share a communication line or wireless link to servers within the same geographic area.

VLANs make it easy for network administrators to partition a single switch network to match their system's functional and security requirements without having to run new cables or make major changes to their current network infrastructure. VLANs are often created by larger businesses to repartition devices for better traffic management.

VLANs are also important because they can help improve the overall performance of a network by grouping the devices that communicate most frequently. VLANs also provide security on larger networks by allowing a higher level of control over which devices have access to each other.

VLANs tend to be flexible because they are based on logical, not physical connections. One or more manageable switches can support multiple VLANs, creating a Layer 2 (data link) subnet implementation. VLANs are associated with broadcast domains. Usually consists of one or more manageable switches

Also Read: What Is OSI Layer 7? Here's the explanation

VLAN History

In the past before switches and VLANs existed, Ethernet networks were connected via hubs. The hub puts all network hosts onto a single ethernet segment. It's a bit like chaining each host to the next. This is still an improvement on the older token-bus network. At least the host failure didn't cause a chain break.

One major limitation for hubs is that all hosts are on the same collision domain. This means that if two hosts are transmitted at once, data can 'collision', and must be retransmitted. Switches were introduced to solve this, as each port becomes an individual collision domain.

Basic switches, called 'unmanaged switches' have only simple functions. They do not have configurable VLAN support. This means that all hosts on the switch are still part of the same broadcast domain. Meanwhile, managed switches allow the separation of traffic using VLANs. In 2003, Ethernet VLANs were described in the first edition of the IEEE 802.1Q standard.

Types of VLANs

  * Protocol VLAN- which handles traffic based on its protocol. The switch will separate or forward the traffic based on the traffic protocol.

  * Static VLAN- Commonly referred to as a port-based VLAN, requires a network administrator to assign ports on a network switch to a virtual, temporary network.

  * Dynamic VLAN- allows network administrators to define network membership based on device characteristics, instead of switching port locations.

VLAN Port Type

Untagged VLAN

A switchport can be either a 'Tagged' or an 'Untagged' port. An untagged port, or access port on a switch, connects to a host (such as a server). The connected host sends its traffic without a VLAN tag on the frame. When the frame reaches the switch port, the switch adds a VLAN tag.

The switch port is configured with the VLAN ID to be included in the tag. Most switchports will use this mode by default, with VLAN ID 1. When a frame leaves an unmarked port, the switch removes the VLAN tag from the frame. Traffic continued as usual.

VLAN Port Untagged

Tagged VLANs

Another type of VLAN port is 'port tagged' when the interface expects a frame containing a VLAN tag. An example of this is when two switches are connected, and pass tagged traffic. The switch will use the term 'trunk' to refer to the tagged port. The sender will send the frame with the VLAN tag.

The receiving switch will see the VLAN tag, and if the VLAN is allowed, it will forward the frame as required. For example, broadcasts may be received on VLAN 10. In this case, the switch will flood frames to all other ports configured with VLAN 10.

VLAN Port Tagged

Native VLAN

In some cases, untagged frames will arrive at the tagged port. To handle this, tagged ports have special VLANs configured on them called untagged VLANs. This is also known as 'Native VLAN'. The switch assigns every untagged frame that arrives on the tagged port to the Native VLAN. If the frame on the native VLAN leaves the trunk port (tagged), the switch removes the VLAN tag. In short, a native VLAN is a way to carry untagged traffic across one or more switches.

Bringing tagless traffic has its uses. This occurs when one switch wants to send information to another switch. Or so-called switch-to-switch communication which is used to share information about connected devices. In this case, if there is a trunk link between two switches, the sending switch will decide which VLAN to use? In short, it sends untagged traffic, which is on the native VLAN.

How VLANs Work

Each VLAN configured on an Ethernet switch can perform address learning, forwarding, filtering, and loop elimination mechanisms like a separate physical bridge. This allows network administrators to group hosts together even if the hosts are not directly connected to the same network switch.

For example, VLANs can be used to separate traffic within a business so that users or low priority traffic cannot directly affect the rest of the network's functionality. Many Internet hosting services use VLANs to separate their customers' private zones from one another, allowing each customer's servers to be grouped together in a single network segment while residing anywhere in their data center.

You can define one or more virtual bridges in a switch. Each virtual bridge you create on the switch refers to a new broadcast domain (VLAN). Traffic cannot pass directly to other VLANs (between broadcast domains) within a switch or between two switches. To connect two different VLANs, you can use a router or Layer 3 switch.

When to Need a VLAN?

  * You have more than 200 devices on your LAN

  * You have a lot of broadcast traffic on your LAN

  * User groups need more security or are being slowed down by too many broadcasts

  * User groups must use the same broadcast domain because they run the same application. An example is a company that has VoIP phones. Users using the phone can use a different VLAN, not the normal user.

  * To make one switch into multiple virtual switches.

Advantages of VLANs

 1. Security is guaranteed

 2. Cheaper cost

 3. Better network performance

 4. Reducing broadcast domain size

 5. Make device management easier

Disadvantages of VLANs

 1. Management is complex

 2. Understandable issues in interoperability

 3. VLANs cannot forward traffic to other VLANs. A router is required to communicate between VLANs

 4. Limitation of 4096 VLANs per switching domain


So what are VLANs? A VLAN is a logical group of workstations, servers and network devices that appear to be on the same LAN. VLANs allow multiple networks to work virtually as a single LAN.

One of the most beneficial elements of a VLAN is that it eliminates network latency, which saves network resources and increases network efficiency.

In addition, VLANs are created to provide segmentation and assist in issues such as security, network management and scalability. Traffic patterns can also be easily controlled using VLANs.

Previous Post Next Post