Skip to main content
Version: 7.26

Bridging and Switching


Station A on LAN 1 and Station B on LAN 2, joined by a bridge device whose bridge connects MAC 1 and MAC 2 below the IP layer

Ethernet-like networks (Ethernet, Ethernet over IP, IEEE 802.11 in ap-bridge or bridge mode, WDS, VLAN) can be connected together using MAC bridges. The bridge feature allows the interconnection of hosts connected to separate LANs (using EoIP, geographically distributed networks can be bridged as well if any kind of IP network interconnection exists between them) as if they were attached to a single LAN. As bridges are transparent, they do not appear in the traceroute list, and no utility can make a distinction between a host working in one LAN and a host working in another LAN if these LANs are bridged. However, depending on the way the LANs are interconnected, latency and data rate between hosts may vary.

Network loops may emerge (intentionally or not) in complex topologies. Without any special treatment, loops would prevent the network from functioning normally, as they would lead to avalanche-like packet multiplication. Each bridge runs an algorithm that calculates how the loop can be prevented. (R/M)STP allows bridges to communicate with each other, so they can negotiate a loop-free topology. All other alternative connections that would otherwise form loop are put on standby, so that should the main connection fail, another connection could take its place. This algorithm exchanges configuration messages (BPDUs - Bridge Protocol Data Unit) periodically, so that all bridges are updated with the newest information about changes in the network topology. (R/M)STP selects a root bridge, which is responsible for network reconfiguration, such as blocking and opening ports on other bridges. The root bridge is the bridge with the lowest bridge ID.

Bridge Interface Setup​


To combine a number of networks into one bridge, a bridge interface should be created. Later, all the desired interfaces should be set up as its ports. By default, bridge MAC address will be chosen automatically, depending on the bridge port configuration. To avoid unwanted MAC address changes, it is recommended to disable auto-mac and manually specify the MAC address by using admin-mac.

warning

Changing certain properties restarts the bridge spanning tree, so non-edge ports can be blocked for a while until the topology is recalculated and packets are dropped in the meantime. Take this into account on production networks. Such properties include vlan-filtering, protocol-mode, igmp-snooping, fast-forward and others.

Example​

The following example demonstrates how to create and verify a basic bridge interface for simple Layer 2 switching. This configuration creates a bridge that combines multiple Ethernet ports into a single switched network segment.

/interface bridge
add name=bridge1
/interface bridge port
add bridge=bridge1 interface=sfp-sfpplus1
add bridge=bridge1 interface=sfp-sfpplus2
add bridge=bridge1 interface=sfp-sfpplus3
add bridge=bridge1 interface=sfp-sfpplus4
[admin@MikroTik] > interface bridge print
Flags: R - RUNNING
0 R name="bridge1" mtu=auto actual-mtu=1500 l2mtu=1584 arp=enabled
arp-timeout=auto mac-address=DC:2C:6E:8C:D2:C3 protocol-mode=rstp
fast-forward=yes igmp-snooping=no auto-mac=yes ageing-time=5m
priority=0x8000 max-message-age=20s forward-delay=15s transmit-hold-count=6
vlan-filtering=no dhcp-snooping=no dhcpv6-snooping=no ra-guard=no
port-cost-mode=long max-learned-entries=auto mlag-peer-port=none
mlag-priority=128 mlag-heartbeat=5s mlag-init-delay=1m
mlag-lacp-fallback=yes current-mac=DC:2C:6E:8C:D2:C3 current-mac-src=3

Bridge Monitoring​

To monitor the current status of a bridge interface, use the monitor command.

[admin@MikroTik] /interface/bridge/monitor bridge1
state: enabled
current-mac-address: DC:2C:6E:8C:D2:C3
bridge-id: 0x8000.DC:2C:6E:8C:D2:C3
root-bridge: no
root-bridge-id: 0x1000.08:55:31:A5:9D:49
root-path-cost: 2000
root-port: sfp-sfpplus1
port-count: 4
designated-port-count: 3
topology-changes: 7
last-topology-change: 5h43m12s
max-age: 20s
hello-time: 2s
forward-delay: 15s
fast-forward: no

Spanning Tree Protocol​


RouterOS bridge interfaces are capable of running Spanning Tree Protocol to ensure a loop-free and redundant topology. For small networks with just 2 bridges, STP does not bring many benefits, but for larger networks, properly configured STP is very crucial, leaving STP-related values at default may result in a completely unreachable network in case of even a single bridge failure. To achieve a proper loop-free and redundant topology, it is necessary to properly set bridge priorities, port path costs, and port priorities.

warning

The bridge priority accepts any value between 0 and 65535, but the IEEE 802.1W standard requires it in steps of 4096. When a different value is configured, RouterOS stores it as entered but ignores the 12 lowest bits, so the priority actually advertised is rounded down to the nearest multiple of 4096. For example, 1234 is advertised as 0 and 65535 as 0xF000. To avoid incompatible or misleading values, use only 0 (0x0000), 4096 (0x1000), 8192 (0x2000) … 61440 (0xF000).

STP has multiple variants; currently, RouterOS supports STP, RSTP, and MSTP. Depending on needs, either one of them can be used; some devices are able to run some of these protocols using hardware offloading; detailed information about which devices support it can be found in the Hardware Offloading section. STP is considered to be outdated and slow; it has been almost entirely replaced in all network topologies by RSTP, which is backward compatible with STP. For network topologies that depend on VLANs, it is recommended to use MSTP since it is a VLAN-aware protocol and gives the ability to do load balancing per VLAN groups. There are a lot of considerations that should be made when designing an STP-enabled network, more detailed case studies can be found in the Spanning Tree Protocol article. In RouterOS, the protocol-mode property controls the used STP variant.

info

RouterOS bridge does not work with PVST and its variants. The PVST BPDUs (with a MAC destination 01:00:0C:CC:CC:CD) are treated by RouterOS bridges as typical multicast packets. In simpler terms, they undergo RouterOS bridge/switch forwarding logic and may get tagged or untagged.

info

By the IEEE 802.1ad standard, the BPDUs from bridges that comply with IEEE 802.1Q are not compatible with IEEE 802.1ad bridges. This means that the same bridge VLAN protocol should be used across all bridges in a single Layer2 domain; otherwise (R/M)STP will not function properly.

Per-port STP​

There might be certain situations where you want to limit STP functionality on a single port or multiple ports. Below you can find examples for different use cases.

warning

Be careful when changing the default (R/M)STP functionality; make sure you understand the working principles of STP and BPDUs. Misconfigured (R/M)STP can cause unexpected behavior.

Create Edge Ports and Enable BPDU Guard​

Edge ports connect to end devices that do not participate in STP, such as workstations or routers. Setting edge=yes allows the port to skip the STP listening and learning states and transition directly to the forwarding state. To protect the network from an unauthorized bridge or switch connected to an edge port, also enable bpdu-guard=yes.

/interface/bridge
add name=bridge1
/interface/bridge/port
add bridge=bridge1 interface=ether1 edge=yes bpdu-guard=yes
add bridge=bridge1 interface=ether2

When a protected port receives a BPDU, the bridge port becomes inactive and the following log entry is added:

2026-09-21 13:46:30 bridge,stp,warning bpdu-guard disabling ether1 due to received bpdu

The port remains inactive until it is manually re-enabled. Print the bridge port table to view the I (inactive) flag and the explanatory BPDU Guard comment:

[admin@MikroTik] /interface/bridge/port/print
Flags: I - INACTIVE; H - HW-OFFLOAD
Columns: INTERFACE, BRIDGE, HW, HORIZON, TRUSTED, TRUSTED-RA, TRUSTED-DHCPV6, TRUSTED-ARP, FAST-LEAVE, BPDU-GUARD, EDGE, POINT-TO-POINT, PVID, FRAME-TYPES
# INTERFACE BRIDGE HW HORIZON TRUSTED TRUSTED-RA TRUSTED-DHCPV6 TRUSTED-ARP FAST-LEAVE BPDU-GUARD EDGE POINT-TO-POINT PVID FRAME-TYPES
;;; BPDU guard changed port role to disabled due to received BPDU frame, manual bridge port re-enable is required
0 IH ether1 bridge1 yes none no no no no no yes yes auto 1 admit-all
1 H ether2 bridge1 yes none no no no no no no auto auto 1 admit-all

Remove the unauthorized bridge or correct the BPDU source first. After the port is re-enabled, the inactive flag and BPDU Guard comment are cleared:

[admin@MikroTik] /interface/bridge/port/disable [find interface=ether1]
[admin@MikroTik] /interface/bridge/port/enable [find interface=ether1]
[admin@MikroTik] /interface/bridge/port/print
Flags: H - HW-OFFLOAD
Columns: INTERFACE, BRIDGE, HW, HORIZON, TRUSTED, TRUSTED-RA, TRUSTED-DHCPV6, TRUSTED-ARP, FAST-LEAVE, BPDU-GUARD, EDGE, POINT-TO-POINT, PVID, FRAME-TYPES
# INTERFACE BRIDGE HW HORIZON TRUSTED TRUSTED-RA TRUSTED-DHCPV6 TRUSTED-ARP FAST-LEAVE BPDU-GUARD EDGE POINT-TO-POINT PVID FRAME-TYPES
0 H ether1 bridge1 yes none no no no no no yes yes auto 1 admit-all
1 H ether2 bridge1 yes none no no no no no no auto auto 1 admit-all

Enable Root Guard​

Root Guard is a spanning tree security feature that prevents a port from becoming the root port, thereby protecting the active spanning tree topology from being influenced by external bridges. In this example, ether1 is configured with restricted-role=yes. This setting prevents the port from becoming the root port for the CIST or any MSTI, regardless of its best spanning tree priority vector. Such a port will be selected as an Alternate Port (in discarding state) and will remain in that state as long as it continues to receive superior BPDUs. It will automatically transition to the forwarding state when it no longer detects a superior root path. Network administrators may enable this setting to safeguard against external bridges influencing the active spanning tree.

