mstpctl-bpduguard regular expression


Userlevel 1
Is there a way to use regular expressions for the command below instead of having to type out each swp?

mstpctl-bpduguard swp1=yes swp2=yes swp3=yes swp4=yes

6 replies

Userlevel 4
Hey B,

You can also put mstpctl-bpduguard under the interface, rather than just the bridge. I created a guide from people used to IOS config here: https://support.cumulusnetworks.com/hc/en-us/articles/206908397-Cumulus-Linux-vs-Cisco-IOS-Spanning-...

So you could do something like this in /etc/network/interfaces with mako->

% for i in range(1, 4): auto swp${i} iface swp${i} mstpctl-bpduguard yes % endfor 
More mako information here: https://support.cumulusnetworks.com/h...
Userlevel 1
Sean Cavanaugh wrote:

Hey B,

You can also put mstpctl-bpduguard under the interface, rather than just the bridge. I c...

Thanks Sean, greatly appreciated!
Userlevel 3
When you're configuring BPDU guard, where you put the config depends on the bridge mode you're using. If you're using a VLAN-aware bridge, then put the config under the switch port interface. If you have a traditional mode bridge, then put the BPDU guard config under the bridge interface.

https://docs.cumulusnetworks.com/display/DOCS/Spanning+Tree+and+Rapid+Spanning+Tree#SpanningTreeandR...
Userlevel 1
Pete B wrote:

When you're configuring BPDU guard, where you put the config depends on the bridge mode you're us...

Thanks!
Userlevel 1
Along the same lines, I read that the only way to recover a port that has been disabled due to the bpdu guard, is to manually do a ifup [port]...is there something in the works to have the port automatically brought back up after a certain amount of time has lapsed? For example, Cisco has the "errdisable recovery interval [value]" command to try and automatically bring that port back up after a certain amount of time.

Userlevel 4
Hey B, That implementation 'could' be fairly trivial. I suggest talking to your SE for a feature request. In the meantime this is relatively easy to solve with automation. e.g. you could have Ansible get off and give you a report of what interfaces are down b/c of BPDU guard. Then make the conscious decision just to ifdown ; ifup if a certain time has elapsed. Again send me an email at sean at cumulusnetworks.com if you need to get your SE's contact info.

Reply