Skip to content

Bridge Configuration

A RouterOS bridge is a virtual Layer 2 switch. Physical interfaces added as bridge ports share the same broadcast domain and forward frames by learned MAC addresses. The bridge also acts as the CPU-facing (management) interface for that switched segment.

Key capabilities:

FeatureRouterOS setting
Loop preventionprotocol-mode (STP / RSTP / MSTP)
VLAN-aware switchingvlan-filtering=yes + /interface bridge vlan
Switch-chip accelerationhw=yes on bridge ports
Layer 3 inter-VLAN routingVLAN interfaces on the bridge

/interface bridge add \
name=br1 \
protocol-mode=rstp \
vlan-filtering=no \
comment="Main bridge"

Key bridge-level properties:

PropertyDefaultDescription
nameInterface name
protocol-moderstpSTP variant: none, stp, rstp, mstp
vlan-filteringnoEnable VLAN-aware forwarding and table enforcement
priority0x8000Bridge priority for root election (lower = preferred root)
arpenabledARP handling on the bridge interface
mtu1500Bridge MTU
igmp-snoopingnoConstrain multicast floods using IGMP/MLD listener data
auto-macyesUse lowest-MAC port as bridge MAC (disable to set fixed MAC)
max-message-age20sSTP max-age timer
forward-delay15sSTP forward-delay timer
hello-time2sSTP hello interval

/interface bridge port add \
bridge=br1 \
interface=ether2

Each physical (or logical) interface added here becomes a member of the bridge domain.

Key port-level properties:

PropertyDefaultDescription
bridgeParent bridge
interfaceMember interface
pvid1Port VLAN ID — classifies untagged ingress frames into this VLAN
frame-typesadmit-alladmit-all, admit-only-vlan-tagged, admit-only-untagged-and-priority-tagged
ingress-filteringnoDrop ingress frames whose VLAN is not in the bridge VLAN table for this port
edgeautoyes/no/auto — edge-port status for RSTP fast transition
point-to-pointautoyes/no/auto — P2P link for RSTP fast transition
bpdu-guardnoDisable port if BPDU received (protects access ports)
path-costautoSTP path cost (lower = preferred)
priority0x80STP port priority
hwnoRequest switch-chip hardware offloading for this port
horizonnoneSplit-horizon group (for mesh/stub port isolation)
/interface bridge port print

Spanning Tree Protocol (STP / RSTP / MSTP)

Section titled “Spanning Tree Protocol (STP / RSTP / MSTP)”

STP prevents Layer 2 loops by blocking redundant paths. RouterOS supports three variants selectable via protocol-mode on the bridge.

ModeStandardUse case
noneNo loop protection; only safe on loop-free topologies
stp802.1DLegacy interop; slow convergence (30–50 s)
rstp802.1wFast convergence (< 1 s on point-to-point links); recommended default
mstp802.1sMultiple spanning tree instances per VLAN group; enterprise multi-VLAN environments

The bridge with the lowest bridge ID (priority + MAC) becomes the root. Set a lower priority on the intended root:

# Make br1 the root bridge
/interface bridge set br1 priority=0x1000
# Make br1 the backup root
/interface bridge set br1 priority=0x2000

Priority must be a multiple of 4096 (0x1000). The default 0x8000 (32768) leaves room for both lower and higher values.

Ports with lower accumulated path cost to root are preferred. Tune per-port:

/interface bridge port set [find interface=ether3] path-cost=10
/interface bridge port set [find interface=ether4] path-cost=100

When path cost is equal, port priority breaks the tie (lower = preferred):

/interface bridge port set [find interface=ether3] priority=0x40

Access (host-facing) ports should be edge ports for immediate RSTP forwarding without the listening/learning delay:

/interface bridge port set [find interface=ether2] \
edge=yes \
point-to-point=yes \
bpdu-guard=yes

bpdu-guard=yes disables the port if it receives a BPDU, protecting against accidental switch connections on access ports. Check and recover:

# See disabled ports
/interface bridge port print where disabled=yes
# Re-enable after root cause resolved
/interface bridge port enable [find interface=ether2]

MSTP maps VLANs to independent spanning-tree instances (MSTIs), allowing different VLANs to use different topologies for load balancing. All switches in an MSTP region must share the same region name, revision, and VLAN-to-instance map.

MSTP requires vlan-filtering=yes on the bridge. Attempting to set protocol-mode=mstp without it fails with failure: mstp requires vlan-filtering. Enable VLAN filtering before switching to MSTP mode.

# Enable VLAN filtering first — required for MSTP
/interface bridge set br1 vlan-filtering=yes
# Set MSTP mode and region parameters
/interface bridge set br1 \
protocol-mode=mstp \
region-name=CORP \
region-revision=10
# Map VLANs to instances
/interface bridge msti
add bridge=br1 identifier=1 vlan-mapping=10-19
add bridge=br1 identifier=2 vlan-mapping=20-29
# Set per-instance priority (optional)
/interface bridge msti set [find bridge=br1 && identifier=1] priority=0x1000