/interface/bridge
add name=bridge1
/interface/bridge/port
add bridge=bridge1 interface=ether1 restricted-role=yes
add bridge=bridge1 interface=ether2
[admin@MikroTik] /interface/bridge/port/monitor [find]
interface: ether1 ether2
status: in-bridge in-bridge
port-id: 0x80.1 0x80.2
role: alternate-port designated-port
edge-port: no yes
edge-port-discovery: yes yes
point-to-point-port: yes yes
external-fdb: no no
sending-rstp: yes yes
learning: no yes
forwarding: no yes
actual-path-cost: 2000 2000
internal-root-path-cost: 2000
designated-bridge-id: 0x7000.64:D1:54:C7:3A:6E
designated-internal-cost: 0 0
designated-port-id: 0x80.1 0x80.2
designated-remaining-hops: 20 20
tx-rx-bpdu: 2/363 4/1049
discard-transitions: 0 0
forward-transitions: 0 0
tx-rx-tc: 0/2 2/4
topology-changes: 0 1
last-topology-change: 34m53s
host-moves: 0 0
multicast-router: no yes
hw-offload-group: switch1 switch1
declared-vlan-ids:
registered-vlan-ids:

Bridge Settings​


Under the bridge settings menu, it is possible to control certain features for all bridge interfaces and monitor global bridge counters.

warning

In case you want to assign Simple Queues or global Queue Trees to traffic that is being forwarded by a bridge, then you need to enable the use-ip-firewall property. Without using this property the bridge traffic will never reach the postrouting chain. Simple Queues and global Queue Trees are working in the postrouting chain. To assign Simple Queues or global Queue Trees for VLAN or PPPoE traffic in a bridge you should enable the appropriate properties as well.

Port Settings​


The Port submenu is used to add interfaces in a particular bridge with the interface, bridge, pvid, priority and path-cost settings.

info

RouterOS can handle a maximum of 1024 bridged interfaces per bridge; this limit is fixed and cannot be modified. If you try to add more interfaces as bridge ports, it may lead to unpredictable behavior.

Example​

This example demonstrates how to add Ethernet ports to an existing bridge interface to create a simple Layer 2 switching setup. By adding ether1 and ether2 to bridge1, these physical ports become part of a single switched network segment, allowing devices connected to either port to communicate with each other as if they were on the same LAN.

First, add each port to the bridge interface:

/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=ether2

Verify the configuration by displaying the bridge port table:

[admin@MikroTik] /interface/bridge/port/print
Flags: X - disabled, I - inactive, D - dynamic, H - hw-offload
# INTERFACE BRIDGE HW PVID PRIORITY PATH-COST INTERNAL-PATH-COST HORIZON
0 ether1 bridge1 yes 100 0x80 10 10 none
1 ether2 bridge1 yes 200 0x80 10 10 none

The output confirms both ports are now bridged together. The H flag indicates that hardware offloading is active, meaning the switch chip is handling packet forwarding for optimal performance. Each port is assigned a default PVID (Port VLAN ID) of 100 and 200 respectively, and both use the standard STP priority of 0x80.

Interface Lists​

Interface lists can be added as bridge ports and sorted. Interface lists simplify firewall rule configuration by grouping multiple interfaces together. The following example demonstrates how to add an interface list to a bridge:

/interface/list
add name=LAN1
add name=LAN2
/interface/list/member
add interface=ether1 list=LAN1
add interface=ether2 list=LAN1
add interface=ether3 list=LAN2
add interface=ether4 list=LAN2
/interface/bridge/port
add bridge=bridge1 interface=LAN1
add bridge=bridge1 interface=LAN2

When interface lists are added to a bridge, the individual ports from those lists appear as dynamic ports entries:

[admin@MikroTik] /interface/bridge/port> pr
Flags: X - disabled, I - inactive, D - dynamic, H - hw-offload
# INTERFACE BRIDGE HW PVID PRIORITY PATH-COST INTERNAL-PATH-COST HORIZON
0 LAN1 bridge1 yes 1 0x80 10 10 none
1 D ether1 bridge1 yes 1 0x80 10 10 none
2 D ether2 bridge1 yes 1 0x80 10 10 none
3 LAN2 bridge1 yes 1 0x80 10 10 none
4 D ether3 bridge1 yes 1 0x80 10 10 none
5 D ether4 bridge1 yes 1 0x80 10 10 none

The order in which interface lists appear can be rearranged using the move command. The second parameter specifies the position before which the selected interface list should be placed. The following example demonstrates how to sort interface lists:

/interface bridge port move 3 0
[admin@MikroTik] > /interface/bridge/port/print
Flags: X - disabled, I - inactive, D - dynamic, H - hw-offload
# INTERFACE BRIDGE HW PVID PRIORITY PATH-COST INTERNAL-PATH-COST HORIZON
0 LAN2 bridge1 yes 1 0x80 10 10 none
1 D ether3 bridge1 yes 1 0x80 10 10 none
2 D ether4 bridge1 yes 1 0x80 10 10 none
3 LAN1 bridge1 yes 1 0x80 10 10 none
4 D ether1 bridge1 yes 1 0x80 10 10 none
5 D ether2 bridge1 yes 1 0x80 10 10 none
warning

When using the move command, the second parameter represents the "before id" position, which determines where the selected interface list will be moved. If the first interface list is moved to the position of the second interface list, the command has no effect since the first list would already be positioned before the second list.

Interface Lists in VLAN Table​

Interface lists can be used for the tagged and untagged properties in the bridge VLAN table. This makes VLAN assignment to ports flexible: modify the interface list members instead of updating each bridge VLAN entry individually.

If different interface lists are specified for the tagged and untagged settings, and there is overlap between the interface members, the untagged list takes priority. You can check the current interface configuration using the current-tagged and current-untagged properties with the print command.

The following example demonstrates how new interfaces can be added to existing interface lists, automatically updating the bridge port and VLAN table without directly modifying settings in those menus:

/interface/list
add name=vlan10_untagged
add name=vlan20_untagged
add name=vlan_tagged
/interface/list/member
add interface=ether2 list=vlan10_untagged
add interface=ether3 list=vlan10_untagged
add interface=ether4 list=vlan20_untagged
add interface=sfp-sfpplus1 list=vlan_tagged
/interface/bridge
add frame-types=admit-only-vlan-tagged name=bridge1 vlan-filtering=yes
/interface/bridge/port
add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=vlan10_untagged pvid=10
add bridge=bridge1 frame-types=admit-only-untagged-and-priority-tagged interface=vlan20_untagged pvid=20
add bridge=bridge1 frame-types=admit-only-vlan-tagged interface=vlan_tagged
/interface/bridge/vlan
add bridge=bridge1 tagged=vlan_tagged vlan-ids=10
add bridge=bridge1 tagged=vlan_tagged vlan-ids=20

[admin@MikroTik] /interface/bridge/port/print
Flags: D - DYNAMIC; H - HW-OFFLOAD
Columns: INTERFACE, BRIDGE, HW, PVID, PRIORITY, HORIZON
# INTERFACE BRIDGE HW PVID PRIORITY HORIZON
0 vlan10_untagged bridge1 yes 10 0x80 none
1 DH ether2 bridge1 yes 10 0x80 none
2 DH ether3 bridge1 yes 10 0x80 none
3 vlan20_untagged bridge1 yes 20 0x80 none
4 DH ether4 bridge1 yes 20 0x80 none
5 vlan_tagged bridge1 yes 1 0x80 none
6 DH sfp-sfpplus1 bridge1 yes 1 0x80 none

[admin@MikroTik] /interface/bridge/vlan/print
Flags: D - DYNAMIC
Columns: BRIDGE, VLAN-IDS, CURRENT-TAGGED, CURRENT-UNTAGGED
# BRIDGE VLAN-IDS CURRENT-TAGGED CURRENT-UNTAGGED
;;; added by pvid
0 D bridge1 10 ether2
ether3
;;; added by pvid
1 D bridge1 20 ether4
2 bridge1 10 sfp-sfpplus1
3 bridge1 20 sfp-sfpplus1

# make necessary changes to interface list members:
/interface/list/member/add list=vlan20_untagged interface=ether5
/interface/list/member/add list=vlan_tagged interface=sfp-sfpplus2

# verify changes in bridge port and vlan menus:
[admin@MikroTik] > /interface/bridge/port/print
Flags: D - DYNAMIC; H - HW-OFFLOAD
Columns: INTERFACE, BRIDGE, HW, PVID, PRIORITY, HORIZON
# INTERFACE BRIDGE HW PVID PRIORITY HORIZON
0 vlan10_untagged bridge1 yes 10 0x80 none
1 DH ether2 bridge1 yes 10 0x80 none
2 DH ether3 bridge1 yes 10 0x80 none
3 vlan20_untagged bridge1 yes 20 0x80 none
4 DH ether4 bridge1 yes 20 0x80 none
5 DH ether5 bridge1 yes 20 0x80 none
6 vlan_tagged bridge1 yes 1 0x80 none
7 DH sfp-sfpplus1 bridge1 yes 1 0x80 none
8 DH sfp-sfpplus2 bridge1 yes 1 0x80 none

[admin@MikroTik] > /interface/bridge/vlan/print
Flags: D - DYNAMIC
Columns: BRIDGE, VLAN-IDS, CURRENT-TAGGED, CURRENT-UNTAGGED
# BRIDGE VLAN-IDS CURRENT-TAGGED CURRENT-UNTAGGED
;;; added by pvid
0 D bridge1 10 ether2
ether3
;;; added by pvid
1 D bridge1 20 ether4
ether5
2 bridge1 10 sfp-sfpplus1
sfp-sfpplus2
3 bridge1 20 sfp-sfpplus1
sfp-sfpplus2

Bridge Port Monitoring​

To monitor the current status of bridge ports, use the monitor command.

