Menu

ImplementationFeatures

Vitalii Demianets

Notes on the implementation features

1. Scripting support

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:

  • enabled
  • bridge-id
  • designated-root
  • regional-root
  • root-port
  • path-cost
  • internal-path-cost
  • max-age
  • bridge-max-age
  • forward-delay
  • bridge-forward-delay
  • tx-hold-count
  • max-hops
  • hello-time
  • ageing-time
  • force-protocol-version
  • time-since-topology-change
  • topology-change-count
  • topology-change

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:

  • enabled
  • role
  • state
  • port-id
  • external-port-cost
  • admin-external-cost
  • internal-port-cost
  • admin-internal-cost
  • designated-root
  • dsgn-external-cost
  • dsgn-regional-root
  • dsgn-internal-cost
  • designated-bridge
  • designated-port
  • admin-edge-port
  • auto-edge-port
  • oper-edge-port
  • topology-change-ack
  • point-to-point
  • admin-point-to-point
  • restricted-role
  • restricted-TCN
  • port-hello-time
  • disputed
  • bpdu-guard-port
  • bpdu-guard-error
  • network-port
  • ba-inconsistent

2. Ageing Time

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.

3. Looped-back BPDUs

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.


Related

Discussion: mstpd changes
Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.