Skip to main content
Version: 7.26

bridge


interface/bridge​

Type: Directory

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.

FlagNameDescription
Ymanagedmanaged
Ddynamicdynamic
Xdisableddisabled
Rrunningrunning
ArgumentTypeDescription
namestringName of the bridge interface. Default: bridgeN.
mtunum

Maximum transmission unit. By default, the bridge uses the lowest MTU value of any associated bridge port. The default bridge MTU value without any bridge ports is 1500. The value can be set manually, but it cannot exceed the bridge L2MTU or the lowest bridge port L2MTU. If a new bridge port is added with L2MTU smaller than the actual-mtu of the bridge (set by the mtu property), the manually set value is ignored and the bridge acts as if mtu=auto is set.

When you add VLAN interfaces on the bridge, and a VLAN uses a higher MTU than the default 1500, set the MTU of the bridge manually. Default: auto.

arpenum (disabled | enabled | proxy-arp | reply-only | local-proxy-arp) { disabled:0, enabled:1, proxy-arp:2, reply-only:3, local-proxy-arp:4 }

Address Resolution Protocol setting.

  • disabled - the interface does not use ARP.
  • enabled - the interface uses ARP.
  • local-proxy-arp - the router performs proxy ARP on the interface and sends replies to the same interface.
  • proxy-arp - the router performs proxy ARP on the interface and sends replies to other interfaces.
  • reply-only - the interface only responds to requests that originate from IP address and MAC address combinations entered as static entries in the IP ARP table. No dynamic entries are stored in the IP ARP table, so a valid static entry must already exist for communication to succeed.

Default: enabled.

arp-timeoutalt { arp-timeout: enum (auto) { auto:0 } , arp-timeout: time }How long the ARP record is kept in the ARP table after no packets are received from an IP address. The value auto equals the value of arp-timeout in /ip/settings, default 30s. Default: auto.
protocol-modeenum (none | stp | rstp | mstp) { none:0, stp:1, rstp:2, mstp:3 }

Spanning Tree Protocol mode. Select stp or rstp to ensure a loop-free topology for any bridged LAN. RSTP provides faster spanning tree convergence after a topology change. Select mstp to ensure loop-free topology across multiple VLANs.

Forwarding of reserved MAC addresses in the 01:80:C2:00:00:0x range is separated from protocol-mode=none and is controlled by forward-reserved-addresses. Default: rstp.

fast-forwardboolA special and faster case of Fast Path that works only on bridges with two interfaces. Enabled by default only for new bridges. Default: yes.
igmp-snoopingboolEnables multicast group and port learning to prevent multicast traffic from flooding all interfaces in a bridge. Default: no.
multicast-routerenum (disabled | temporary-query | permanent) { disabled:0, temporary-query:1, permanent:2 }

A multicast router port is a port where a multicast router or querier is connected. On this port, unregistered multicast streams and IGMP/MLD membership reports are sent. This setting changes the state of the multicast router for the bridge interface itself, to send IGMP/MLD membership reports and multicast traffic to the bridge interface for further multicast routing or proxying.

  • disabled - multicast router state is disabled on the bridge interface. Unregistered multicast and IGMP/MLD membership reports are not sent to the bridge interface regardless of what is configured on the bridge interface.
  • permanent - multicast router state is enabled on the bridge interface. Unregistered multicast and IGMP/MLD membership reports are sent to the bridge interface itself regardless of what is configured on the bridge interface.
  • temporary-query - the multicast router state on the bridge interface is detected automatically by using IGMP/MLD queries.

This property only has an effect when igmp-snooping is set to yes. Default: temporary-query.

multicast-querierbool

Multicast querier generates periodic IGMP/MLD general membership queries to which all IGMP/MLD capable devices respond with an IGMP/MLD membership report. Usually, a PIM router or IGMP proxy generates these queries.