The output reports the status, role, edge-port, forwarding, actual-path-cost and topology-changes of the port.

[admin@MikroTik] /interface/bridge/port/monitor [find interface=ether1]
interface: ether1
status: in-bridge
port-id: 0x80.1
role: root-port
edge-port: no
edge-port-discovery: yes
point-to-point-port: yes
external-fdb: no
sending-rstp: yes
learning: yes
forwarding: yes
actual-path-cost: 20000
internal-root-path-cost: 20000
designated-bridge-id: 0x1000.2C:C8:1B:FF:92:F4
designated-internal-cost: 0
designated-port-id: 0x80.1
designated-remaining-hops: 20
tx-rx-bpdu: 3/63
discard-transitions: 0
forward-transitions: 1
tx-rx-tc: 2/0
topology-changes: 1
last-topology-change: 2m5s
host-moves: 1
multicast-router: no
hw-offload-group: switch1
declared-vlan-ids: 1
registered-vlan-ids: 1

Hosts Table​


The hosts table displays MAC addresses that have been learned on a bridge interface. Each entry shows the mac-address, the vid, the on-interface where it was learned and the bridge it belongs to. This table also shows various flags that provide additional information about each host entry. Access the hosts table through the /interface/bridge/host submenu.

Monitoring​

To view the active hosts table, use the print command. The table displays all MAC addresses that have been learned on the bridge interface, along with flags indicators and connection details.

[admin@MikroTik] /interface/bridge/host/print
Flags: X - disabled, I - invalid, D - dynamic, L - local, E - external
# MAC-ADDRESS VID ON-INTERFACE BRIDGE
0 D B8:69:F4:C9:EE:D7 ether1 bridge1
1 D B8:69:F4:C9:EE:D8 ether2 bridge1
2 DL CC:2D:E0:E4:B3:38 bridge1 bridge1
3 DL CC:2D:E0:E4:B3:39 ether2 bridge1
4 DE AA:BB:CC:00:00:09 ether2 bridge1

The output shows:

  • D flag: Dynamically learned MAC addresses
  • DL flag: Local interface MAC addresses (the bridge itself and its ports interfaces)
  • DE flag: Dynamically learned MAC addresses that were also learned from an external table, such as the switch chip or a Wireless registration table
  • VID: VLAN ID associated with the host entry
  • ON-INTERFACE: The bridge port where the host was learned
  • BRIDGE: The bridge interface the host belongs to

Static Entries​

The bridge host table supports static MAC address entries configuration. Static entries are useful in two primary scenarios: directing specific traffic through a designated port, and securing device resources by disabling dynamic MAC learning while relying solely on pre-configured static entries.

The static entry sets the mac-address, the interface it is pinned to and the vid it applies to.

Example: To forward all traffic destined for MAC address 4C:5E:0C:4D:12:43 exclusively through ether2, use the following command:

/interface/bridge/host
add bridge=bridge1 interface=ether2 mac-address=4C:5E:0C:4D:12:43

Multicast Table​


The Multicast Table displays multicast group membership information learned through IGMP/MLD snooping. When IGMP/MLD snooping is enabled on a bridge, the device actively monitors IGMP/MLD network communications to build a Multicast Database (MDB) of active multicast groups and their subscribed ports members. The bridge then uses this information to intelligently forward multicast traffic only to ports where interested receivers devices are connected, rather than flooding all ports with multicast traffic.

Note that packets addressed to link-local multicast groups 224.0.0.0/24 and ff02::1 are exceptions to this behavior - these addresses are always flooded to all ports and VLANs without restriction, as they are used for network protocol operations.

To view the current multicast database entries table, use the print command in the multicast database submenu.

[admin@MikroTik] /interface/bridge/mdb/print
Flags: D - DYNAMIC
Columns: GROUP, VID, ON-PORTS, BRIDGE
# GROUP VID ON-PORTS BRIDGE
0 D ff02::2 1 bridge1 bridge1
1 D ff02::6a 1 bridge1 bridge1
2 D ff02::1:ff00:0 1 bridge1 bridge1
3 D ff02::1:ff01:6a43 1 bridge1 bridge1
4 D 229.1.1.1 10 ether2 bridge1
5 D 229.2.2.2 10 ether3 bridge1
ether2
6 D ff02::2 10 ether5 bridge1
ether3
ether2
ether4

Static entries​

Static MDB entries can be created for IPv4 and IPv6 multicast groups.

For example, to create a static MDB entry for multicast group 229.10.10.10 on ports ether2 and ether3 on VLAN 10, use the command below:

/interface/bridge/mdb
add bridge=bridge1 group=229.10.10.10 interface=ether2,ether3 vid=10

Verify the results with the print command:

[admin@MikroTik] > /interface/bridge/mdb/print where group=229.10.10.10
Columns: GROUP, VID, ON-PORTS, BRIDGE
# GROUP VID ON-PORTS BRIDGE
12 229.10.10.10 10 ether2 bridge1
ether3

In case a certain IPv6 multicast group does not need to be snooped and it is desired for it to be flooded on all ports and VLANs, it is possible to create a static MDB entry on all VLANs and ports, including the bridge interface itself. Use the command below to create a static MDB entry for multicast group ff02::2 on all VLANs and ports (modify the ports setting for your particular setup):

/interface/bridge/mdb
add bridge=bridge1 group=ff02::2 interface=bridge1,ether2,ether3,ether4,ether5

[admin@MikroTik] > /interface/bridge/mdb/print where group=ff02::2
Flags: D - DYNAMIC
Columns: GROUP, VID, ON-PORTS, BRIDGE
# GROUP VID ON-PORTS BRIDGE
0 ff02::2 bridge1
15 D ff02::2 1 bridge1 bridge1
16 D ff02::2 10 bridge1 bridge1
ether2
ether3
ether4
ether5
17 D ff02::2 20 bridge1 bridge1
ether2
ether3
18 D ff02::2 30 bridge1 bridge1
ether2
ether3

Bridge Hardware Offloading​


It is possible to switch multiple ports together if a device has a built-in switch chip. While a bridge is a software feature that will consume CPU's resources, the bridge hardware offloading will allow you to use the built-in switch chip to forward packets at wire speed. This allows you to achieve higher throughput if configured correctly.

RouterBOARD with ether1-ether5 connected to the switch logic, and routing, bridging, firewall and QoS in the CPU above it

A packet that is received by one of the ports always passes through the switch logic first. Switch logic decides which ports the packet should be going to - usually based on the destination MAC address. Hardware-forwarded packets will not be visible to RouterOS (only statistics will show that a packet has passed through). This is because the packet was already processed by the switch chip and never reached the CPU.

Packets can be forwarded to the CPU via the switch CPU port for management access, routing, firewall rules, or traffic control. This requires configuration specific to your device and use case. Check the manual page for your specific device:

danger

Certain bridge and Ethernet port properties are directly related to switch chip settings. Changing such properties can trigger a switch chip reset, temporarily disabling all Ethernet ports. This must be taken into account whenever changing properties in production environments. Such properties include DHCP Snooping, IGMP Snooping, VLAN filtering, L2MTU, Flow Control, and others. The exact settings that can trigger a switch chip reset depend on the device's model.

warning

CRS1xx/2xx series switches support multiple hardware offloaded bridges per switch chip. All other devices support only one. Use hw=yes/no under /interface/bridge/port to select which bridge uses hardware offloading.

The following tables list which bridge features are supported with hardware offloading (✓) or disable hardware offloading (✗) for each switch chip type:

MikroTik devices with Marvell Prestera Switch​

For example: CRS3xx, CRS4xx, CRS5xx, CRS8xx, CCR2116, CCR2216, RDS2216. See Marvell Prestera switch chip features.

FeatureHW Offload
STP/RSTP✓
MSTP✓
VLAN Filtering✓
IGMP Snooping✓
DHCP Snooping✓
ARP Inspection✓
IP Source Guard✓
DHCPv6 Snooping✓
RA Guard✓
Bonding¹✓
MLAG✓
Horizon✗

¹ Only mode=802.3ad (LACP), mode=balance-xor (static LAG) and mode=active-backup bonding interfaces are hardware offloaded. Other modes do not support HW offloading. The switch always uses Layer2+Layer3+Layer4 for transmit hash policy, changing transmit hash policy has no effect.

88E6393X, 88E6191X, 88E6190​

For example: RB5009 series, L009 series, CCR2004-16G-2S+. See Switch Chip Features.

FeatureHW Offload
STP/RSTP✓
MSTP✓
VLAN Filtering¹✓
IGMP Snooping²✓
DHCP Snooping²✓
ARP Inspection✗
IP Source Guard✗
Bonding³✓
DHCPv6 Snooping✗
RA Guard✗
MLAG✗
Horizon✗

¹ Does not support ether-type=0x88a8 or ether-type=0x9100 (only default ether-type=0x8100 is supported). No tag-stacking=yes support. Using these features disables HW offload.
² No QinQ support, only the first VLAN tag is parsed. Double-tagged DHCP or IGMP packets may be processed incorrectly.
³ Only mode=802.3ad (LACP), mode=balance-xor (static LAG) and mode=active-backup bonding interfaces are hardware offloaded. Other modes do not support HW offloading. Limited to Layer2 transmit hash, changing transmit hash policy has no effect.

MT7621, MT7531, EN7523, RTL8367​

For example: hEX S, hAP ax lite, hEX Refresh, RBM33G, RB4011, RB1100AHx4. See Switch Chip Features.

FeatureHW Offload
STP/RSTP✓
MSTP✓
VLAN Filtering¹✓
IGMP Snooping✗
DHCP Snooping✗
ARP Inspection✗
IP Source Guard✗
DHCPv6 Snooping✗
RA Guard✗
Bonding✗
MLAG✗
Horizon✗

¹ Does not support ether-type=0x88a8 or ether-type=0x9100 (only default ether-type=0x8100 is supported). No tag-stacking=yes support. Using these features disables HW offload.

