The command for getting current bridge status is "mstpctl showbridge". However, its output is in human-readable form, like following:
br0 CIST info enabled no bridge id 8.000.4A:36:1C:F4:FC:F1 designated root 0.000.00:00:00:00:00:00 regional root 0.000.00:00:00:00:00:00 root port none path cost 0 internal path cost 0 max age 0 bridge max age 20 forward delay 0 bridge forward delay 15 tx hold count 6 max hops 20 hello time 2 ageing time 300 force protocol version mstp time since topology change 0 topology change count 0 topology change no
It is very inconvenient to parse such an output in scripts. So, for scripting support, this command supports additional parameter. The script author can specify the particular parameter of interest as a last item in the command and it will be printed on a single line, alone. For example:
# mstpctl showbridge br0 enabled no
The complete list of bridge parameters:
The same holds for the per-port parameters too. One can add the desired parameter as a last argument to the "mstpctl showport" command and it will be printed on a single line, alone, as in example:
# mstpctl showport br0 eth0 network-port no
The complete list of port parameters:
The "mstpctl setageing" command sets the bridge Ageing Time parameter in the mstpd. Its current value can be viewed by the command "mstpctl showbridge br0" among other parameters; also, for the scripting purposes, it can be viewed separately by the command "mstpctl showbridge br0 ageing-time".
This parameter differs from the other ones: it is only informational parameter. By setting it in the mstpd one do not change the real bridge's Ageing Time; it is supposed to be set as information to the mstpd that real Ageing Time in the real bridge was changed.
So, the supposed flow of events is as follows: each time the system admin changes Ageing Time in the real bridge, he/she should also inform mstpd about that by issuing "mstpctl setageing" command.
Also, it is worth noting that mstpd uses this parameter only when forced to the "stp" protocol (for the "rapid ageing"). So, if the admin does not plan to use mstpd in that mode, he/she could safely ignore this parameter.
Mstpd will not drop looped-back BPDUs, and there are several good reasons for it:
a) 802.1Q explicitly says that loopback check is not necessary (see clause 14.4, NOTE 3 of the 802.1Q-2005);
b) mstpd puts the port in the Backup/Discarding state after receiving looped BPDU, even when forced to the "stp" protocol, so there is no problem - mstpd takes reasonable action in this case;
c) if looped-back BPDUs were dropped, the port would remain in Forwarding state and bad things would happen, e.g. broadcast storms and undesired MAC learning on this port.
There are reports that such behavior breaks 802.1D compliance. That is expected - after all, mstpd is compliant with 802.1Q, not 802.1D.