By using this property you can make an IGMP/MLD snooping enabled bridge generate IGMP/MLD general membership queries. Use this property whenever there is no active querier (PIM router or IGMP proxy) in a Layer2 network. Without a multicast querier in a Layer2 network, the Multicast Database (MDB) is not updated, the learned entries time out and IGMP/MLD snooping does not function properly.

Only untagged IGMP/MLD general membership queries are generated. IGMP queries are sent with the bridge interface's own IPv4 address as the source address (see querier-uses-bridge-address), MLD queries are sent with the IPv6 link-local address of the bridge interface. The bridge does not send queries if an external IGMP/MLD querier is detected (see the monitoring values igmp-querier and mld-querier).

This property only has an effect when igmp-snooping is set to yes. Default: no.

querier-uses-bridge-addressboolWhen enabled, the bridge IGMP querier uses the bridge interface's own IPv4 address as the source address for IGMP query packets instead of the default 0.0.0.0. Some multicast clients consider queries from 0.0.0.0 invalid and do not respond, which can interrupt multicast streams when snooping table entries time out. This setting applies only to IPv4 (IGMP). MLD queries always use the IPv6 link-local address of the bridge interface. This property only has an effect when igmp-snooping and multicast-querier are set to yes and the bridge interface has an IPv4 address assigned. Default: yes.
startup-query-countnumSpecifies how many times general IGMP/MLD queries are sent when the bridge interface is enabled or the active querier times out. This property only has an effect when igmp-snooping and multicast-querier are set to yes. Default: 2.
last-member-query-countnumHow many last-member-query-interval periods pass before the IGMP/MLD snooping bridge stops forwarding a certain multicast stream when no membership report is received. This property only has an effect when igmp-snooping and multicast-querier are set to yes. Default: 2.
last-member-interval ( deprecated )timeDeprecated alias of last-member-query-interval.
last-member-query-intervaltime

When the last client on the bridge port unsubscribes from a multicast group and the bridge is acting as an active querier, the bridge sends a group-specific IGMP/MLD query to check whether another client is still subscribed. This setting changes the response time for these queries. If no membership reports are received in a certain period (last-member-query-interval * last-member-query-count), the multicast group is removed from the multicast database (MDB).

If the bridge port is configured with fast-leave, the multicast group is removed right away without sending any queries.

This property only has an effect when igmp-snooping and multicast-querier are set to yes. Default: 1s.

membership-intervaltimeThe amount of time after which an entry in the Multicast Database (MDB) is removed if no IGMP/MLD membership reports are received on a bridge port. This property only has an effect when igmp-snooping is set to yes. Default: 4m20s.
querier-intervaltimeChanges the timeout period for detected querier and multicast-router ports. This property only has an effect when igmp-snooping is set to yes. Default: 4m15s.
query-intervaltimeChanges the interval at which IGMP/MLD general membership queries are sent out when the bridge interface is acting as an IGMP/MLD querier. The interval takes effect when the last startup query is sent. This property only has an effect when igmp-snooping and multicast-querier are set to yes. Default: 2m5s.
query-response-intervaltimeChanges the response time for general IGMP/MLD queries when the bridge is acting as an active IGMP/MLD querier. This property only has an effect when igmp-snooping and multicast-querier are set to yes. Default: 10s.
startup-query-intervaltimeSpecifies the interval between startup general IGMP/MLD queries. This property only has an effect when igmp-snooping and multicast-querier are set to yes. Default: 31s250ms.
igmp-versionenum (2 | 3) { 2:2, 3:3 }Selects the IGMP version in which IGMP membership queries are generated when the bridge interface is acting as an IGMP querier. This property only has an effect when igmp-snooping and multicast-querier are set to yes. Default: 2.
mld-versionenum (1 | 2) { 1:1, 2:2 }Selects the MLD version in which MLD membership queries are generated when the bridge interface is acting as an MLD querier. This property only has an effect when the bridge has an active IPv6 address, and igmp-snooping and multicast-querier are set to yes. Default: 1.
auto-macbool