CRS1xx/CRS2xx series​

For example: CRS105, CRS106, CRS109, CRS112, CRS125, CRS210, CRS212, CRS226. See CRS1xx/2xx series switches.

FeatureHW Offload
STP/RSTP✓
IGMP Snooping¹✓
DHCP Snooping¹✓
ARP Inspection✗
IP Source Guard✗
MSTP✗
VLAN Filtering✗
DHCPv6 Snooping✗
RA Guard✗
Bonding✗
MLAG✗
Horizon✗

¹ Feature does not work properly in VLAN switching setups.

QCA8337, Atheros8327, Atheros8316​

For example: RB3011, RB1100AHx2, RB850Gx2, cAP ac, wAP ac, Audience, mANTBox, CCR1009. See Switch Chip Features.

FeatureHW Offload
STP/RSTP✓
DHCP Snooping¹✓
ARP Inspection✗
IP Source Guard✗
MSTP✗
VLAN Filtering✗
IGMP Snooping✗
DHCPv6 Snooping✗
RA Guard✗
Bonding✗
MLAG✗
Horizon✗

¹ Feature does not work properly in VLAN switching setups.

Atheros8227, Atheros7240​

For example: hAP lite, hEX lite, PowerBox, wsAP ac lite, RBmAP2nD. See Switch Chip Features.

FeatureHW Offload
STP/RSTP✓
MSTP✗
VLAN Filtering✗
IGMP Snooping✗
DHCP Snooping✗
ARP Inspection✗
IP Source Guard✗
DHCPv6 Snooping✗
RA Guard✗
Bonding✗
MLAG✗
Horizon✗

IPQ-PPE, PIPE 98PX1012​

For example: hAP ax series, cAP ax, Chateau ax series, CCR2004-1G-12S+2XS. See Switch Chip Features.

FeatureHW Offload
STP/RSTP✗
MSTP✗
VLAN Filtering✗
IGMP Snooping✗
DHCP Snooping✗
ARP Inspection✗
IP Source Guard✗
DHCPv6 Snooping✗
RA Guard✗
Bonding✗
MLAG✗
Horizon✗
danger

Using protocol-mode=none on IPQ-PPE enables HW offloaded bridge and can cause issues.
It is recommended to use a non-HW offloaded bridge by keeping the default protocol-mode=rstp setting or by manually setting hw=no under /interface/bridge/port.

QCA8386​

For example: hAP be³ Media. See Switch Chip Features.

FeatureHW Offload
STP/RSTP✓
MSTP✗
VLAN Filtering✓
IGMP Snooping✓
DHCP Snooping✓
ARP Inspection✗
IP Source Guard✗
DHCPv6 Snooping✗
RA Guard✗
Bonding¹✓
MLAG✗
Horizon✗

¹ Only mode=802.3ad (LACP), mode=balance-xor (static LAG) and mode=active-backup bonding interfaces are hardware offloaded. mode=balance-rr disables HW offload.

Example​

The following example demonstrates how to configure port switching using a bridge with hardware offloading enabled. This configuration creates a bridge interface and adds multiple Ethernet interfaces as bridge ports. The hw=yes bridge port setting is used by default.

/interface bridge
add name=bridge1
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5

Verify that hardware offloading is active by checking the H flag in the bridge port table:

[admin@MikroTik] /interface/bridge/port/print
Flags: H - HW-OFFLOAD
Columns: INTERFACE, BRIDGE, HW, HORIZON, TRUSTED, TRUSTED-RA, TRUSTED-DHCPV6, FAST-LEAVE, BPDU-GUARD, EDGE, POINT-TO-POINT, PVID, FRAME-TYPES
# INTERFACE BRIDGE HW HORIZON TRUSTED TRUSTED-RA TRUSTED-DHCPV6 FAST-LEAVE BPDU-GUARD EDGE POINT-TO-POINT PVID FRAME-TYPES
0 H ether2 bridge1 yes none no no no no no auto auto 1 admit-all
1 H ether3 bridge1 yes none no no no no no auto auto 1 admit-all
2 H ether4 bridge1 yes none no no no no no auto auto 1 admit-all
3 H ether5 bridge1 yes none no no no no no auto auto 1 admit-all

Bridge VLAN Filtering​


Bridge VLAN Filtering enables VLAN-aware Layer 2 forwarding and allows VLAN tag modification within the bridge. This feature makes the bridge operate more like a traditional Ethernet switch and helps resolve Spanning Tree compatibility issues that can occur when VLAN interfaces are bridged. Configuring Bridge VLAN Filtering is highly recommended to comply with STP (IEEE 802.1D) and RSTP (IEEE 802.1W) standards, and it is mandatory to enable MSTP (IEEE 802.1s) support in RouterOS.

The primary VLAN setting is vlan-filtering, which globally controls VLAN awareness and VLAN tag processing for the bridge. When vlan-filtering is set to no, the bridge ignores VLAN tags, operates in shared-VLAN-learning (SVL) mode, and cannot modify VLAN tags of packets. Enabling vlan-filtering activates all bridge VLAN-related functionality and switches to independent-VLAN-learning (IVL) mode. In addition to joining ports for Layer 2 forwarding, the bridge itself functions as an interface and therefore has a Port VLAN ID (pvid).

warning

Currently, MikroTik devices with Marvell Prestera switch and RTL8367, 88E6393X, 88E6191X, 88E6190, MT7621, MT7531, EN7523 and QCA8386 switch chips can use bridge VLAN filtering and hardware offloading simultaneously. Other devices cannot utilize the benefits of a built-in switch chip when bridge VLAN filtering is enabled. These devices should be configured according to the method described in the Basic VLAN switching guide. Using an improper configuration method can cause throughput issues in your network.

Bridge VLAN Table​

The Bridge VLAN table defines per-VLAN port membership and specifies the VLAN tag action for egress traffic. Ports configured as tagged transmit frames with their corresponding VLAN ID, while ports configured as untagged remove the VLAN tag before transmitting frames. Bridge ports with frame-types set to admit-all or admit-only-untagged-and-priority-tagged are automatically added as untagged ports for their configured PVID.

danger

The vlan-ids parameter can specify a set or range of VLANs, but this should only be used for tagged ports configurations. When multiple VLANs are specified for access ports configurations, tagged packets may be sent as untagged packets through the wrong access port, regardless of the PVID value.

warning

Ensure all required interfaces are added to the bridge VLAN table when using bridge VLAN filtering.

For routing functions to work properly on the same device through ports using bridge VLAN filtering, you must allow access to the bridge interface (this includes the switch-cpu port when hardware-offloaded VLAN filtering is used). This can be done manually by adding the bridge interface itself to the VLAN table as a tagged port. This is done automatically when a VLAN interface is added to a bridge with VLAN filtering enabled (a dynamic entry with the comment "added by vlan on bridge" appears under the /interface/bridge/vlan menu). Additional examples can be found in the inter-VLAN routing and management access sections.

A dynamic tagged entry named "added by switch-cpu" is added when the same VLAN ID spans multiple switch chips or is used on both hardware and software ports.

danger

When allowing access to the CPU, you are permitting access from a specific port to the router/switch itself. This is not always desirable. Ensure you implement proper firewall filter rules to secure your device when CPU access is allowed from a specific VLAN ID and port. Use firewall filter rules to allow access only to required services.

warning

Improperly configured bridge VLAN filtering can cause security issues. Ensure you fully understand how the Bridge VLAN table operates before deploying your device in a production environment.

Bridge Port Settings​

Each bridge port has multiple VLAN-related settings that control untagged VLAN membership, VLAN tagging and untagging behavior, and packet filtering based on VLAN tag presence.

The VLAN-related port settings frame-types, ingress-filtering, pvid and tag-stacking are described in the bridge port CLI reference.

Bridge host table​

The Bridge host table displays MAC addresses that have been learned on a bridge interface. When vlan-filtering is enabled, the table also shows the VLAN ID associated with each learned MAC address, enabling independent VLAN learning (IVL) mode.

[admin@MikroTik] > /interface/bridge/host/print where !local
Flags: X - disabled, I - invalid, D - dynamic, L - local, E - external
# MAC-ADDRESS VID ON-INTERFACE BRIDGE
0 D CC:2D:E0:E4:B3:AA 300 ether3 bridge1
1 D CC:2D:E0:E4:B3:AB 400 ether4 bridge1

VLAN Example: Trunk and Access Ports​

This section demonstrates how to configure a basic VLAN setup with one trunk port and multiple access ports. The trunk port (ether2) carries tagged VLAN traffic between switches or to a router, while access ports (ether6, ether7, ether8) connect to end devices and use untagged VLAN traffic.

Switch with trunk port ether2 carrying VLAN 200, 300 and 400 tagged, and access ports ether6, ether7 and ether8 untagged in VLAN 200, 300 and 400

Step 1: Create the Bridge Interface​

Create a bridge interface with vlan-filtering disabled. This is important because enabling VLAN filtering immediately restricts traffic, which could lock you out of the device before the configuration is complete. For detailed information on managing access to the device during VLAN configuration, refer to the Management access configuration section.

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

Step 2: Add Bridge Ports and Configure PVID​

Add the physical interfaces to the bridge and configure the Port VLAN ID (pvid) for access ports. The pvid determines which VLAN untagged traffic is assigned to when entering the bridge. The frame-types setting controls what kind of traffic each port accepts: tagged only, untagged only, or both.

/interface/bridge/port
add bridge=bridge1 interface=ether2 frame-types=admit-only-vlan-tagged
add bridge=bridge1 interface=ether6 pvid=200 frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge1 interface=ether7 pvid=300 frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge1 interface=ether8 pvid=400 frame-types=admit-only-untagged-and-priority-tagged

Step 3: Create Bridge VLAN Table Entries​

Create the bridge VLAN table entries. The trunk port (ether2) must be configured as a tagged member, meaning it will send and receive frames with VLAN tags. Access ports are automatically added as untagged members based on their pvid setting, so you only need to specify the tagged port in each VLAN entry.

