Cumulus Linux vs Cisco IOS - Spanning Tree Protocol

Issue

User already knows Cisco IOS format and wants translation to mstpd (the spanning tree protocol daemon for Linux).

Refer to the STP parameter list for more information.

You can find the Cisco Configuration Guide used to interpret their commands here.

Spanning Tree Translation Table

Cumulus LinuxCisco Systems IOSDescription
net add bridge stp maxage 20
Configured under the bridge
spanning-tree vlan vlan-id max-age 20
Global configuration command
Sets the bridge/VLAN maximum age to <max_age> seconds. The default is 20 for both Operating Systems.
net add bridge stp fdelay 15
Configured under the bridge
spanning-tree vlan vlan-id forward-time seconds
Global configuration command
Sets the bridge/VLAN forward delay to <time> seconds. The default is 15 for both Operating Systems.
net add bridge stp maxhops 20
Configured under the bridge
spanning-tree vlan vlan-id root primary [ diameter net-diameter [ hello-time seconds ]]
Global configuration command
Sets the bridge's maximum hops to <max_hops>. The default on Cumulus Linux is 20. On Cisco the range is 2 to 7 with the default being 7.
net add bridge stp txholdcount 6
Configured under the bridge
spanning-tree transmit hold-count value

Global configuration command

Sets the bridge/VLAN transmit hold count to <tx_hold_count>. The default is 6 for both Operating Systems. Cisco describes this as "the number of BPDUs that can be sent before pausing for 1 second."
net add bridge stp forcevers rstp
Configured under the bridge
spanning-tree mode{ pvst | mst | rapid-pvst }
Global configuration command
Sets the bridge/VLAN to a particular spanning-tree mode (MST, RSTP, etc)
net add bridge stp treeprio 32768
Configured under the bridge
spanning-tree vlan vlan-id priority priority
Global configuration command
Configure the switch's priority of a bridge/VLAN. The default for both operating systems is 32768. The range is a number between 0 and 65535
net add bridge stp hello 2
Configured under the bridge
spanning-tree vlan vlan-id hello-time seconds
Global configuration command
Sets the bridge/VLAN hello time to <time> seconds. The default is 2 for both operating systems.
net add interface swp10 stp portpathcost 10
Configured under an interface stanza
spanning-tree vlan vlan-id cost cost

-interface configuration command

Configure the cost for a bridge/VLAN. The range is 1 to 200000000. Cisco derives the cost from the media speed of the interface. On Cumulus Linux the default is 0.
net add interface swp1 stp portadminedge yes

Configured under the interface

spanning-tree portfast default

Global configuration command

spanning-tree portfast

-interface configuration command

Immediately brings an interface configured as an access or trunk port to the forwarding state from a blocking state, bypassing the listening and learning states.
net add interface swp2 stp portautoedge yes
Configured under interface
No Comparable Command
Reception of BPDUs on a port determines whether port is an edge port or not. When the port is receiving no BPDUs it becomes an edge port.
net add interface swp3 stp portp2p yes

Configured under the interface

spanning-tree link-type { point-to-point | shared }

-interface configuration command

Enables/disables the point-to-point detection mode of the port <port> in bridge <bridge>. The default is auto on Cumulus Linux. Cisco determines the link-type by the duplex settings (p2p for full and shared for half).
net add interface swp4 stp portrestrrole yes
Configured under the interface
spanning-tree guard root

-interface configuration command

Enables/disables the ability of the port <port> in bridge <bridge> to take the root role. The default is no.
net add interface swp5 stp bpduguard yes
Configured under the interface
spanning-tree portfast bpduguard default
Global configuration command, however only affects ports configured with
spanning-tree portfast
Enables/disables the BPDU guard configuration
net add interface swp6 stp portbpdufilter yes
Configured under the interface
spanning-tree portfast bpdufilter default
Global configuration command, however only affects ports configured with
spanning-tree portfast
Enables bpdufilter on a switch port, which filters BPDUs in both directions.
net add interface swp7 stp portrestrtcn yes
Configured under the interface
no equivalentEnables/disables the ability of the port <port> in bridge <bridge> to propagate received topology change notifications. The default is no.
net add interface swp8 stp portnetwork yes
Configured under the interface
spanning-tree bridge assurance
Global configuration command
Enables/disables the bridge assurance capability
net add interface swp9 stp treeportprio 128
Configured under the interface
spanning-tree port-priority priority
Configured under the interface
Configure the port priority for an interface. The default for both operating systems is 128.

Full Configuration Example

cumulus@switch:~$ cat /etc/network/interfaces

auto bridge
iface bridge
    bridge-ports glob swp1-10
    bridge-vlan-aware yes
    bridge-vids 1-2000
    bridge-pvid 1
    bridge-stp on
    mstpctl-maxhops 20
    mstpctl-maxage 20

auto swp1
iface swp1
    mstpctl-portadminedge yes

auto swp2
iface swp2
    mstpctl-portautoedge yes

auto swp3
iface swp3
    mstpctl-portp2p yes

auto swp4
iface swp4
    mstpctl-portrestrrole yes

auto swp5
iface swp5
    mstpctl-bpduguard yes

auto swp6
iface swp6
    mstpctl-portbpdufilter yes

auto swp7
iface swp7
    mstpctl-portrestrtcn yes

auto swp8
iface swp8
    mstpctl-portnetwork yes

auto swp9
iface swp9
    mstpctl-treeportprio 128

auto swp10
iface swp10
    mstpctl-portpathcost 10