When auto-mac=yes is configured, the bridge selects a MAC address for the bridge interface automatically, in the following order of priority:

  1. From an Ethernet interface that is part of the bridge.
  2. From a non-Ethernet interface in the bridge, for example a WiFi or tunnel interface.
  3. A randomly generated address if none of the above is available.

If the configuration changes, for example when you add a new port to the bridge, the bridge MAC address is updated only if a higher-priority address source becomes available. For example, if the bridge initially used a randomly generated MAC address and an Ethernet interface was added later, the MAC address updates according to the highest available priority. The bridge also updates the MAC address if the current MAC address is associated with a port that is moved to a different bridge. The current MAC address and its priority level are saved and reused after a reboot.

When auto-mac=no is configured, you can set a static MAC address manually with the admin-mac property. Default: yes.

admin-macmacAddrStatic MAC address of the bridge. This property only has an effect when auto-mac is set to no. Default: none.
ageing-timetimeHow long a host's information is kept in the bridge database. Default: 00:05:00.
priorityalt { priority: enum (0x0000 | 0x1000 | 0x2000 | 0x3000 | 0x4000 | 0x5000 | 0x6000 | 0x7000 | 0x8000 | 0x9000 | 0xa000 | 0xb000 | 0xc000 | 0xd000 | 0xe000 | 0xf000) { 0x0000:0x0000, 0x1000:0x1000, 0x2000:0x2000, 0x3000:0x3000, 0x4000:0x4000, 0x5000:0x5000, 0x6000:0x6000, 0x7000:0x7000, 0x8000:0x8000, 0x9000:0x9000, 0xa000:0xa000, 0xb000:0xb000, 0xc000:0xc000, 0xd000:0xd000, 0xe000:0xe000, 0xf000:0xf000 } , priority: num [0 .. 65535] }Bridge priority, used by STP and RSTP to determine the root bridge and by MSTP to determine the CIST and IST regional root bridge. This property has no effect when protocol-mode is set to none. The bridge priority must be set in steps of 4096 (0x1000), the 12 lowest bits are ignored. Valid values are 0x0000, 0x1000, 0x2000, 0x3000, 0x4000, 0x5000, 0x6000, 0x7000, 0x8000, 0x9000, 0xa000, 0xb000, 0xc000, 0xd000, 0xe000, 0xf000, or their decimal equivalents 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440. Default: 32768 (0x8000).
max-message-agetimeChanges the Max Age value in BPDU packets transmitted by the root bridge. A root bridge sends BPDUs with Max Age set to the max-message-age value and a Message Age of 0. Every sequential bridge increments the Message Age before sending its BPDUs. When a bridge receives a BPDU where Message Age is equal to or greater than Max Age, the BPDU is ignored. This property only has an effect when protocol-mode is set to stp or rstp. Default: 00:00:20.
forward-delaytimeThe time spent during the initialization phase of the bridge interface, after router startup or after enabling the interface, in the listening and learning state before the bridge starts to function normally. Default: 00:00:15.
transmit-hold-countnumThe Transmit Hold Count used by the Port Transmit state machine to limit the transmission rate. Default: 6.
region-namestringMSTP region name. This property only has an effect when protocol-mode is set to mstp. Default: empty.
region-revisionnumMSTP configuration revision number. This property only has an effect when protocol-mode is set to mstp. Default: 0.
max-hopsnumThe number of bridges a BPDU can pass in an MSTP enabled network in the same region before the BPDU is ignored. This property only has an effect when protocol-mode is set to mstp. Default: 20.
vlan-filteringboolGlobally enables or disables VLAN functionality for the bridge. Default: no.
ether-typeenum (0x8100 | 0x88a8 | 0x9100) { 0x8100:0x8100, 0x88a8:0x88a8, 0x9100:0x9100 }Changes the EtherType used to determine whether a packet has a VLAN tag. Packets with a matching EtherType are considered tagged packets. This property only has an effect when vlan-filtering is set to yes. Default: 0x8100.
pvidnumPort VLAN ID (pvid) specifies which VLAN the untagged ingress traffic is assigned to. It applies for example to frames sent from the bridge IP address and destined to a bridge port. This property only has an effect when vlan-filtering is set to yes. Default: 1.
frame-typesenum (admit-all | admit-only-vlan-tagged | admit-only-untagged-and-priority-tagged) { admit-all:0, admit-only-vlan-tagged:1, admit-only-untagged-and-priority-tagged:2 }Specifies allowed frame types on a bridge port. This property only has an effect when vlan-filtering is set to yes. Default: admit-all.
ingress-filteringboolEnables or disables VLAN ingress filtering, which checks whether the ingress port is a member of the received VLAN ID in the bridge VLAN table. By default, VLANs that do not exist in the bridge VLAN table are dropped before they are sent out, but this property allows the packets to be dropped when they are received. Use it together with frame-types to specify whether the ingress traffic should be tagged or untagged. This property only has an effect when vlan-filtering is set to yes. Default: yes.
dhcp-snoopingboolEnables or disables DHCP snooping on the bridge. DHCP snooping redirects DHCP traffic to the CPU with an ACL rule, but it does not disable bridge fast-path. Other traffic on the bridge can still use fast-path and fasttrack. In RouterOS 7.25 and earlier, enabling DHCP snooping disabled bridge fast-path. Default: no.
dhcp-snooping-vlan-idsmulti { vlan-id-range: range [1 .. 4094] }VLAN IDs on which DHCP snooping is applied. VLANs outside the list are forwarded without snooping. By default, all VLANs are snooped. This property only has an effect when dhcp-snooping and vlan-filtering are set to yes.
dhcp-agent-circuit-idstring

