:lastproofread: 2025-12-22 .. _bridge-interface: ###### Bridge ###### VyOS bridges connect Ethernet segments by grouping multiple interfaces into a single bridge interface, which acts as a virtual software switch. Unlike routers, which forward traffic based on Layer 3 IP addresses, bridges operate at Layer 2 and forward traffic based on MAC addresses. Operating at Layer 2, bridges are protocol-agnostic and transparently forward all Ethernet- encapsulated traffic, whether it is IPv4, IPv6, or specialized industrial protocols. This implementation utilizes the Linux bridge subsystem to support a subset of the ANSI/IEEE 802.1d standard for transparent bridging and MAC address learning. .. note:: :abbr:`STP (Spanning Tree Protocol)` is disabled by default in VyOS and must be explicitly enabled if required. See :ref:`stp` for details. ************* Configuration ************* Common interface configuration ============================== .. cmdinclude:: /_include/interface-common-with-dhcp.txt :var0: bridge :var1: br0 Member interfaces ================= .. cfgcmd:: set interfaces bridge member interface **Configure an interface as a bridge member.** Valid interface types are: :ref:`ethernet-interface`, :ref:`bond-interface`, :ref:`l2tpv3-interface`, :ref:`openvpn`, :ref:`vxlan-interface`, :ref:`wireless-interface`, :ref:`tunnel-interface`, and :ref:`geneve-interface`. Use tab completion to list interfaces that can be bridged. .. cfgcmd:: set interfaces bridge member interface priority **Configure the** :abbr:`STP (Spanning Tree Protocol)` **port priority for a specific member interface within a bridge.** Within the :abbr:`STP (Spanning Tree Protocol)` topology, each member interface in a bridge operates as a port with an assigned **priority** and **path cost**. :abbr:`STP (Spanning Tree Protocol)` uses these values to determine the **lowest-cost path** to the root bridge, maintaining a loop-free topology. Traffic flows through the path with the lowest path cost, while alternate paths remain in standby. A **lower** priority value means **higher** precedence in path selection. :abbr:`STP (Spanning Tree Protocol)` considers the port priority only if multiple member interfaces have the same path costs. .. cfgcmd:: set interfaces bridge member interface cost **Configure the** :abbr:`STP (Spanning Tree Protocol)` **path cost for a specific member interface within the bridge.** Path cost is the primary metric :abbr:`STP (Spanning Tree Protocol)` uses to determine the path to the root bridge. This value is based on interface bandwidth; faster interfaces receive lower costs. By assigning a lower cost, you give the interface higher precedence during path selection. .. cfgcmd:: set interfaces bridge member interface disable-learning **Disable MAC address learning for a specific member interface within a bridge.** When learning is disabled, the bridge will not add source MAC addresses observed on this port to its forwarding database (FDB). Frames destined to MACs not present in the FDB are then flooded to all bridge ports rather than unicast-forwarded. Bridge options ============== Configure how bridge interfaces maintain their :abbr:`FDB (Forwarding Database)` , react to topology changes, and optimize multicast data streams. .. cfgcmd:: set interfaces bridge aging