Note Regarding Pasting IEEE 802.1w Settings into the Running Configuration
If you paste IEEE 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 IEEE 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 4096 end
To avoid this issue, IEEE 802.1w commands or settings that are pasted into the configuration must be in the following order.
In the following configuration example, untagged ethernet port 2/1/1 is added to VLAN 120 before the IEEE 802.1w RSTP settings, and ethernet ports 1/1/1 and 1/1/2 are added after the IEEE 802.1w RSTP settings. When these commands are pasted into the running configuration, the ports will properly operate in IEEE 802.1w RSTP mode.
configure terminal vlan 120 untag ethernet 2/1/1 spanning-tree 802-1w spanning-tree 802-1w priority 4096 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. IEEE 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 IEEE 802.1w
| Link Speed | Recommended (Default) IEEE 802.1w Path Cost Values | Recommended IEEE 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 IEEE 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