/interface/bridge/vlan
add bridge=bridge1 tagged=ether2 vlan-ids=200
add bridge=bridge1 tagged=ether2 vlan-ids=300
add bridge=bridge1 tagged=ether2 vlan-ids=400

Step 4: Enable VLAN Filtering​

Once all VLAN settings are configured, enable VLAN filtering on the bridge to activate the VLAN functionality.

/interface/bridge/set bridge1 vlan-filtering=yes

Step 5: (Optional) Reject Untagged Traffic​

As an optional security measure, you can set the bridge to reject untagged traffic by changing the frame-type. This prevents the default VLAN 1 (pvid=1) from being used and ensures only properly tagged traffic is accepted.

/interface/bridge/set bridge1 frame-types=admit-only-vlan-tagged

VLAN Example - Trunk and Hybrid Ports​

Switch with trunk port ether2 carrying VLAN 200, 300 and 400 tagged, and hybrid ports ether6, ether7 and ether8, each untagged in one VLAN and tagged in the other two

Create a bridge with disabled vlan-filtering to avoid losing access to the router before VLANs are completely configured. If you need management access to the bridge, see the Management access configuration section.

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

Add bridge ports and specify pvid on hybrid VLAN ports to assign untagged traffic to the intended VLAN. Use the frame-types setting to accept only tagged packets on ether2.

/interface/bridge/port
add bridge=bridge1 interface=ether2 frame-types=admit-only-vlan-tagged
add bridge=bridge1 interface=ether6 pvid=200
add bridge=bridge1 interface=ether7 pvid=300
add bridge=bridge1 interface=ether8 pvid=400

Add Bridge VLAN entries and specify tagged ports in them. In this example, egress VLAN tagging is done on ether6, ether7, ether8 ports too, making them into hybrid ports. Bridge ports with frame-types set to admit-all will be automatically added as untagged ports for the pvid VLAN.

/interface/bridge/vlan
add bridge=bridge1 tagged=ether2,ether7,ether8 vlan-ids=200
add bridge=bridge1 tagged=ether2,ether6,ether8 vlan-ids=300
add bridge=bridge1 tagged=ether2,ether6,ether7 vlan-ids=400

In the end, when VLAN configuration is complete, enable Bridge VLAN Filtering.

/interface/bridge/set bridge1 vlan-filtering=yes

An Optional step is to set frame-types=admit-only-vlan-tagged on the bridge interface in order to disable the default untagged VLAN 1 (pvid=1).

/interface/bridge/set bridge1 frame-types=admit-only-vlan-tagged
danger

You don't have to add access ports as untagged ports, because they will be added dynamically as untagged ports with the VLAN ID that is specified in pvid, you can specify just the trunk port as a tagged port. All ports that have the same pvid set will be added as untagged ports in a single entry. You must take into account that the bridge itself is a port and it also has a pvid value, this means that the bridge port also will be added as an untagged port for the ports that have the same pvid. You can circumvent this behavior by either setting different pvid on all ports (even the trunk port and bridge itself), or using frame-type set to accept-only-vlan-tagged.

VLAN Example - InterVLAN Routing by Bridge​

Switch with access ports ether6, ether7 and ether8 untagged in VLAN 200, 300 and 400, and bridge1 tagged in all three VLANs with the addresses 20.0.0.1/24, 30.0.0.1/24 and 40.0.0.1/24

Create a bridge with disabled vlan-filtering to avoid losing access to the router before VLANs are completely configured. If you need management access to the bridge, see the Management access configuration section.

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

Add bridge ports and specify pvid for VLAN access ports to assign their untagged traffic to the intended VLAN. Use the frame-types setting to accept only untagged packets.

/interface/bridge/port
add bridge=bridge1 interface=ether6 pvid=200 frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge1 interface=ether7 pvid=300 frame-types=admit-only-untagged-and-priority-tagged
add bridge=bridge1 interface=ether8 pvid=400 frame-types=admit-only-untagged-and-priority-tagged

Add Bridge VLAN entries and specify tagged ports in them. In this example bridge1 interface is the VLAN trunk that will send traffic further to do InterVLAN routing. Bridge ports with frame-types set to admit-only-untagged-and-priority-tagged will be automatically added as untagged ports for the pvid VLAN.

/interface/bridge/vlan
add bridge=bridge1 tagged=bridge1 vlan-ids=200
add bridge=bridge1 tagged=bridge1 vlan-ids=300
add bridge=bridge1 tagged=bridge1 vlan-ids=400

Configure VLAN interfaces on the bridge1 to allow handling of tagged VLAN traffic at the routing level and set IP addresses to ensure routing between VLANs as planned.

/interface/vlan
add interface=bridge1 name=VLAN200 vlan-id=200
add interface=bridge1 name=VLAN300 vlan-id=300
add interface=bridge1 name=VLAN400 vlan-id=400

/ip/address
add address=20.0.0.1/24 interface=VLAN200
add address=30.0.0.1/24 interface=VLAN300
add address=40.0.0.1/24 interface=VLAN400

In the end, when VLAN configuration is complete, enable Bridge VLAN Filtering:

/interface/bridge/set bridge1 vlan-filtering=yes

An optional step is to set frame-types=admit-only-vlan-tagged on the bridge interface in order to disable the default untagged VLAN 1 (pvid=1).

/interface/bridge/set bridge1 frame-types=admit-only-vlan-tagged

Traffic can be routed with L3 HW offloading on certain devices. See more details on L3 Hardware Offloading.

Management access configuration​

There are multiple ways to set up management access on a device that uses bridge VLAN filtering. Below are some of the most popular approaches to properly enable access to a router/switch. Start by creating a bridge without VLAN filtering enabled:

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

Untagged Access Without VLAN Filtering​

In cases where VLAN filtering is not enabled on the bridge and management access via untagged traffic is required, the configuration is straightforward. The only necessary step is to assign an IP address directly to the bridge interface itself. Since the bridge operates at Layer 2 without VLAN tagging, any untagged traffic entering the bridge ports will be able to communicate with the IP address assigned to the bridge interface without additional configuration.

/ip/address
add address=192.168.99.1/24 interface=bridge1

This approach provides the simplest method for accessing the router or switch for management purposes when VLAN filtering is not part of the network design.

Tagged Access Without VLAN Filtering​

This method is used when you want to manage the router/switch using tagged VLAN traffic, but without enabling bridge VLAN filtering. In this scenario, a separate VLAN interface is created on top of the bridge to handle the tagged management traffic. This approach is useful when you need to access the device through a specific VLAN ID while keeping the bridge configuration simple and straightforward.

To configure tagged management access, first create a VLAN interface on the bridge with the desired VLAN ID, then assign an IP address to that VLAN interface. This allows the router to be reachable through the tagged VLAN while maintaining the bridge in its default state (without VLAN filtering enabled). The VLAN interface acts as a logical sub-interface that inherits the MAC address from the parent bridge interface.

/interface/vlan
add interface=bridge1 name=MGMT vlan-id=99
/ip/address
add address=192.168.99.1/24 interface=MGMT

This configuration creates a management VLAN (VLAN 99) on the bridge, making the device accessible at IP address 192.168.99.1 through any port that carries VLAN 99 tagged traffic.

Tagged Access with VLAN Filtering​

In scenarios where VLAN filtering is enabled on the bridge and management access through tagged traffic is required, additional configuration steps are necessary. This method allows you to reach the router/switch management interface using a specific VLAN ID (VLAN 99 in this example) through tagged traffic on designated ports.

First, create a VLAN interface on top of the bridge and assign an IP address to it. This VLAN interface will handle the tagged management traffic:

/interface/vlan
add interface=bridge1 name=MGMT vlan-id=99
/ip/address
add address=192.168.99.1/24 interface=MGMT

Next, you must add the appropriate entries to the bridge VLAN table to permit tagged traffic on the ports where management access will be initiated. For instance, if you need to access the device from ports ether3, ether4, and sfp-sfpplus1 using VLAN 99 tagged traffic, include the bridge1 interface itself in the tagged port list (the bridge interface must be tagged to allow the VLAN interface to communicate with the switch CPU):

/interface/bridge/vlan
add bridge=bridge1 tagged=bridge1,ether3,ether4,sfp-sfpplus1 vlan-ids=99

Once the VLAN table is properly configured, you can enable VLAN filtering on the bridge:

/interface/bridge/set bridge1 vlan-filtering=yes

This configuration enables management access through tagged VLAN 99 traffic while maintaining the security benefits of VLAN filtering. The bridge interface itself is included as a tagged member to ensure proper communication between the VLAN interface and the switch CPU for routing and management purposes.

Untagged Access with VLAN Filtering​

When bridge VLAN filtering is enabled and you need to access the device using untagged traffic, you must ensure that the management VLAN interface uses the same VLAN ID as the untagged port VLAN ID (configured via the pvid parameter). This ensures that untagged traffic from access ports can properly communicate with the router's management interface.

First, create a VLAN interface on the bridge and assign an IP address to it, just as you would in the previous example. This VLAN interface will handle the management traffic:

/interface/vlan
add interface=bridge1 name=MGMT vlan-id=99
/ip/address
add address=192.168.99.1/24 interface=MGMT

For example, if you want untagged ports ether2 and ether3 to be able to communicate with the VLAN 99 management interface, these ports must be configured with a pvid value that matches the management VLAN ID. Additionally, you need to add the bridge interface itself as a tagged port member in the VLAN table, which allows the router to process the tagged management traffic. You can also add additional tagged ports if needed for your specific network topology (see the previous examples for more details on tagged port configuration):

/interface/bridge/port
set [find interface=ether2] pvid=99
set [find interface=ether3] pvid=99
/interface/bridge/vlan
add bridge=bridge1 tagged=bridge1 untagged=ether2,ether3 vlan-ids=99

