MSTPCTL(8)

πŸ“¦ version 0.2.0, in nixos 26.05, nixpkgs unstable, ubuntu stonking

✨ 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 is 20. πŸ’–
  • mstpctl setfdelay <bridge> <time> β€” sets the <bridge>'s 'forward delay' to <time> seconds. default is 15.
  • mstpctl setmaxhops <bridge> <max_hops> β€” sets the <bridge>'s 'maximum hops' to <max_hops>. default is 20.
  • mstpctl setforcevers <bridge> {mstp|rstp|stp} β€” forces the <bridge> to use a specific STP protocol version. mstp is 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 between 0 and 15. Bridge priority affects the bridge id, and the lowest priority bridge becomes the (regional) root. 🌈 Heads up: traditionally bridge priority is a multiple of 4096 and ranges from 0 to 15*4096 = 61440. mstpd is different β€” it throws out that useless "multiple of 4096" rule and expresses bridge priority in natural units (0-15). default is 8.
  • mstpctl setportpathcost <bridge> <port> <cost> β€” sets the port cost of the <port> in <bridge> to <cost>. default is 0 (= auto).
  • mstpctl setportadminedge <bridge> <port> {yes|no} β€” enables/disables the admin edge state of the <port> in <bridge>. default is no.
  • mstpctl setportautoedge <bridge> <port> {yes|no} β€” enables/disables the auto transition to/from edge state of the <port> in <bridge>. default is yes.
  • mstpctl setportp2p <bridge> <port> {yes|no|auto} β€” enables/disables the point2point detection mode of the <port> in <bridge>. default is auto.
  • mstpctl setportrestrrole <bridge> <port> {yes|no} β€” enables/disables the restrictions on the <port>'s ability to take the root role in <bridge>. default is no (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 is no (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 is no.
  • 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 between 0 and 15. 🌸 And again with the tradition thing: traditionally port priority is a multiple of 16 and ranges from 0 to 15*16 = 240. mstpd is different β€” it throws out that useless "multiple of 16" rule and expresses port priority in natural units (0-15). default is 8.
  • mstpctl sethello <bridge> <time> β€” sets the <bridge>'s 'hello time' to <time> seconds. default is 2.
  • 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 is 300s. 🫢 Bestie, listen β€” this parameter is different from all the other ones: it's an informational parameter only. Setting it in mstpd does not change the real bridge's Ageing Time. The idea is you set it here as information to mstpd letting 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 is no.
  • 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 is no.

πŸ’œ 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 πŸ‘€

brctl(8) ip(8)


🌟 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