MikroTik Bridge VLAN Filtering – Full Setup Tutorial for Secure Your Network

 

MikroTik Bridge VLAN Filtering – Full Explanation with Configuration

Bridge VLAN Filtering in MikroTik is essential when you're managing VLANs (Virtual LANs) using hardware offloading for high performance (using a bridge instead of a router). It's the modern and efficient method for VLAN management in RouterOS 6.41+ and RouterOS v7.

๐Ÿ” What is Bridge VLAN Filtering?

Bridge VLAN filtering allows you to isolate or segment traffic on different VLANs through one bridge interface, applying VLAN rules per-port efficiently.

๐Ÿงฑ Key Concepts for VLAN Filtering:

  • Bridge: Logical switch combining multiple interfaces.

  • VLAN: Virtual separation of Layer 2 domains.

  • PVID (Port VLAN ID): Used for untagged incoming traffic.

  • Tagged: Traffic with VLAN ID.

  • Untagged: Plain Ethernet traffic.

Example Scenario for the Mikrotik Configuration. 

If We have:

  • ether1 as uplink to trunk (to switch or another router)

  • ether2 for VLAN 10

  • ether3 for VLAN 20

๐ŸŽฏ Goal:

  • Create VLAN 10 and VLAN 20.

  • Pass VLAN traffic using bridge with filtering.

  • Make sure each port can only communicate within its VLAN.

⚙️ Step-by-Step Configuration (CLI)

๐Ÿ”น Step 1: Create a Bridge


            /interface bridge                add name=bridge1 vlan-filtering=yes

๐Ÿ”น Step 2: Add Ports to the Bridge

             /interface bridge port
               add bridge=bridge1 interface=ether1                add bridge=bridge1 interface=ether2 pvid=10                add bridge=bridge1 interface=ether3 pvid=20
  • ether1: Trunk port (allows tagged VLANs)

  • ether2 and ether3: Access ports (untagged, assigned PVID)

๐Ÿ”น Step 3: Add VLANs to the Bridge

            /interface bridge vlan
               add bridge=bridge1 vlan-ids=10 tagged=ether1 untagged=ether2                add bridge=bridge1 vlan-ids=20 tagged=ether1 untagged=ether3

๐Ÿ”น Step 4: Add VLAN Interfaces (optional for routing or IP assigning)

            /interface vlan
               add interface=bridge1 name=vlan10 vlan-id=10                add interface=bridge1 name=vlan20 vlan-id=20

๐Ÿ”น Step 5: Assign IP Addresses (if needed)

            /ip address
               add address=192.168.10.1/24 interface=vlan10                add address=192.168.20.1/24 interface=vlan20

๐Ÿงช Verify of your configuration

  • See bridge VLAN configuration:

        /interface bridge vlan print
  • Check PVIDs and ports:


        /interface bridge port print
  • Monitor traffic:


        /interface bridge monitor bridge1

๐Ÿ›ก️ Security Tips to configure this in Mikrotik. 

  • Always filter VLANs to block unnecessary traffic.

  • Set vlan-filtering=yes to activate rules.

  • Avoid placing management access on trunk ports without proper firewall rules.


If anyone face any problem to configure this or face problem to understand please hit me up to the comment box. If you get this helpful be with us. 

Comments

Popular posts from this blog

๐Ÿ”“ Complete Guide to AndroRAT: Hack Android Devices Over LAN & Internet Using Python - Educational Purposes Only

How to Use Bettercap for ARP Spoofing & MITM Attacks and its Prevention: Being Expert of MITM

How to protect ARP spoofing & DNS Spoofing in a Mikrotik Network.