Once you have completed the VLAN table configuration, you can enable VLAN filtering on the bridge. This will activate all VLAN-related functionality and begin filtering traffic based on your VLAN settings:

/interface/bridge/set bridge1 vlan-filtering=yes

Changing untagged VLAN for the bridge interface​

In case VLAN filtering is used, it is possible to change the untagged VLAN ID for the bridge interface using the pvid setting. Note that creating routable VLAN interfaces and allowing tagged traffic on the bridge is a more flexible and generally recommended option.

First, create an IP address on the bridge interface.

/ip/address
add address=192.168.99.1/24 interface=bridge1

For example, untagged bridge1 traffic should be able to communicate with untagged ether2 and ether3 ports and tagged sfp-sfpplus1 port in VLAN 99. In order to achieve this, bridge1, ether2, ether3 should be configured with the same pvid and sfp-sfpplus1 should be added as a tagged member.

/interface/bridge
set [find name=bridge1] pvid=99
/interface/bridge/port
set [find interface=ether2] pvid=99
set [find interface=ether3] pvid=99
/interface/bridge/vlan
add bridge=bridge1 tagged=sfp-sfpplus1 untagged=bridge1,ether2,ether3 vlan-ids=99

After that you can enable VLAN filtering:

/interface/bridge/set bridge1 vlan-filtering=yes
warning

If the connection to the router/switch through an IP address is not required, then steps for adding an IP address can be skipped since a connection to the router/switch through Layer2 protocols (e.g. MAC-telnet) will be working either way.

VLAN Tunneling (QinQ)​

The RouterOS bridge is IEEE 802.1ad compliant and can filter VLAN IDs based on the Service VLAN ID (0x88a8) rather than the Customer VLAN ID (0x8100). The same principles can be applied as with IEEE 802.1Q VLAN filtering (the same setup examples can be used). Below is a topology for a common Provider bridge:

SW1 and SW2 connected on ether3 with SVID 200 and SVID 300, R1 and R3 on ether1 in SVID 200, R2 and R4 on ether2 in SVID 300

In this example, R1, R2, R3, and R4 might be sending any VLAN tagged traffic by 802.1Q (CVID), but SW1 and SW2 need to isolate traffic between routers in a way that R1 is able to communicate only with R3, and R2 is only able to communicate with R4. To do so, you can tag all ingress traffic with an SVID and only allow these VLANs on certain ports. Start by enabling the service tag 0x88a8, introduced by 802.1ad, on the bridge. Use these commands on SW1 and SW2:

/interface/bridge
add name=bridge1 vlan-filtering=no ether-type=0x88a8

In this setup, ether1 and ether2 are going to be access ports (untagged), use the pvid parameter to tag all ingress traffic on each port, use these commands on SW1 and SW2:

/interface/bridge/port
add interface=ether1 bridge=bridge1 pvid=200
add interface=ether2 bridge=bridge1 pvid=300
add interface=ether3 bridge=bridge1

Specify tagged and untagged ports in the bridge VLAN table. Use these commands on SW1 and SW2:

/interface/bridge/vlan
add bridge=bridge1 tagged=ether3 untagged=ether1 vlan-ids=200
add bridge=bridge1 tagged=ether3 untagged=ether2 vlan-ids=300

When the bridge VLAN table is configured, you can enable bridge VLAN filtering. Use these commands on SW1 and SW2:

/interface/bridge/set bridge1 vlan-filtering=yes
danger

By enabling vlan-filtering you will be filtering out traffic destined to the CPU. Before enabling VLAN filtering you should make sure that you set up a Management port.

Note that if you are using the new EtherType/TPID 0x88a8 (service tag) and you also need a VLAN interface for your Service VLAN, you will also have to apply the use-service-tag parameter on the VLAN interface.

danger

When ether-type=0x8100 is configured, the bridge checks the outer VLAN tag to see if it is using EtherType 0x8100. If the bridge receives a packet with an outer tag that has a different EtherType, it will mark the packet as untagged. Since RouterOS only checks the outer tag of a packet, it is not possible to filter 802.1Q packets when the 802.1ad protocol is used.

warning

Currently, only MikroTik devices with Marvell Prestera switch are capable of hardware offloaded VLAN filtering using the Service tag, EtherType/TPID 0x88a8.

danger

Devices with switch chip Marvell-98DX3257 (e.g. CRS354 series) do not support VLAN filtering on 1Gbps Ethernet interfaces for other VLAN types (0x88a8 and 0x9100).

Tag stacking​

A new VLAN tag can be forcefully added over any existing VLAN tags. This feature can be used to achieve a CVID stacking setup, where a CVID (0x8100) tag is added before an existing CVID tag. This type of setup is very similar to the Provider bridge setup. To achieve the same setup but with multiple CVID tags (CVID stacking) we can use the same topology:

SW1 and SW2 connected on ether3 with CVID 200 and CVID 300, R1 and R3 on ether1 in CVID 200, R2 and R4 on ether2 in CVID 300

In this example R1, R2, R3, and R4 might be sending any VLAN tagged traffic, it can be 802.1ad, 802.1Q or any other type of traffic, but SW1 and SW2 need to isolate traffic between routers in a way that R1 is able to communicate only with R3, and R2 is only able to communicate with R4. To do so, you can tag all ingress traffic with a new CVID tag and only allow these VLANs on certain ports. Start by selecting the proper EtherType, use these commands on SW1 and SW2:

/interface/bridge
add name=bridge1 vlan-filtering=no ether-type=0x8100

In this setup, ether1 and ether2 will ignore any VLAN tags that are present and add a new VLAN tag. Use the pvid parameter to tag all ingress traffic on each port and allow tag-stacking on these ports. Use these commands on SW1 and SW2:

/interface/bridge/port
add interface=ether1 bridge=bridge1 pvid=200 tag-stacking=yes
add interface=ether2 bridge=bridge1 pvid=300 tag-stacking=yes
add interface=ether3 bridge=bridge1

Specify tagged and untagged ports in the bridge VLAN table. You only need to specify the VLAN ID of the outer tag. Use these commands on SW1 and SW2:

/interface/bridge/vlan
add bridge=bridge1 tagged=ether3 untagged=ether1 vlan-ids=200
add bridge=bridge1 tagged=ether3 untagged=ether2 vlan-ids=300

When the bridge VLAN table is configured, you can enable bridge VLAN filtering, which is required in order for the pvid parameter to have any effect. Use these commands on SW1 and SW2:

/interface/bridge/set bridge1 vlan-filtering=yes
danger

By enabling vlan-filtering you will be filtering out traffic destined to the CPU; before enabling VLAN filtering you should make sure that you set up a Management port.

MVRP​

Multiple VLAN Registration Protocol (MVRP) is a protocol based on Multiple Registration Protocol (MRP) which allows registering attributes (VLAN IDs in the case of MVRP) with other members of a Bridged LAN.

An MRP application can make or withdraw declarations of attributes which result in registration or leaving of those attributes with other MRP participants.

Here's how it works.

MRP consists of two parts:

  • Applicant - responsible for sending declarations (or leaves). Its behavior can be configured on a per-port basis using the setting called mvrp-applicant-state, and per-VLAN using the mvrp-forbidden setting.
  • Registrar - responsible for registering incoming declarations. Its configuration can be set per-port using the mvrp-registrar-state setting, and per-VLAN using the mvrp-forbidden setting.

Registration Propagation: Incoming registration on a bridge port dynamically makes that specific port a tagged VLAN member. Additionally, the attributes associated with this registration are spread to all active (forwarding) bridge ports as a declaration.

Declaration Operation: In case of MVRP, the configured VLANs get declared on each port, but they will only get configured as members of those VLANs when a declaration is received from the LAN (Registrar will register the VLAN). From the perspective of an end-station, a single declaration will be registered on each upstream port across the entire LAN. When another end-station declares the same attribute, a path of registrations will be made between the two (or more) end stations, see the picture below.

MVRP helps to dynamically propagate VLAN information throughout the bridged network and configure VLANs only on the needed ports. This makes the network efficient by avoiding unnecessary traffic flooding.

As noted before, MVRP is only active on ports that are forwarding. In the case of MSTP, declarations and registrations are made only if the port is forwarding in the MSTI in which the VLAN is mapped.

The point-to-point ports speed up the process of registration (or leaving). Manually configuring point-to-point=yes can be advantageous for non-Ethernet interfaces.

MVRP declarations (D) and registrations (R) between endpoints A to D and bridges X and Y

Property Reference​

The port menu controls the applicant and registrar settings on a per-port basis. The mvrp-applicant-state and mvrp-registrar-state properties are described in the bridge port CLI reference, and their monitoring fields in the bridge port monitor CLI reference.

To monitor the currently declared and registered VLAN IDs, use the monitor command.

[admin@MikroTik] > /interface/bridge/port/monitor [find interface=sfp-sfpplus1]
interface: sfp-sfpplus1
status: in-bridge
port-id: 0x80.1
role: designated-port
edge-port: no
edge-port-discovery: yes
point-to-point-port: yes
external-fdb: no
sending-rstp: yes
learning: yes
forwarding: yes
actual-path-cost: 2000
hw-offload-group: switch1
declared-vlan-ids: 1,10,20-21
registered-vlan-ids: 1,10,20,30-33

All ports that are members of static VLANs or dynamic untagged VLANs created by the port pvid setting are treated as "fixed." This means the registrar disregards all MRP messages and remains registered (IN) for those VLANs.

When a VLAN is neither manually configured nor created by the port pvid setting, incoming registrations on a bridge port can dynamically designate that specific port as a tagged VLAN member. The mvrp-forbidden feature allows creating a list of ports that are restricted from registering for a specific VLAN ID.

VLANs that are static or dynamic will be declared by the applicants unless this functionality is disabled by the port's mvrp-applicant-state, or by the VLAN's mvrp-forbidden setting.

