How Spanning Tree Protocols Work
A BPDU exchange results in the following:
•
•
•
•
•
Calculating and Assigning Port Costs
By calculating and assigning the port cost of the switch ports, you can ensure that the shortest (lowest
cost) distance to the root switch is used to transmit data. You can calculate and assign lower path cost
values (port costs) to higher bandwidth ports by using either the short method (which is the default) or
the long method. The short method uses a 16-bit format that yields values from 1 to 65535. The long
method uses a 32-bit format that yields values in the range of 1 to 200,000,000. For more information
on setting the default cost mode, see the
page
Note
You should configure all switches in your network to use the same method for calculating port cost. The
short method is used to calculate the port cost unless you specify that the long method be used. You can
specify the calculation method using the CLI.
Calculating the Port Cost Using the Short Method
The IEEE 802.1D specification assigns 16-bit (short) default port cost values to each port that is based
on bandwidth. You can also manually assign port costs between 1–65535. The 16-bit values are only
used for ports that have not been specifically configured for port cost.
cost values that are assigned by the switch for each type of port when you use the short method to
calculate the port cost.
Table 7-1
Port Speed
10 Mbps
100 Mbps
1 Gbps
Software Configuration Guide—Catalyst 4000 Family, Catalyst 2948G, Catalyst 2980G, Releases 6.3 and 6.4
7-4
One switch is elected as the root switch.
The shortest distance to the root switch is calculated for each switch.
A designated switch is selected: the switch that is closest to the root switch through which frames
will be forwarded to the root.
A port for each switch is selected. This is the port that provides the best path from the switch to the
root switch.
Ports included in the STP are selected.
8-29.
Default Port Cost Values Using the Short Method
Default Cost Value
100
19
4
"Configuring the PVST+ Default Port Cost Mode" section on
Default Range
1 to 65535
1 to 65535
1 to 65535
Chapter 7
Configuring Spanning Tree
Table 8-1
shows the default port
78-12647-02