Specify the relay agent circuit-id suboption value of the option 82 to be added to the DHCP messages passing through the bridge. The string length is limited to 255 characters with the default value being: $(INTERFACE):$(VID). The string value can contain variables, whose names must be enclosed in parentheses and prepended by a dollar sign. Example: 'some_arbitrary_text $(VID) another_piece_of_text $(INTERFACE)'. The following variables are supported: HOSTNAME, INTERFACE, VID and BRIDGEMAC. For the compatibility with previous versions, where the remote-id value was fixed, the semicolon appearing in the default value expression is not included in the remote-id value, in the case when the vlan filtering is not enabled.

This setting replaces the deprecated add-dhcp-option82 property. On upgrade, a bridge that had it enabled is converted automatically to the $(INTERFACE):$(VID) value.

dhcp-agent-remote-idstring

Specify the relay agent remote-id suboption value of the option 82 to be added to the DHCP messages passing through the bridge. The string length is limited to 255 characters with the default value being: $(BRIDGEMAC). The string value can contain variables, whose names must be enclosed in parentheses and prepended by a dollar sign. Example: 'some_arbitrary_text $(HOSTNAME) another_piece_of_text $(BRIDGEMAC)'. The following variables are supported: HOSTNAME, INTERFACE, VID and BRIDGEMAC.

This setting replaces the deprecated add-dhcp-option82 property. On upgrade, a bridge that had it enabled is converted automatically to the $(BRIDGEMAC) value.

dhcp-snooping-option82-policyenum (drop | keep | replace)Action for DHCP client messages that arrive on an untrusted bridge port with Option 82 already present: drop discards the message, keep forwards it with the original option, replace overwrites the option with the values set in dhcp-agent-circuit-id and dhcp-agent-remote-id. Messages received on trusted ports are always forwarded unchanged. The replace policy requires at least one of the agent ID properties to be configured. Default: drop. This property only has an effect when dhcp-snooping is set to yes.
arp-inspectionboolEnables or disables ARP inspection. When enabled, ARP packets arriving on untrusted ports are validated against the DHCP snooping binding database. Packets whose sender MAC and IP address pair does not match a binding entry are dropped. On trusted ports, all ARP packets are forwarded without verification. This property only has an effect when dhcp-snooping is set to yes. Default: no.
dhcpv6-snoopingboolEnables or disables DHCPv6 snooping on the bridge. Enabling DHCPv6 snooping turns off bridge fast path, which in turn affects the ability to fasttrack connections going over that bridge. Default: no.
dhcpv6-agent-circuit-idstring

