Virtual LANs (VLANs) are essential for segmenting a network into multiple broadcast domains, improving performance, and enhancing security. MikroTik routers, powered by RouterOS, provide robust support for VLANs. Whether you’re working in a business or home network environment, learning how to configure VLANs on a MikroTik device can help you better manage traffic and access control.
This guide walks you through the steps to configure VLANs on a MikroTik router using both the Winbox GUI and CLI (Command Line Interface).
Table of Contents
⚙️ VLAN Configuration on MikroTik Router
📌 Prerequisites
- A MikroTik router with RouterOS installed
- Access to the router (Winbox or terminal)
- Basic understanding of networking and IP addressing
🔧 Step-by-Step: VLAN Configuration via Winbox (GUI)
1. Open Winbox and connect to your MikroTik router

2. Add a VLAN interface
- Go to Interfaces → Click on the “+” and choose VLAN.
- Fill in the following:
- Name: e.g.,
vlan10
- VLAN ID: e.g.,
10
- Interface: Choose the physical interface to attach the VLAN (e.g.,
ether2
)
- Name: e.g.,
- Click OK.

3. Assign IP address to the VLAN
- Go to IP → Addresses
- Click “+”
- Set the Address (e.g.,
192.168.10.1/24
) - Choose your new VLAN interface (e.g.,
vlan10
) - Click OK

Click “+” and Enter your IP Address for your LAN in Network

4. Set up a DHCP Server (optional)
- Go to IP → DHCP Server
- Use the wizard to assign a DHCP server to
vlan10
if needed.

At DHCP go to DHCP Set up

Select Vlan10 for VLAN Interface => Next

Enter IP Address in your network => Next

Set up the Default Gateway of your VLAN Network => Next

Add an IP Address pool, you can exclude some IP Addresses if you need to keep for your other use. Here, I keep 10 IP Addresses and from 11 – 254 for the DHCP Network.

Enter the DNS, I use the Public DNS of Google 8.8.8.8

Set the release time in the network to 8 hours. You can put 4 hours or other time up to you.

Now our DHCP Server is set up successfully.
5. Create firewall rules (optional)
- Control traffic between VLANs using IP → Firewall → Filter Rules
💻 VLAN Configuration via CLI
# Create VLAN interface
/interface vlan add name=vlan10 vlan-id=10 interface=ether2
# Assign IP address to VLAN
/ip address add address=192.168.10.1/24 interface=vlan10
# (Optional) Configure DHCP server for VLAN
/ip pool add name=dhcp_pool10 ranges=192.168.10.10-192.168.10.100
/ip dhcp-server add name=dhcp10 interface=vlan10 address-pool=dhcp_pool10 disabled=no
/ip dhcp-server network add address=192.168.10.0/24 gateway=192.168.10.1
✅ Final Thoughts
Configuring VLANs on MikroTik routers allows you to isolate traffic, enforce security policies, and organize network resources efficiently. Whether through Winbox or the CLI, the process is straightforward once you understand the steps. Always test connectivity between VLANs and review firewall rules to ensure they align with your network policy.
If you plan to configure VLAN trunking or inter-VLAN routing, you’ll need additional configuration on switches and routers. Check out some switches and routers, Mikrotik at Amazon.
Discover more from How To Kh
Subscribe to get the latest posts sent to your email.