A region mismatch (different name, revision, or VLAN map) causes boundary port behavior: switches treat each other as external to the region and fall back to CIST-only interaction, negating per-VLAN topology control.

# Overall bridge state (root bridge, root path cost, topology changes)
/interface bridge monitor br1 once
# Per-port state and roles
/interface bridge port print detail
/interface bridge port monitor [find bridge=br1] once
# Live STP log
/log print follow where topics~"stp"

Key port states: discardinglearningforwarding Key port roles: root, designated, alternate, backup


Bridge VLAN filtering enables VLAN-aware switching entirely within the bridge — no sub-interfaces required. Frames are assigned to VLANs via the PVID on ingress and selectively tagged/untagged on egress per the bridge VLAN table.

  • PVID — untagged ingress frames are placed in this VLAN
  • Tagged port — egresses frames with the VLAN tag intact (trunk)
  • Untagged port — egresses frames with the VLAN tag stripped (access)
  • ingress-filtering — drop ingress frames whose VLAN has no entry for this port
  • frame-types — control which frame types are accepted on ingress
  1. Add all ports to the bridge
  2. Build the VLAN table (/interface bridge vlan)
  3. Configure PVID and frame-types on each port
  4. Then set vlan-filtering=yes

Do not use ether1 (the management interface) as a bridge port. Adding it to a bridge severs SSH/Winbox connectivity and requires console access to recover. Use ether2 or higher for trunk and access ports in these examples.

# Trunk port: ether5 carries all VLANs tagged; bridge (CPU) is tagged member
/interface bridge port
add bridge=br1 interface=ether5 \
frame-types=admit-only-vlan-tagged \
ingress-filtering=yes
# Access ports: untagged on VLAN 10 and VLAN 20 respectively
/interface bridge port
add bridge=br1 interface=ether2 pvid=10 \
frame-types=admit-only-untagged-and-priority-tagged \
ingress-filtering=yes
add bridge=br1 interface=ether3 pvid=20 \
frame-types=admit-only-untagged-and-priority-tagged \
ingress-filtering=yes
# VLAN table entries
/interface bridge vlan
add bridge=br1 vlan-ids=10 tagged=br1,ether5 untagged=ether2
add bridge=br1 vlan-ids=20 tagged=br1,ether5 untagged=ether3
# Enable VLAN filtering only after table is complete
/interface bridge set br1 vlan-filtering=yes

br1 appears as tagged in each VLAN so the CPU (RouterOS) can reach those VLANs — required for management access and inter-VLAN routing.

Isolate management access to a dedicated VLAN:

/interface bridge vlan
add bridge=br1 vlan-ids=99 tagged=br1,ether5
/interface vlan
add name=vlan99-mgmt interface=br1 vlan-id=99
/ip address
add address=192.168.99.1/24 interface=vlan99-mgmt

Only trunk ports with vlan-ids=99 carry management traffic; access ports on other VLANs cannot reach it at Layer 2.

/interface bridge vlan print
/interface bridge port print detail

Check the H (hardware-offloaded) and D (dynamic/PVID-auto-generated) flags on VLAN table entries.


On MikroTik devices with a built-in switch chip (CRS1xx, CRS2xx, CRS3xx, CRS5xx series), frame forwarding can be offloaded to the switch chip rather than handled by the CPU. This dramatically increases throughput and reduces CPU load.

Set hw=yes on each bridge port that should use the switch chip:

/interface bridge port
add bridge=br1 interface=ether5 hw=yes
add bridge=br1 interface=ether2 hw=yes
add bridge=br1 interface=ether3 hw=yes
/interface bridge port print

Ports successfully offloaded show the H flag in the FLAGS column. If the flag is absent, the port falls back to CPU (software) forwarding.

Platform familyL2 HW offloadL3 HW offload
CRS1xx / CRS2xxYesNo
CRS3xx (98DX3xxx)YesYes (with limitations)
CRS5xx / CCR2116 / CCR2216 (98DX7xxx)YesPartial — some features in development
hEX, RB4xx, RB9xx etc.NoNo

Critical constraints:

  • Only one bridge can be hardware-offloaded per device. Additional bridges fall back to software.
  • L3 hardware offloading (routing between VLAN interfaces) requires L2 hardware offloading to be active first.
  • Certain features force CPU path even on offload-capable hardware: connection tracking, NAT, firewall with per-packet inspection, VXLAN termination on some platforms.
  • All ports in the hardware bridge must belong to the same switch chip; mixing ports from different chips disables HW offload.

On supported platforms, inter-VLAN routing through VLAN interfaces on the bridge can also be accelerated by the switch chip:

# Enable L3HW (requires L2 HW offload already active)
/interface bridge set br1 vlan-filtering=yes
# Verify L3HW is active
/interface ethernet switch print detail