Specify the DHCPv6 option 18 value to be added to the DHCPv6 messages passing through the bridge. The string length is limited to 255 characters with the default value being: $(INTERFACE):$(VID). The string value can contain variables, whose names must be enclosed in parentheses and prepended by a dollar sign. Example: 'some_arbitrary_text $(VID) another_piece_of_text $(INTERFACE)'. The following variables are supported: HOSTNAME, INTERFACE, VID and BRIDGEMAC.

dhcpv6-agent-remote-idstring

Specify the DHCPv6 option 37 value to be added to the DHCPv6 messages passing through the bridge. The string length is limited to 255 characters with the default value being: $(BRIDGEMAC). The string value can contain variables, whose names must be enclosed in parentheses and prepended by a dollar sign. Example: 'some_arbitrary_text $(VID) another_piece_of_text $(INTERFACE)'. The following variables are supported: HOSTNAME, INTERFACE, VID and BRIDGEMAC.

ip-source-guardboolEnables or disables IP Source Guard. When enabled, the bridge validates the source IP address of IPv4 packets arriving on untrusted ports against the DHCP snooping binding database. Packets whose source MAC and IP address pair does not match a binding entry for the ingress port are dropped. On trusted ports, all packets are forwarded without verification. This property also blocks RouterOS MAC access features (MAC Telnet, MAC WinBox and MAC ping) on untrusted ports. This property only has an effect when dhcp-snooping is set to yes. Default: no.
ra-guardboolRA guard is a security feature that validates incoming Router Advertisements against a list of authorized, trusted ports. Default: no.
port-cost-modeenum (short | long)

Changes the port path-cost and internal-path-cost mode for bridged ports, using automatic values based on interface speed. This setting does not affect bridged ports with manually configured path-cost or internal-path-cost.

Long mode path-costs by data rate are 2,000,000 at 10 Mbps, 200,000 at 100 Mbps, 20,000 at 1 Gbps, 2,000 at 10 Gbps, 800 at 25 Gbps, 500 at 40 Gbps, 400 at 50 Gbps and 200 at 100 Gbps. Short mode path-costs for the same rates are 100, 19, 4, 2, 1, 1, 1 and 1. Intermediate rates are calculated proportionally.

For HW offloaded bond interfaces, the highest path-cost among all bonded member ports is applied and is not affected by the total link speed of the bonding. For virtual interfaces (VLAN, EoIP, VXLAN and non-HW offloaded bond), and for wifi, wireless and 60 GHz interfaces, a path-cost of 20,000 is assigned for long mode and 10 for short mode. For dynamically bridged interfaces (wifi, wireless, PPP, VPLS), the path-cost defaults to 20,000 for long mode and 10 for short mode, which the service that adds the interfaces can override, for example with the CAPsMAN datapath.bridge-cost setting.

Use port monitor to observe the applied path-cost. This property has an effect when protocol-mode is set to stp, rstp or mstp. Default: long.

mvrpboolEnables MVRP for the bridge. It ensures that the MAC address 01:80:C2:00:00:21 is trapped and not forwarded. vlan-filtering must be enabled. Default: no.
forward-reserved-addressesbool

Whether to forward IEEE reserved multicast MAC addresses in the 01:80:C2:00:00:0x range. Bridges compliant with R/STP and MSTP standards should not forward these packets. This property can only be applied when protocol-mode is set to none.

Enabling forwarding of reserved MAC addresses can affect protocols that rely on these addresses. Enable forwarding only when necessary, such as in transparent bridging setups that extend long links, use bridges as media converters, or perform network analysis.

