Note Regarding Pasting 802.1W Settings into the Running Configuration

If you paste 802.1W settings into the running configuration, and the pasted configuration includes ports that are already up, the ports will initially operate in STP legacy mode before operating in 802.1W RSTP mode. For example, the following pasted configuration will cause ethernet ports 1/1/1 and 1/1/2 to temporarily operate in STP legacy mode, because these ports are already up and running.

configure terminal
vlan 120
tag ethernet 1/1/1 to 1/1/2
spanning-tree 802-1w
spanning-tree 802-1w priority 1001
end

To avoid this issue, 802.1W commands or settings that are pasted into the configuration must be in the following order.

  1. Ports that are not yet connected
  2. 802.1W RSTP settings
  3. Ports that are already up

In the following configuration example, untagged ethernet port 2/1/1 is added to VLAN 120 before the 802.1W RSTP settings, and ethernet ports 1/1/1 and 1/1/2 are added after the 802.1W RSTP settings. When these commands are pasted into the running configuration, the ports will properly operate in 802.1W RSTP mode.

configure terminal
vlan 120
untag ethernet 2/1/1
spanning-tree 802-1w
spanning-tree 802-1w priority 1001
tag ethernet 1/1/1 to 1/1/2
end

Path Cost Values

The path-cost value parameter specifies the cost of the port path to the root bridge. 802.1W prefers the path with the lowest cost. You can specify a value from 1 - 20,000,000. The following table shows the recommended path cost values from the IEEE standards.

Recommended Path Cost Values of 802.1W

Link Speed Recommended (Default) 802.1W Path Cost Values Recommended 802.1W Patch Cost Range
Less than 100 kilobits per second 200,000,000 20,000,000 – 200,000,000
1 Megabit per second 20,000,000 2,000,000 – 200,000,000
10 Megabits per second 2,000,000 200,000 – 200,000,000
100 Megabits per second 200,000 20,000 – 200,000,000
1 Gbps per second 20,000 2,000 – 200,000,000
10 Gbps per second 2,000 200 – 20,000
100 Gbps per second 200 20 – 2,000
1 Terabits per second 20 2 – 200
10 Terabits per second 2 1 – 20

For example, suppose you want to enable 802.1W on a system with no active port-based VLANs and change the hello-time from the default value of 2 to 8 seconds. Additionally, suppose you want to change the path and priority costs for ethernet port 1/1/5 only. To do so, enter the following commands.

device(config)# spanning-tree 802-1w hello-time 8 
device(config)# spanning-tree 802-1w ethernet 1/1/5 path-cost 15 priority 64