MikroTik / RouterOS

VLAN Segmentation on MikroTik RouterOS for Smart-Home, IoT & CCTV

When smart-home devices, CCTV/NVR gear and guest Wi-Fi all sit on the same flat network, one compromised IoT device can see everything else. Here's how RouterOS implements 802.1Q VLAN segmentation to stop that, and where the MikroTik-specific details differ from a generic VLAN write-up.

Independent engineering assessmentVendor-neutral network practiceEU-wide project support
CAN-BUS
CAN
VLAN on RouterOS
How VLAN segmentation works on a MikroTik router + switch

How VLAN segmentation works on a MikroTik router + switch

01

Define the traffic classes

Before touching Winbox, decide what actually needs isolating — typically smart-home/IoT devices, CCTV cameras and NVR, and guest Wi-Fi, each as its own VLAN with its own purpose and risk profile.

02

Tag at the switch

On a CRS or CSS switch, 802.1Q tags get applied port-by-port; some CRS models can push this tagging into the switch chip itself for hardware offload, others handle it in software — check the specific model's datasheet before assuming.

03

Configure bridge VLAN filtering on RouterOS

The router side ties the physical ports and the switch's tagged VLANs together through RouterOS bridge VLAN filtering — this is the piece that actually enforces which VLAN a given port or SSID belongs to.

04

Set firewall policy between segments

VLANs alone only separate broadcast domains — RouterOS firewall filter rules (plus NAT/mangle where relevant) are what actually block or permit traffic between, say, the IoT VLAN and the management VLAN.

What makes this a MikroTik-specific problem

What makes this a MikroTik-specific problem

3

segments, one job each

IoT/smart-home, CCTV/NVR and guest Wi-Fi typically end up as three separate VLANs with three different firewall policies, not three cosmetic SSID names on one flat LAN.

Bridge VLAN filtering as the single control point

RouterOS handles router-side VLAN logic and switch-side port assignment through the same bridge VLAN filtering model, so a change doesn't need to be replicated in two different configuration languages.

Hardware offload on some CRS switch chips

Certain CRS models can tag and switch VLAN traffic directly on the switch chip rather than passing it through the CPU, which matters once a build has several cameras and access points pushing sustained traffic — but this varies by switch chip, so check the model before you plan around it.

CAPsMAN ties Wi-Fi SSIDs to VLANs centrally

In a build with several MikroTik access points, CAPsMAN lets you map a guest SSID to the guest VLAN and a management SSID to the management VLAN from one controller, instead of repeating that mapping on every AP.

Firewall chains do the actual isolation

The VLAN split creates the boundaries; RouterOS filter chain rules (with NAT and mangle handling address translation and traffic marking where needed) decide whether a camera on the CCTV VLAN can reach the NVR but nothing else.

Three configuration paths, one config

Winbox, WebFig or CLI/scripts all reach the same underlying bridge VLAN and firewall configuration — worth deciding upfront which one your team will document in, since a VLAN plan that only lives in someone's head causes problems at the next service visit.

Options

What an integrator actually needs to plan

This is architecture-level scoping, not a command-by-command walkthrough — exact port numbers and rule syntax depend on your specific MikroTik models and RouterOS version.

  • {'t': 'Traffic-class inventory', 'd': "A clear list of what's going on the network — smart-home/IoT devices, CCTV/NVR, guest Wi-Fi, management access — before any VLAN ID gets assigned."}
  • {'t': 'VLAN-to-port and VLAN-to-SSID mapping', 'd': 'Which physical switch ports and which AP SSIDs belong to which VLAN, matched against the physical topology of the install, not just a diagram.'}
  • {'t': 'Firewall policy design between VLANs', 'd': 'A written policy for what each VLAN is allowed to reach — for example, whether the CCTV VLAN needs any path to the internet at all, or only to a local NVR.'}
  • {'t': 'CAPsMAN plan for multi-AP sites', 'd': 'Where more than one access point is involved, a CAPsMAN configuration that keeps SSID-to-VLAN mapping consistent across every AP instead of per-device settings drifting over time.'}
  • {'t': 'Handover documentation', 'd': "A record of VLAN IDs, port assignments and firewall intent that the client's own IT contact or the next integrator on site can actually follow, not just a working config nobody can explain."}
FAQ

Frequently asked questions

Isn't separate Wi-Fi SSIDs enough — do we really need VLANs?

Separate SSIDs only segment the wireless side. Most CCTV cameras and NVRs are wired, and a flat wired network puts them on the same broadcast domain as everything else regardless of Wi-Fi naming — VLANs are what actually separate wired and wireless traffic by function.

Does every MikroTik switch support VLAN hardware offload?

No — offload behavior differs by CRS/CSS model and the switch chip it uses. Some push tagging into the chip, others rely on the CPU. Always check the specific model's datasheet rather than assuming offload is available.

How does remote VPN access fit into a segmented network?

Whether you use WireGuard or IKEv2/IPsec, the VPN endpoint should land the remote user in a specific VLAN with its own firewall scope — not on the flat management network by default. The exact tunnel and routing setup depends on what the technician actually needs to reach.

Is this something we can set up in an afternoon?

Honestly, budget more than that for anything beyond a small residential install. Bridge VLAN filtering, port tagging and firewall policy each need testing, and mistakes here tend to show up as intermittent connectivity issues that are harder to diagnose after the fact than to get right the first time.

How does this page relate to the general managed-switch VLAN guide?

Our managed-switch VLAN segmentation page covers the vendor-neutral decision logic; this page is the MikroTik/RouterOS-specific implementation layer for smart-building traffic. If the switch and router are also going in a cabinet, our rack 19-inch U-space planning page covers where this hardware physically lives.

Planning a segmented network on MikroTik gear?

Send us your device list and site layout — we'll assess which VLAN and firewall structure actually fits, model-specific capabilities included, before you commit to hardware.

Contact our engineers
Related guides

Related guides

Loading...
Back to top