Notable addresses used by RouterOS:

  • 01:80:C2:00:00:00 - Spanning Tree Protocol (STP).
  • 01:80:C2:00:00:01 - Ethernet Flow Control. It is an exception and is not forwarded by the bridge.
  • 01:80:C2:00:00:02 - Link Aggregation Control Protocol (LACP).
  • 01:80:C2:00:00:03 - Dot1x client and server.
  • 01:80:C2:00:00:08 - Spanning Tree Protocol for 802.1ad bridges with ether-type=0x88a8.
  • 01:80:C2:00:00:0D - Multiple VLAN Registration Protocol for 802.1ad bridges with ether-type=0x88a8.
  • 01:80:C2:00:00:0E - Link Layer Discovery Protocol, Multi-chassis Link Aggregation Group and Precision Time Protocol.

Default: no.

max-learned-entriesalt { max-learned-entries: enum (unlimited | auto) , max-learned-entries: num }Sets the maximum number of learned hosts for the bridge interface. The auto value depends on the installed amount of RAM: 8192 for 64 MB, 16384 for 128 MB, 32768 for 256 MB, 65536 for 512 MB and 131072 for 1024 MB or more. Setting a higher value or unlimited increases the risk of an out-of-memory condition. This limit applies to the bridge interface, not to the hardware limits of the switch FDB table. Even when the bridge limit is reached, the switch can continue to learn hosts up to its hardware limits and forward correctly, but these additional hosts do not appear in the /interface/bridge/host table and cannot be monitored. Reaching this limit can also affect MLAG host synchronization. Default: auto.
mlag-peer-portalt { interface: iface_enum { none } , interface-bond: iface_enum }

An interface that will be used as a peer port. Both peer devices are using inter-chassis communication over these peer ports to establish MLAG and update the host table.
Peer ports can be configured as single Ethernet interfaces or bonding interfaces. However, using a bonding interface is recommended, as it helps prevent a single interface failure from affecting connectivity, especially when both MLAG nodes are still up and running.
It is recommended to keep the untagged VLAN used by the peer ports separate from the rest of your network, either by assigning a dedicated untagged VLAN (using pvid), or by setting the peer port to only allow VLAN tagged frames (using frame-types=admit-only-vlan-tagged).
All VLANs used for bridge slave ports must also be configured as tagged VLANs for peer-port (in the /interface/bridge/vlan table), so that peer-port is a member of those VLANs and can forward data.

mlag-prioritynumThis setting changes the priority for selecting the primary MLAG node. A lower number means higher priority. If both MLAG nodes have the same priority, the one with the lowest bridge MAC address will become the primary device.
mlag-heartbeatalt { mlag-heartbeat: enum (none) { none:0 } , mlag-heartbeat: time [1s .. 10s] }This setting controls how often heartbeat messages are sent to check the connection between peers. If no heartbeat message is received for three intervals in a row, the peer logs a warning and ends the MLAG session, which then reconnects on its own. If set to none, heartbeat messages are not sent at all.
mlag-init-delaytime

After the device reboots, keep the slave interfaces of dual-connected (MLAG) bonds out of the LACP bond for the specified time, or until the MLAG peers synchronize their system IDs, whichever happens first. Set the delay longer than the time the device needs to boot and reconnect to the MLAG peer. This prevents the bond from activating with a locally generated system ID before the MLAG system ID is synchronized, which would otherwise reset the LACP session on the partner.
Default: 1 minute.

mlag-lacp-fallbackbool

Specify what happens to the LACP system ID of dual-connected (MLAG) bonds when the MLAG peer link is lost. When set to yes, the bond reverts to its own LACP system ID. When set to no, the bond keeps the MLAG system ID, which prevents the LACP partner from renegotiating the bond when one MLAG node reboots or its peer link fails.
Default: yes.

Read-only ArgumentTypeDescription
actual-mtunumThe actual MTU value currently used by the bridge, derived from the lowest MTU value of the associated bridge ports when mtu=auto is set.
l2mtunumThe maximum size of a frame without the MAC header that the bridge can send. The bridge sets this value automatically to the lowest L2MTU value of any associated bridge port. This value cannot be changed manually.
mac-addressmacAddrThe MAC address currently used by the bridge interface. It is selected automatically according to auto-mac or set manually with admin-mac.