[admin@Mikrotik] /interface/bridge/vlan/mvrp/print where vlan-id=10
Columns: BRIDGE, PORT, VLAN-ID, REGISTRAR-STATE, APPLICANT-STATE, LAST-EVENT
# BRIDGE PORT VLAN-ID REGISTRAR-STATE APPLICANT-STATE LAST-EVENT
1 bridge67 sfp-sfpplus1 10 IN Quiet Active JoinIn
9 bridge67 sfp-sfpplus5 10 MT Quiet Active JoinEmpty
17 bridge67 sfp-sfpplus9 10 MT Quiet Active JoinEmpty
25 bridge67 sfp-sfpplus13 10 IN Quiet Active JoinIn

Fast Forward​


Fast Forward allows forwarding packets faster under special conditions. When Fast Forward is enabled, then the bridge can process packets even faster since it can skip multiple bridge-related checks, including MAC learning. Below you can find a list of conditions that MUST be met in order for Fast Forward to be active:

  • Bridge has fast-forward set to yes.
  • Bridge has only 2 running ports.
  • Both bridge ports support Fast Path, Fast Path is active on ports and globally on the bridge.
  • Bridge Hardware Offloading is disabled.
  • Bridge VLAN Filtering is disabled.
  • Bridge DHCP snooping is disabled.
  • unknown-multicast-flood is set to yes.
  • unknown-unicast-flood is set to yes.
  • broadcast-flood is set to yes.
  • MAC address for the bridge matches a MAC address from one of the bridge slave ports.
  • horizon for both ports is set to none.
warning

Fast Forward disables MAC learning; this is by design to achieve faster packet forwarding. MAC learning prevents traffic from flooding multiple interfaces, but MAC learning is not needed when a packet can only be sent out through just one interface.

danger

Fast Forward is disabled when hardware offloading is enabled. Hardware offloading can achieve full wire-speed performance when it is active since it will use the built-in switch chip (if such exists on your device). Fast forward uses the CPU to forward packets. When comparing throughput results, you would get such results: Hardware offloading > Fast Forward > Fast Path > Slow Path.

It is possible to check how many packets were processed by Fast Forward:

[admin@MikroTik] /interface/bridge/settings> pr
use-ip-firewall: no
use-ip-firewall-for-vlan: no
use-ip-firewall-for-pppoe: no
allow-fast-path: yes
bridge-fast-path-active: yes
bridge-fast-path-packets: 0
bridge-fast-path-bytes: 0
bridge-fast-forward-packets: 16423
bridge-fast-forward-bytes: 24864422
warning

If packets are processed by Fast Path, then Fast Forward is not active. Packet count can be used as an indicator of whether Fast Forward is active or not.

Fast Forward status can be monitored, for example:

[admin@MikroTik] /interface/bridge/monitor bridge1
state: enabled
current-mac-address: B8:69:F4:C9:EE:D7
root-bridge: yes
root-bridge-id: 0x8000.B8:69:F4:C9:EE:D7
root-path-cost: 0
root-port: none
port-count: 2
designated-port-count: 2
fast-forward: yes
danger

Disabling or enabling fast-forward will temporarily disable all bridge ports for settings to take effect. This must be taken into account whenever changing this property in production environments since it can cause all packets to be temporarily dropped.

IGMP/MLD Snooping​


The bridge supports IGMP/MLD snooping. It controls multicast streams and prevents multicast flooding on unnecessary ports. Its settings are placed in the bridge menu and it works independently on every bridge interface. Software-driven implementation works on all devices with RouterOS, but MikroTik devices with Marvell Prestera switch, and 88E6393X, 88E6191X, 88E6190 switch chips also support IGMP/MLD snooping with hardware offloading. See more details on IGMP/MLD snooping manual.

DHCP Snooping and DHCP Option 82​


DHCP Snooping and DHCP Option 82 are supported by bridge. The DHCP Snooping is a Layer2 security feature that prevents unauthorized DHCP servers from providing malicious information to users. In RouterOS, you can specify which bridge ports are trusted (where a known DHCP server resides and DHCP messages should be forwarded) and which are untrusted (usually used for access ports, received DHCP server messages will be dropped). The DHCP Option 82 is additional information (Agent Circuit ID and Agent Remote ID) provided by DHCP Snooping enabled devices that allows identifying the device itself and DHCP clients.

By default, DHCP snooping applies to all VLANs of the bridge. When vlan-filtering is enabled, the dhcp-snooping-vlan-ids property limits it to the listed VLAN IDs. DHCP messages in other VLANs are forwarded without snooping, including DHCP server messages received on untrusted ports.

DHCP snooping: SW1 and SW2 add option 82 and forward the DHCP Offer from the server on trusted ports, SW2 drops the Offer of a rogue DHCP server on untrusted ether3

In this example, SW1 and SW2 are DHCP Snooping and Option 82-enabled devices. Both switches carry client traffic in VLAN 10.

Create a bridge with VLAN filtering and assign the interfaces.

On SW1:

  • ether1 is an untagged access port for DHCP clients.
  • ether2 is the trusted tagged uplink to SW2.
/interface/bridge
add name=bridge vlan-filtering=yes
/interface/bridge/port
add bridge=bridge interface=ether1 pvid=10
add bridge=bridge interface=ether2 trusted=yes
/interface/bridge/vlan
add bridge=bridge tagged=ether2 vlan-ids=10

On SW2:

  • ether1 is the trusted tagged uplink from SW1.
  • ether2 is the trusted tagged port to the DHCP server.
  • ether3 is an untagged access port with an unauthorized (rogue) DHCP server connected to it. Leave it untrusted.
/interface/bridge
add name=bridge vlan-filtering=yes
/interface/bridge/port
add bridge=bridge interface=ether1 trusted=yes
add bridge=bridge interface=ether2 trusted=yes
add bridge=bridge interface=ether3 pvid=10
/interface/bridge/vlan
add bridge=bridge tagged=ether1,ether2 vlan-ids=10
info

DHCP messages that already contain Option 82 are handled according to dhcp-snooping-option82-policy. On untrusted ports the default drop policy discards them, keep forwards them with the original option, and replace overwrites it with the values from dhcp-agent-circuit-id and dhcp-agent-remote-id. Messages received on trusted ports are always forwarded unchanged.

Then enable DHCP snooping. By default it applies to all VLANs. dhcp-snooping-vlan-ids limits it to the listed VLANs, as in this example. Option 82 values can use predefined variables (BRIDGEMAC, HOSTNAME, INTERFACE, VID). See dhcp-agent-circuit-id and dhcp-agent-remote-id. If your DHCP server does not support Option 82, this step is optional. Use these commands on SW1 and SW2:

/interface/bridge
set [find where name="bridge"] dhcp-snooping=yes dhcp-snooping-vlan-ids=10 dhcp-agent-circuit-id="interface: \$(INTERFACE), vlan: \$(VID)" dhcp-agent-remote-id="ip: 192.168.88.1, identity: \$(HOSTNAME), mac: \$(BRIDGEMAC)"

Now both devices analyze the DHCP messages received on bridge ports. SW1 adds and removes DHCP Option 82. SW2 prevents rogue DHCP servers from receiving discovery messages and drops malicious DHCP server messages from ether3.

info

DHCP snooping is supported with hardware offloading on bonding interfaces.

DHCP Snooping Binding Table​

The DHCP snooping binding database is a runtime table generated by a bridge and intended to store DHCP leases provided by DHCP servers connected to trusted ports. Each entry records the client’s MAC address, assigned IP address, lease expiration time, VLAN ID, and the physical interface on which the client was seen. The bridge can utilize this database to enhance security. Namely, when a frame arrives on an untrusted port, the switch verifies that the source MAC/IP pair matches a stored binding before forwarding the packet, thereby blocking traffic from rogue DHCP servers or spoofed hosts, preventing address‑theft attacks, and enabling features such as IP‑Source‑Guard, ARP‑Inspection.

The present implementation of the DHCPv4 snooping binding table has been built on top of the existing /interface/bridge/host table. The relevant DHCP information is retrieved from DHCP messages traversing the bridge. The binding table is only maintained when arp-inspection or ip-source-guard is enabled. With dhcp-snooping alone, the bridge still drops DHCP server messages received on untrusted ports, but no dhcpv4-* entries are created.

danger

The DHCP snooping binding table is cleared whenever the bridge interface configuration is changed, including enabling the arp-inspection or ip-source-guard features. As a result, IPv4 and ARP traffic on untrusted ports is interrupted until clients obtain or renew their DHCP leases. To repopulate the binding table more quickly, disable and re-enable the untrusted Ethernet interfaces or reboot the switch.

The current status of the DHCP client is indicated by the dhcpv4-status. The possible status values are as follows: searching, requesting, bound, renewing, rebinding, expired, and relay-agent. The last one can appear only when a DHCP request message is received from a DHCP client hiding behind a relay agent.

The dhcpv4-ip shows the IP addresses granted by DHCP servers, while the dhcpv4-server-id column indicates the server ID. The dhcpv4-expires-after column shows the time left till the end of the current lease period provided by the DHCP server to a client.

When VLAN filtering is enabled on the bridge each host is identified not only by its MAC address, but by a pair MAC - VLAN ID.

The active DHCP binding table entries in Winbox:

FDB with DHCP binding table in Winbox

The active DHCP binding table entries in console:

FDB with DHCP binding table in console

ARP Inspection and IP Source Guard​

ARP Inspection and IP Source Guard are Layer 2 security features that use the DHCP snooping binding table to prevent address spoofing attacks. ARP Inspection validates ARP packets against the binding database, dropping any that do not match. IP Source Guard validates the source IP address of IPv4 packets, dropping those not found in a binding entry for the ingress port. On trusted ports, all ARP packets and IP traffic are forwarded without verification.

First, enable DHCP snooping on the bridge and mark the ports connected to your DHCP server as trusted:

/interface/bridge/set [find name="bridge1"] dhcp-snooping=yes
/interface/bridge/port/set [find interface=ether1] trusted=yes

