MSTPD(8)
π 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.mstpdstays in the foreground and logs to standard output instead ofsyslog(3), unless-sis also given. so useful for debugging and for running under a service supervisor π«Ά-sβ log tosyslog(3)even when running in the foreground. it's implied when daemonizing, bestie.-vlevel β set the log verbosity. level is an integer:0silences all output,1prints errors only,2(the default) adds informational messages, and3adds debug traces. higher values up to100are accepted but produce no additional detail. so like, she'll take your100, she just won't do anything with it π-Vβ print themstpdversion 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 bybridge-stp(8); controls whethermstpdis 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
- 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