What is V-lan?
V-LAN stands for Virtual Local Area Network. A V-LAN is basically a way to split a single physical network into multiple smaller, logical networks.
Think of it as taking one large office and creating soundproof rooms inside it. People inside one room can talk to each other, but their voices don’t disturb those in the next room.
Similarly, a V-LAN allows devices to communicate only with others in the same VLAN, even though they may all be plugged into the same physical switch.
Key Takeaway
VLANs allow you to divide one physical network into multiple logical networks for better control.
Every VLAN is identified by a unique VLAN ID and usually paired with its own subnet.
VLANs improve security by isolating traffic between departments or groups.
Trunking with 802.1Q tagging lets multiple VLANs share the same physical connection.
Inter-VLAN routing enables devices in different VLANs to communicate when needed.
How V-LANs Work
VLANs operate at Layer 2 of the OSI model (Data Link Layer). Its clear to know that layer 2 only understand mac addresses . When a switch receives data from a router or from air max devices, it uses VLAN tags to decide which devices should receive the traffic and which one should not
Access Ports: These ports connect end devices like PCs, printers, or VoIP phones to one VLAN on the network
Trunk Ports: These carry multiple VLANs across switches or to a router.
Each VLAN has a unique VLAN ID (a number between 1–4094). Devices with the same VLAN ID can communicate as if they were on the same physical network, remember vlan splits a network into smaller one when coonected to the some switch or router.
Types of VLANs
Not all VLANs serve the same purpose. Common VLAN types include:
Default VLAN – Usually VLAN 1; all switch ports belong here until changed.
Data VLAN – Carries regular user traffic such as browsing and emails.
Voice VLAN – Optimized for VoIP traffic to improve call quality.
Management VLAN – Used for remote management of network devices.
Native VLAN – The VLAN that carries untagged traffic on a trunk port.
VLAN vs Subnet
Vlan and subnet can be at some time confusing for a beginner, but i will explain it in a simple term. As stated before, vlan divide the network phsically into smaller network while still connected to the some switch or a router. On the other other end, subnet divide a network into several small network base on IP address.
Example
vlan can be used in a office to divide a network into several small network, lets say one department wants to isolate its traffic from other department, the go to is to perform a vlan operation such that no stuff from lets say finance can be able to see traffic from engineering or sales department
subnet on the other hand, if lets say you are running a coffee shop and you want to expand your store to lets say three different location then you will need to subnet your network into three different sub network which can operate independently and devices within each subnet can communicate without the need of a router. If you want To learn Full info about Sunbnet and subnetting, click HERE
VLAN Configuration Basics
STEP 1: Create VLAN interfaces
Creating VLAN interfaces is the first step in making VLANs functional on your router or switch. A VLAN interface acts like a virtual port that carries traffic for a specific VLAN ID. By assigning each VLAN interface an IP address, the router can identify and route traffic between different VLANs, allowing devices in separate VLANs to communicate when needed. For example, you might create vlan10
for the Sales department and vlan20
for Finance, each with its own subnet. These interfaces ensure that traffic is logically separated, while still giving you the flexibility to manage or connect the networks through inter-VLAN routing.

STEP 2: Assign IP addresses to VLANs
After creating VLAN interfaces, the next step is to assign them IP addresses on each of them. Each VLAN should belong to its own subnetwork, which allows the router to act as a gateway for devices in that VLAN. For example, VLAN 10 might use the subnet 192.168.10.0/24 with the router’s IP set as 192.168.10.1, while VLAN 20 could use 192.168.20.0/24 with the router’s IP as 192.168.20.1.
These IP assignments are crucial because they define the network boundaries for each VLAN and enable inter-VLAN communication when routing is configured. Without unique IP addresses, devices in a VLAN would not know how to reach other networks or even their own default gateway.

STEP 3: Assign ports to VLANs
You can launch this command on the hap terminal to ensure that;
/interface bridge vlan
add bridge=bridge1 tagged=ether1 untagged=ether2 vlan-ids=10
add bridge=bridge1 tagged=ether1 untagged=ether3 vlan-ids=20
Devices on port ether2 belong to VLAN 10.
Devices on port ether3 belong to VLAN 20.
VLANs – Frequently Asked Questions (FAQ)
What is a VLAN ID?
A VLAN ID is a unique number from 1 to 4094 that identifies a specific VLAN within a network. It tells the switch which VLAN a data frame belongs to. For example, VLAN 10 and VLAN 20 are treated as two separate logical networks, even if they share the same switch, note that a vlan can share the some subnet or can use diffent ones as illustrated on the blog above
What does VLAN mean?
VLAN stands for Virtual Local Area Network. It is a way of dividing one physical network into multiple logical networks, giving better security, performance, and traffic control.
Are VLAN and Subnet the same?
No — a VLAN separates a network at Layer 2 (switching), while a Subnet separates it at Layer 3 (IP addressing). In practice, they often work together, with each VLAN typically mapped to its own subnet.
Where is VLAN data stored?
VLAN information is stored in the switch’s configuration file or VLAN database (vlan.dat), depending on the device. The switch uses this stored data to know which ports belong to which VLAN, ensuring traffic is delivered correctly.
Conclusion
VLANs are one of the most powerful tools in networking. They allow you to segment traffic, improve security, and optimize performance without adding extra physical devices.
From the basics of tagging and trunking to real-world setups on devices like the MikroTik RB941, VLANs prove themselves as both simple and highly effective.
Whether you’re a beginner experimenting in a lab or a network admin running a corporate setup, mastering VLANs is a must.