MSTPCTL(8)
β¨ MSTPCTL(8) β¨
hi bestie π«Ά you've landed on the manual page for mstpctl, a section 8 (that's sysadmin/daemon territory, iykyk) command. pull up a chair, we're doing spanning tree π
π NAME π
mstpctl β mstpd configuration
πΈ SYNOPSIS πΈ
mstpctl [command]
π¦ DESCRIPTION π¦
okay so mstpctl is your little remote control for the Multiple Spanning Tree daemon, aka mstpd. The whole point of MSTPCTL is configuring STP parameters on bridges that have user-space STP turned on. π₯
Here's the tea though: right now, STP is disabled by default on the bridge. Not a vibe, but that's how it is. To actually enable user-space STP you gotta do one of these two:
brctl stp <bridge> on
or
ip link set <bridge> type bridge stp_state 1
...and while you do that, make sure the /sbin/bridge-stp kernel helper script is gonna return success (0) for this operation. No 0, no deal, periodt. β
π SPANNING TREE PROTOCOL CONFIGURATION π
mstpctl(8) is fully capable of configuring certain spanning tree protocol parameters for you. And if you wanna know what any of these parameters actually mean in the grand cosmic sense, go read the IEEE 802.1D-2004 and 802.1Q-2005(-2011) standards. yes, actual homework, sorry bestie π
mstpctl setmaxage <bridge> <max_age>β sets the<bridge>'s 'maximum age' to<max_age>seconds. default is20. πmstpctl setfdelay <bridge> <time>β sets the<bridge>'s 'forward delay' to<time>seconds. default is15.mstpctl setmaxhops <bridge> <max_hops>β sets the<bridge>'s 'maximum hops' to<max_hops>. default is20.mstpctl setforcevers <bridge> {mstp|rstp|stp}β forces the<bridge>to use a specific STP protocol version.mstpis the default. (mstp really said main character energy π)mstpctl settxholdcount <bridge> <tx_hold_count>β sets the<bridge>'s 'transmit hold count' to<tx_hold_count>.mstpctl settreeprio <bridge> <mstid> <priority>β sets<bridge>'s priority for the tree with id =<mstid>.<priority>is between0and15. Bridge priority affects the bridge id, and the lowest priority bridge becomes the (regional) root. π Heads up: traditionally bridge priority is a multiple of4096and ranges from0to15*4096 = 61440.mstpdis different β it throws out that useless "multiple of 4096" rule and expresses bridge priority in natural units (0-15). default is8.mstpctl setportpathcost <bridge> <port> <cost>β sets the port cost of the<port>in<bridge>to<cost>. default is0(= auto).mstpctl setportadminedge <bridge> <port> {yes|no}β enables/disables the admin edge state of the<port>in<bridge>. default isno.mstpctl setportautoedge <bridge> <port> {yes|no}β enables/disables the auto transition to/from edge state of the<port>in<bridge>. default isyes.mstpctl setportp2p <bridge> <port> {yes|no|auto}β enables/disables the point2point detection mode of the<port>in<bridge>. default isauto.mstpctl setportrestrrole <bridge> <port> {yes|no}β enables/disables the restrictions on the<port>'s ability to take the root role in<bridge>. default isno(i.e. no restrictions on the port's role).mstpctl setportrestrtcn <bridge> <port> {yes|no}β enables/disables the restrictions on the<port>'s ability to propagate a received topology change notification in<bridge>. default isno(i.e. no restrictions on the TCN propagation).mstpctl setbpduguard <bridge> <port> {yes|no}β enables/disables the bpduguard configuration of the<port>in<bridge>. default isno.mstpctl settreeportprio <bridge> <port> <mstid> <priority>β sets the<port>'s priority in<bridge>to<priority>for the MSTI with id =<mstid>. The priority value is a number between0and15. πΈ And again with the tradition thing: traditionally port priority is a multiple of16and ranges from0to15*16 = 240.mstpdis different β it throws out that useless "multiple of 16" rule and expresses port priority in natural units (0-15). default is8.mstpctl sethello <bridge> <time>β sets the<bridge>'s 'hello time' to<time>seconds. default is2.mstpctl setageing <bridge> <time>β sets the ethernet (MAC) address ageing<time>, in seconds, for the<bridge>. Only used when the protocol version is forced to STP. default is300s. π«Ά Bestie, listen β this parameter is different from all the other ones: it's an informational parameter only. Setting it inmstpddoes not change the real bridge's Ageing Time. The idea is you set it here as information tomstpdletting it know that the real Ageing Time on the real bridge was already changed. Don't get it twisted. πmstpctl setportnetwork <bridge> <port> {yes|no}β enables/disables the bridge assurance capability for a<port>in<bridge>. default isno.mstpctl setportbpdufilter <bridge> <port> {yes|no}β enables/disables the BPDU filter capability for a port<port>in bridge<bridge>, i.e. discard any ingress BPDUs and do not issue any BPDUs for this port. The default isno.
π SPANNING TREE PROTOCOL SHOW COMMANDS π
the gossip commands. the "tell me everything" commands. we love a peek behind the curtain π§
mstpctl showbridge [<bridge>]β will show information of the<bridge>'s CIST instance. If the<bridge>parameter is omitted, it shows info for all bridges. β¨mstpctl showport <bridge> [<port>]β will show short (one-line) information about the<port>of the<bridge>'s CIST instance. If the<port>parameter is omitted, it shows info for all ports.mstpctl showportdetail <bridge> [<port>]β will show detailed information about the<port>of the<bridge>'s CIST instance. If the<port>parameter is omitted, it shows info for all ports.mstpctl showtree <bridge> <mstid>β will show information of the<bridge>'s MST instance with id =<mstid>.mstpctl showtreeport <bridge> <port> <mstid>β will show detailed information about the<port>of the<bridge>'s MST instance with id =<mstid>.
π SEE ALSO π
π AUTHOR π
The source code for mstpctl was written by Vitalii Demianets <dvitasgs@gmail.com>. This manpage was written by Satish Ashok <sashok@cumulusnetworks.com>, based on brctl(8). absolute icons, we stan π
and that's the whole page bestie! this one's dated April 29, 2013 and lives under the MSTPCTL(8) manual. go forth and configure your spanning trees responsibly π ππ¦
π¦ where this page comes from
- nixos 26.05: mstpd 0.2.0
- nixpkgs unstable: mstpd 0.2.0
- ubuntu stonking: mstpd 0.2.0-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms