MSTPD(8)

πŸ“¦ version 0.2.0, in ubuntu stonking

πŸ’– MSTPD(8) β€” the Multiple Spanning Tree Protocol daemon, bestie edition πŸ’–

okay so real talk: this is mstpd, section 8 of the System Manager's Manual. she's a daemon, she's in user space, and she's about to make your Linux bridges stop doing loops. periodt. 🌈


✨ NAME ✨

mstpd β€” Multiple Spanning Tree Protocol daemon πŸ¦‹


✨ SYNOPSIS ✨

mstpd [-d] [-s] [-v level]
mstpd -V

✨ DESCRIPTION ✨

okay so mstpd is a user-space daemon that implements the IEEE 802.1D-2004 STP, the IEEE 802.1D-2004 RSTP and the IEEE 802.1Q-2005 MSTP variants of the Spanning Tree Protocol for Linux bridges. not me replacing the in-kernel STP implementation πŸ’… β€” she does it by running the bridge in user_stp mode and translating the resulting CIST port states back to the kernel bridge. iconic behavior, honestly.

mstpd relies on the bridge-stp(8) helper script, which the kernel invokes whenever STP is enabled or disabled on a bridge (via brctl stp bridge on / off or ip link set bridge type bridge stp_state 0|1), to start, stop and attach bridges to the running daemon. once she's up, mstpd gets configured at runtime through mstpctl(8). that's the whole workflow, no cap.

😭 lowkey important warning, bestie: the MSTP code path is largely untested and is not recommended for production use. the STP and RSTP code paths are well exercised and pass the IXIA ANVL RSTP test suite (with the exception of looped-back BPDUs). so like… STP/RSTP? ate. MSTP? she's giving experimental πŸ”₯

by default, mstpd forks into the background, writes its PID to /var/run/mstpd.pid, and logs through syslog(3) under the daemon facility. classic daemon main character energy πŸ‘‘


✨ OPTIONS ✨

  • -d β€” do not daemonize. mstpd stays in the foreground and logs to standard output instead of syslog(3), unless -s is also given. so useful for debugging and for running under a service supervisor 🫢
  • -s β€” log to syslog(3) even when running in the foreground. it's implied when daemonizing, bestie.
  • -v level β€” set the log verbosity. level is an integer: 0 silences all output, 1 prints errors only, 2 (the default) adds informational messages, and 3 adds debug traces. higher values up to 100 are accepted but produce no additional detail. so like, she'll take your 100, she just won't do anything with it πŸ™ˆ
  • -V β€” print the mstpd version and exit. short and sweet πŸ’…

✨ SIGNALS ✨

  • SIGTERM, SIGINT, SIGHUP, SIGUSR2 β€” shut down cleanly. time to go, sweets 🌸
  • SIGUSR1 β€” raise the log level to debug at runtime. surprise verbosity, love that for her ✨
  • SIGPIPE β€” ignored. she literally does not care πŸ’€

✨ FILES ✨

  • /var/run/mstpd.pid β€” PID file written when running as a daemon. her little name tag πŸŽ€
  • /etc/bridge-stp.conf β€” configuration file read by bridge-stp(8); controls whether mstpd is started automatically and which arguments are passed to it.

mstpctl(8) talks to the daemon over a Linux abstract Unix-domain socket (AF_UNIX name \0.mstp_server), not over a socket file in the filesystem. so don't go looking for it in your directory listing, bestie, she's abstract πŸ¦‹


✨ EXIT STATUS ✨

mstpd exits 0 on a clean shutdown and non-zero on a fatal error (failure to daemonize, to create the PID file, to open the control socket, or to attach to netlink(7)). if she's leaving with a nonzero vibe, something went wrong fr fr 😭


✨ EXAMPLES ✨

run in the foreground with debug logging, for troubleshooting:

# mstpd -d -v 4

enable user-space STP on a bridge so that the kernel hands control to mstpd through bridge-stp(8):

# ip link set br0 type bridge stp_state 1

inspect the running daemon's view of a bridge:

# mstpctl showbridge br0

see? slay. go peek at your bridge's whole situation πŸ‘‘


✨ SEE ALSO ✨

mstpctl-utils-interfaces(5), brctl(8), bridge-stp(8), ip(8), mstp_restart(8), mstpctl(8)


✨ STANDARDS ✨

IEEE Std 802.1D-2004, Media Access Control (MAC) Bridges. IEEE Std 802.1Q-2005, Virtual Bridged Local Area Networks. the receipts, the sources, the lore πŸ“šβœ¨


✨ AUTHORS ✨

mstpd was written by Srinivas Aji <Aji_Srinivas@emc.com> and Vitalii Demianets <dvitasgs@gmail.com>, with contributions from many others. group project, but make it networking 🫢

this manual page was written by Nadzeya Hutsko <nadzeya@debian.org>. she did that πŸ’…


and that's the whole page, bestie β€” brought to you from Debian, dated April 28, 2026, in the MSTPD(8) era of the System Manager's Manual. stay loop-free out there πŸŒΈβœ¨πŸ‘‘

πŸ“¦ where this page comes from