Configuring 802.1W Rapid Spanning Tree Protocol

The 802.1W Rapid Spanning Tree Protocol can be enabled on a port-based VLAN or on an individual port and 802.1W port and bridge parameters can be configured.
  1. Enter the global configuration mode.
    device# configure terminal
  2. Enable 802.1W on a port-based VLAN or on an individual port.
    device(config)# vlan 10
    device(config-vlan-10)# spanning-tree 802-1w

    When configured on a port-based VLAN, changing the 802.1W state in a VLAN affects only that VLAN including all the ports specified in the VLAN.

    The spanning-tree 802-1w or spanning-tree single 802-1w command must be used to initially enable 802.1W on ports. Both commands enable 802.1W on all ports that belong to the VLAN or to the single spanning tree.

    Note: When you enable or disable 802.1W within a port-based VLAN, the setting overrides the global setting. Thus, you can enable 802.1W for the ports within a port-based VLAN even when 802.1W is globally disabled, or disable the ports within a port-based VLAN when 802.1W is globally enabled. If you change the 802.1W state of the LAG virtual interface in a LAG, the change affects all ports in that LAG.
  3. Change 802.1W bridge parameters by using the max-age, hello-time, and priority keywords.
    device(config-vlan-10)# spanning-tree 802-1w priority 0 hello-time 3 max-age 10
    The changes are applied to individual ports on the bridge. If you have configured a port-based VLAN on the device, you can configure the parameters only at the configuration level for individual VLANs.
  4. Change 802.1W port parameters by using the path-cost and priority commands.
    device(config-vlan-10)# spanning-tree 802-1w ethernet 1/1/1 path-cost 15 priority 64

The following example shows how to enable 802.1W RSTP on a port-based VLAN, VLAN-10. Bridge and port parameters are configured.

device# configure terminal
device(config)# vlan 10
device(config-vlan-10)# spanning-tree 802-1w
device(config-vlan-10)# spanning-tree 802-1w priority 0 hello-time 3 max-age 10
device(config-vlan-10)# spanning-tree 802-1w ethernet 1/1/1 path-cost 15 priority 64

The following example shows how to enable 802.1W RSTP port parameters on an individual port, Ethernet 1/1/1 and LAG 45 respectively.

device# configure terminal
device(config)# interface ethernet 1/1/1
device(config-if-e1000-1/1/1)#spanning-tree 802-1w admin-edge-port
device# configure terminal
device(config)# interface lag 45
device(config-lag-if-lg45)# spanning-tree 802-1w admin-pt2pt-mac