Look for l3-hw-offloading: yes in the switch output and check that routed flows are handled in hardware (monitor CPU utilization under load).


RouterOS performs inter-VLAN routing by creating VLAN interfaces on the bridge — each acts as a Layer 3 gateway (analogous to an SVI on Cisco IOS) for its VLAN.

  • Bridge VLAN filtering enabled
  • Bridge VLAN table configured with the bridge (br1) as a tagged member of each routed VLAN (gives the CPU a presence in each VLAN)

Step 1 — Configure the Bridge and VLAN Table

Section titled “Step 1 — Configure the Bridge and VLAN Table”
/interface bridge
add name=br1 vlan-filtering=yes
/interface bridge port
add bridge=br1 interface=ether5 # trunk
add bridge=br1 interface=ether2 pvid=10 \
frame-types=admit-only-untagged-and-priority-tagged # access VLAN 10
add bridge=br1 interface=ether3 pvid=20 \
frame-types=admit-only-untagged-and-priority-tagged # access VLAN 20
/interface bridge vlan
add bridge=br1 vlan-ids=10 tagged=br1,ether5 untagged=ether2
add bridge=br1 vlan-ids=20 tagged=br1,ether5 untagged=ether3

Step 2 — Create VLAN Interfaces and Assign Gateway IPs

Section titled “Step 2 — Create VLAN Interfaces and Assign Gateway IPs”
/interface vlan
add name=vlan10 interface=br1 vlan-id=10
add name=vlan20 interface=br1 vlan-id=20
/ip address
add address=192.168.10.1/24 interface=vlan10
add address=192.168.20.1/24 interface=vlan20

Hosts in VLAN 10 use 192.168.10.1 as their default gateway; hosts in VLAN 20 use 192.168.20.1.

/ip pool
add name=pool-vlan10 ranges=192.168.10.100-192.168.10.199
add name=pool-vlan20 ranges=192.168.20.100-192.168.20.199
/ip dhcp-server
add name=dhcp-vlan10 interface=vlan10 address-pool=pool-vlan10
add name=dhcp-vlan20 interface=vlan20 address-pool=pool-vlan20
/ip dhcp-server network
add address=192.168.10.0/24 gateway=192.168.10.1 dns-server=192.168.10.1
add address=192.168.20.0/24 gateway=192.168.20.1 dns-server=192.168.20.1

Inter-VLAN traffic passes through the IP firewall forward chain. Without rules all routed traffic between VLANs is allowed by default (assuming no drop-all default rule).

/ip firewall filter
# Allow established/related sessions
add chain=forward action=accept connection-state=established,related
# Drop invalid
add chain=forward action=drop connection-state=invalid
# Example: allow VLAN 10 to reach VLAN 20 but block the reverse
add chain=forward action=accept \
in-interface=vlan10 out-interface=vlan20 \
comment="VLAN10 -> VLAN20 allowed"
add chain=forward action=drop \
in-interface=vlan20 out-interface=vlan10 \
comment="VLAN20 -> VLAN10 blocked"

Adjust the policy to match your security requirements. Traffic from a VLAN to the router itself (DNS, DHCP replies) uses the input chain.

RouterOS CPU
┌────────────────────────┐
│ vlan10 vlan20 │
│ 192.168.10.1 192.168.20.1 │
└──────────┬─────────────┘
│ br1 (tagged member of VLAN 10 + 20)
┌──────────┴─────────────┐
│ br1 bridge │
│ ether5 (trunk) │
│ ether2 (access VLAN10) │
│ ether3 (access VLAN20) │
└────────────────────────┘

# Check bridge is up and ports are not blocked
/interface bridge monitor br1 once
/interface bridge port print detail
# Check VLAN table if vlan-filtering=yes
/interface bridge vlan print

Ensure vlan-filtering=yes bridges have VLAN table entries for the VLANs in use. A missing entry drops all traffic to/from that VLAN.

# Check for frequent topology changes
/interface bridge monitor br1 once
# Look at: topology-change, topology-change-count
# Identify which port triggers changes
/interface bridge port print detail
# Look at: edge, designated-port, role, status
/log print follow where topics~"stp"

Ports connected to end-hosts should have edge=yes and bpdu-guard=yes to prevent accidental loops.

Hardware offload not active (H flag missing)

Section titled “Hardware offload not active (H flag missing)”

Common causes:

  • Bridge has more than one bridge configured on the device (only one gets HW)
  • Ports belong to different switch chips
  • vlan-filtering=yes with a VLAN configuration not supported by the chip (check chip docs)
  • Platform does not have a switch chip
/interface bridge port print
/interface ethernet switch print
  1. Confirm bridge VLAN table has br1 as tagged member of the VLAN — without this the CPU cannot inject/receive frames for that VLAN.
  2. Confirm VLAN interface exists on the correct bridge and has an IP.
  3. Check firewall forward chain is not dropping traffic.
/interface bridge vlan print
/interface vlan print
/ip address print
/ip firewall filter print