Enable ARP inspection and designate trusted ARP ports:

/interface/bridge/set [find name="bridge1"] arp-inspection=yes
/interface/bridge/port/set [find interface=ether1] trusted-arp=yes

Enable IP Source Guard:

/interface/bridge/set [find name="bridge1"] ip-source-guard=yes

To exempt a single access port from IP Source Guard while still rejecting DHCP server messages received on it, set trusted-ipsg instead of trusted:

/interface/bridge/port/set [find interface=ether5] trusted-ipsg=yes
warning

IP Source Guard blocks RouterOS MAC access features on untrusted ports. When you enable it, MAC Telnet, MAC WinBox and MAC ping through the bridge stop working, because their packets carry source address 0.0.0.0 and do not match a DHCP snooping binding entry.

Print the bridge host table to verify that DHCP bindings are being learned:

/interface/bridge/host/print where dhcpv4-status

Check the /interface/ethernet/switch/rule to verify switch ACL rules are applied (supported only on Marvell Prestera switch chips):

[admin@MikroTik] > /interface/ethernet/switch/rule/print
Flags: D - DYNAMIC
0 D ;;; DHCP Snooping
switch=switch1 mac-protocol=ip protocol=udp src-port=67-68 dst-port=67-68 copy-to-cpu=no redirect-to-cpu=yes mirror=no

1 D ;;; ARP Inspection
switch=switch1 ports=ether2,ether3,ether4 mac-protocol=arp copy-to-cpu=no redirect-to-cpu=yes mirror=no

2 D ;;; IPSG (Pass Untrusted)
switch=switch1 ports=ether2 src-mac-address=D6:3F:38:20:8D:2B/FF:FF:FF:FF:FF:FF mac-protocol=ip src-address=192.168.88.8/255.255.255.255 copy-to-cpu=no redirect-to-cpu=no mirror=no

3 D ;;; IPSG (Pass Untrusted)
switch=switch1 ports=ether3 src-mac-address=6C:3B:6B:EB:76:AA/FF:FF:FF:FF:FF:FF mac-protocol=ip src-address=192.168.88.9/255.255.255.255 copy-to-cpu=no redirect-to-cpu=no mirror=no

4 D ;;; IPSG (Drop Untrusted)
switch=switch1 ports=ether2,ether3,ether4 mac-protocol=ip copy-to-cpu=no redirect-to-cpu=no mirror=no new-dst-ports=""

Look for bridge,warning log entries to detect blocked packets:

/log/print where topics~"bridge" and topics~"warning"

2026-07-26 12:08:29 bridge,warning ether2: dropped IP packet on untrusted port - MAC/IP does not match binding table entry (IP=192.168.88.55, MAC=6c:3b:6b:eb:76:aa)

2026-07-26 13:55:02 bridge,warning ether2: dropped ARP packet on untrusted port - unknown MAC/IP combination (src IP=192.168.88.55, MAC=6c:3b:6b:eb:76:aa)

DHCPv6 Snooping / DHCPv6 Shield​

DHCPv6 Snooping is a Layer2 security feature that prevents unauthorized DHCPv6 servers from providing malicious information to users. In RouterOS, you can specify which bridge ports are trusted (where the known DHCPv6 server resides and DHCPv6 messages should be forwarded) and which are untrusted (usually used for access ports, received DHCPv6 server messages will be dropped, effectively implementing DHCPv6-Shield).

The DHCPv6 Option 18 (Interface-Id) and Option 37 (Remote-Id) are additional information provided by DHCPv6 Snooping enabled devices that allow identifying the device itself and DHCPv6 clients.

IPv6 allows a more granular approach as well as flexibility with the DHCPv6 Relay agent process. Functionally, these serve the exact same purpose as IPv4's Option 82: Option 18 acts as the Circuit ID (identifying the specific port/VLAN the client is attached to), and Option 37 acts as the Remote ID (identifying the relay agent or switch hardware itself).

  • Option 18 - identifies the specific interface (port) on which the client's message was received. It ensures the server knows exactly where the request came through so it can apply the correct policy.
  • Option 37 - identifies the relay agent (the switch or router) itself. It contains a unique caller ID (like the DUID—DHCP Unique Identifier). It tells the server which specific device in the network is talking to it.

RA Guard​


The RA guard feature is intended for discarding IPv6 packets containing router advertisement (RA) messages arriving on bridge ports specified by the user as untrusted ones, thereby allowing one to prevent potential rogue RA message-based attacks or accidental network misconfiguration. When enabled, it is possible to set each bridge port either as trusted or untrusted (by default all the bridge ports are set as RA untrusted).

In this example, the gateway router is connected to ether1 of an access switch, and hosts are connected to ether2-ether4. Only ether1 is trusted. If a rogue router or an attacker on ether4 sends RAs, the switch drops them, and the hosts keep the gateway router as their IPv6 gateway:

graph TB
    gw["<b>Gateway router</b><br />sends the valid RAs"] ---|"ether1, trusted-ra=yes<br />RAs are forwarded"| sw["<b>Access switch</b><br />bridge1 with ra-guard=yes"]
    sw ---|"ether2, untrusted"| h1["Host PC 1"]
    sw ---|"ether3, untrusted"| h2["Host PC 2"]
    sw ---|"ether4, untrusted<br />RAs are dropped"| rogue["Rogue router<br />sends RAs"]

Enable RA guard on the bridge and mark the uplink port to the gateway router as trusted:

/interface/bridge/add name=bridge1 ra-guard=yes
/interface/bridge/port/add bridge=bridge1 interface=ether1 trusted-ra=yes
/interface/bridge/port/add bridge=bridge1 interface=ether2
/interface/bridge/port/add bridge=bridge1 interface=ether3
/interface/bridge/port/add bridge=bridge1 interface=ether4

The Problem: Why is this needed?​

In IPv6, devices use ICMPv6 to auto-configure themselves.

Router Advertisements (Type 134): Routers broadcast these messages to tell hosts: "I am the gateway, and here is your network prefix."

The Threat: If a user accidentally connects a consumer router (like a home Wi-Fi router) or a malicious actor launches a tool (like Rogue RA) on an access port, that device will start broadcasting RAs.

The Result: Other hosts on the network will auto-configure their IPv6 addresses based on the rogue device and set the rogue device as their default gateway. This causes a Man-in-the-Middle attack or a complete denial of service.

The Core Principle: "Trust vs. Untrust"​

The fundamental principle of IPv6 RA Guard is logically identical to DHCP Snooping in IPv4. It creates a security boundary within the Layer 2 switch infrastructure by categorizing switch ports into two roles:

  • Trusted Ports: Ports connected to legitimate, authorized IPv6 routers. These ports are allowed to send Router Advertisement (RA) packets.
  • Untrusted Ports: Ports connected to end-user hosts. These ports are blocked from sending RA packets.

Packet parsing process​

For ports not configured as RA Trusted, the RA Guard parser traverses the extension header chain until it encounters a non-extension header. The parsing process and subsequent actions are governed by the following rules:

Transport Layer Termination: If the parser encounters a valid transport layer header—such as TCP, UDP, ESP, RSVP, or an encapsulated IPv4/IPv6 header—parsing terminates and the packet is forwarded (subject to standard bridge checks).

  • Drop Conditions - The packet is discarded if:
  1. It fails to contain a transport layer header.
  2. The final extension header in the chain does not specify NO_NEXT_HEADER (59) in its "Next Header" field.
  3. If the ICMP message type is found to be 134, the packet is dropped.
  • Fragmentation Handling: These parsing rules apply exclusively to the first fragment of fragmented IPv6 packets. Subsequent fragments are forwarded regardless of their content, as they do not contain the protocol headers necessary for RA identification.

Bridge Firewall​


The bridge firewall implements packet filtering and thereby provides security functions that are used to manage data flow to, from, and through the bridge.

Packet flow diagram shows how packets are processed through the router. Traffic between bridge ports passes only the bridge firewall, not the IP/IPv6 firewall. To filter it with /ip/firewall/filter rules too, set use-ip-firewall=yes in /interface/bridge/settings (see Bridge Settings). Packets that the switch chip forwards in hardware never reach the CPU, so neither firewall sees them (see Bridge Hardware Offloading).

There are two bridge firewall tables:

  • filter - bridge firewall with three predefined chains:
    • input - filters packets, where the destination is the bridge (including those packets that will be routed, as they are destined to the bridge MAC address anyway).
    • output - filters packets, which come from the bridge (including those packets that have been routed normally).
    • forward - filters packets, which are to be bridged (note: this chain is not applied to the packets that should be routed through the router, just to those that are traversing between the ports of the same bridge).
  • nat - bridge network address translation provides ways for changing source/destination MAC addresses of the packets traversing a bridge. Has two built-in chains:
    • srcnat - used for "hiding" a host or a network behind a different MAC address. This chain is applied to the packets leaving the router through a bridged interface.
    • dstnat - used for redirecting some packets to other destinations.

You can put packet marks in the bridge firewall (filter and NAT), which are the same as the packet marks in the IP firewall configured by '/ip/firewall/mangle'. In this way, packet marks put by the bridge firewall can be used in the 'IP firewall', and vice versa.

Footnotes:

  • STP matchers are only valid if the destination MAC address is 01:80:C2:00:00:00/FF:FF:FF:FF:FF:FF (Bridge Group address), also STP should be enabled.

  • ARP matchers are only valid if mac-protocol is arp or rarp.

  • VLAN matchers are only valid for 0x8100 or 0x88a8 ethernet protocols.

  • IP or IPv6 related matchers are only valid if mac-protocol is either set to ip or ipv6.

  • 802.3 matchers are only consulted if the actual frame is compliant with IEEE 802.2 and IEEE 802.3 standards. These matchers are ignored for other packets.

Bridge Packet Filter​

This section describes specific bridge filter options.

Bridge NAT​

This section describes specific bridge NAT options.

See also​