(module-stp)=
This configuration module enables support for Spanning Tree Protocol (STP) to avoid loops by dynamically blocking ports. Many platforms already support and enable STP by default; this module provides explicit control over those settings
(stp-platform)=
The following table describes per-platform support of individual STP features:
| Operating system | STP | MSTP | RSTP | Per-VLAN RSTP |
Enable per port |
|---|---|---|---|---|---|
| Arista EOS1 | ✅ | ✅ | ✅ | ✅ | ✅ |
| Cisco IOL L2^[IOLL2] | ✅ | ✅ | ✅ | ✅ | ✅ |
| Aruba AOS-CX2 | ❗ | ✅ | ❌ | ✅ | ✅ |
| Cumulus Linux 4.x3 | ✅ | ❌ | ✅ | ❌ | ✅ |
| Cumulus 5.x (NVUE)3 | ✅ | ❌ | ✅ | ❌ | ✅ |
| Dell OS104 | ✅ | ✅ | ✅ | ❗ | ✅ |
| FRR5 | ✅ | ❌ | ❌ | ❌ | ❌ |
MSTP/RSTP ports fall back to regular STP upon receiving a plain STP BPDU.
- stp.protocol (one of
stp,mstp,rstporpvrst) -- Global STP flavor to run on supporting nodes, defaultstp - stp.stub_port_type (one of
normal,edge,network,autoornone) -- Port type to configure on ports with only hosts connected, defaultnone
- stp.enable (bool) -- Enable STP. Optional, default: True. Set this to False explicitly to disable STP on platforms that enable it by default. We're not responsible for the loops you might get as a result.
You can set the **stp.enable** parameter in the **vlans** dictionary to enable per-VLAN STP.
- stp.priority (int 0..61440 in increments of 1024) -- STP priority for root election, by default, all nodes have equal priority 32656. In case of equal priority, the bridge with the lowest MAC address becomes root; note that MAC addresses are assigned randomly in Netlab
- stp.port_type (one of
normal,edge,networkorauto) -- STP port type for all interfaces connected to this node
- stp.port_priority (int 0..15) -- STP port priority for selecting between multiple ports; ports are blocked based on priority (lower value = higher priority). The priority is sent over the wire (4 bits) as the most significant part of the port ID; it is used by the node receiving it (!) to decide which port(s) to unblock. Note that on many platforms, the value that ends up in the configuration is a multiple (x16) of this attribute
- stp.port_type (one of
normal,edge,networkorauto) -- STP port type for this interface, defaultnormal
Footnotes
-
MSTP is enabled by default ↩
-
MSTP is enabled by default; STP is stated as not supported, but it is configured as MSTP (see tip below). ↩
-
PVRST is enabled by default, but will require custom VLAN templates as Netlab uses virtual networks (which don't support STP) ↩
-
STP is disabled by default; STP is not supported on VLAN trunks as FRR sends BPDUs tagged, you could use Cumulus instead ↩