Configures spanning tree parameters

Supported in the following platforms:

  • Access Points — AP505i, AP510i/e, AP560i/h
  • Service Platforms — NX5500, NX7500, NX9500, NX9600, VX9000


spanning-tree [bpdufilter|bpduguard|force-version|guard|link-type|mst|
spanning-tree [force-version <0-3>|guard root|portfast]
spanning-tree [bpdufilter|bpduguard] [default|disable|enable]
spanning-tree link-type [point-to-point|shared]
spanning-tree mst <0-15> [cost <1-200000000>|port-priority <0-240>]
spanning-tree port-cisco-interoperability [disable|enable]


spanning-tree [force-version <0-3>|guard root|portfast]
force-version <0-3> Specifies the spanning tree force version. A version identifier of less than 2 enforces the spanning tree protocol. Select one of the following versions:
  • 0 – Spanning Tree Protocol (STP)
  • 1 – Not supported
  • 2 – Rapid Spanning tree Protocol (RSTP)
  • 3 – Multiple Spanning Tree Protocol (MSTP). This is the default setting
guard root Enables Root Guard for the port

The Root Guard disables superior BPDU (Bridge Protocol Data Unit) reception. The Root Guard ensures the enabled port is a designated port. If the Root Guard enabled port receives a superior BPDU, it moves to a discarding state (root-inconsistent STP state). This state is equivalent to a listening state, and data is not forwarded across the port. Therefore, enabling the guard root enforces the root bridge position. Use the no parameter with this command to disable the Root Guard.

portfast Enables rapid transitions. Enabling PortFast allows the port to bypass the listening and learning states.
spanning-tree [bpdufilter|bpduguard] [default|disable|enable]
bpdufilter [default|disable| enable] Sets a PortFast BPDU filter for the port

Use the no parameter with this command to revert the port BPDU filter to its default. The spanning tree protocol sends BPDUs from all ports. Enabling the BPDU filter ensures PortFast enabled ports do not transmit or receive BPDUs.

bpduguard [default|disable| enable] Enables BPDU guard on a port

Use the no parameter with this command to set BPDU guard to its default.

When the BPDU guard is set for a bridge, all PortFast-enabled ports that have the BPDU guard set to default shut down upon receiving a BPDU. If this occurs, the BPDU is not processed. The port can be brought back either manually (using the no shutdown command), or by configuring the errdisable-timeout to enable the port after a specified interval.

spanning-tree link-type [point-to-point|shared]
link-type [point-to-point|shared] Enables point-to-point or shared link types
  • point-to-point – Enables rapid transition. This option indicates the port should be treated as connected to a point-to-point link. A port connected to a controller is a point-to-point link.
  • shared – Disables rapid transition. This option indicates this port should be treated as having a shared connection. A port connected to a hub is on a shared link,
spanning-tree mst <0-15> [cost <1-200000000>|port-priority <0-240>]
mst <0-15> Configures MST on a spanning tree
cost <1-200000000> Defines path cost for a port from 1 - 200000000. The default path cost depends on the speed of the port. The cost helps determine the role of the port in the MSTP network. The designated cost is the cost for a packet to travel from this port to the root in the MSTP configuration. The slower the media, the higher the cost.
port-priority <0-240> Defines port priority for a bridge from 1 - 240. Lower the priority greater is the likelihood of the port becoming a designated port. Applying a higher value impacts the port's likelihood of becoming a designated port.
spanning-tree port-cisco-interoperability [disable|enable]
port-cisco-interoperability Enables interoperability with Cisco's version of MSTP (which is incompatible with standard MSTP)
enable Enables CISCO Interoperability
disable Disables CISCO Interoperability. The default is disabled.


nx9500-6C8809(config-profile-default-rfs4000-if-ge1)#spanning-tree bpdufilter disable

nx9500-6C8809(config-profile-default-rfs4000-if-ge1)#spanning-tree bpduguard enable

nx9500-6C8809(config-profile-default-rfs4000-if-ge1)#spanning-tree force-version 1

nx9500-6C8809(config-profile-default-rfs4000-if-ge1)#spanning-tree guard root

nx9500-6C8809(config-profile-default-rfs4000-if-ge1)#spanning-tree mst 2 port-priority 10

nx9500-6C8809(config-profile-default-rfs4000-if-ge1)#show context
 interface ge1
  description "This is GigabitEthernet interface for Royal King"
  duplex full
  spanning-tree bpduguard enable
  spanning-tree bpdufilter disable
  spanning-tree force-version 1
  spanning-tree guard root
  spanning-tree mst 2 port-priority 10

Related Commands

no Removes spanning tree settings configured on this interface