1-32
When calculating the path cost of an aggregated link, the 802.1D-1998 standard does not take the
number of the ports on the aggregated link into account, whereas the 802.1T standard does. The
following formula is used to calculate the path cost of an aggregated link:
Path cost = 200,000/ link transmission speed,
where ‘link transmission speed” is the sum of the speeds of all the unblocked ports on the aggregated
link measured in 100 Kbps.
Configure the path cost for specific ports
Follow these steps to configure the path cost for specified ports in system view:
To do… Use the command… Remarks
Enter system view System-view
Configure the path cost for
specified ports
stp interface interface-list
[ instance instance-id ] cost
cost
Required
An MSTP-enabled device can
calculate path costs for all its
ports automatically.
Follow these steps to configure the path cost for a port in Ethernet port view:
To do… Use the command… Remarks
Enter system view System-view
Enter Ethernet port view interface interface-type
interface-number
Configure the path cost for the
port
stp [ instance instance-id ]
cost cost
Required
An MSTP-enabled device can
calculate path costs for all its
ports automatically.
Changing the path cost of a port may change the role of the port and put it in state transition. Executing
the stp cost command with the instance-id argument being 0 sets the path cost on the CIST for the port.
Configuration example (A)
# Configure the path cost of GigabitEthernet 1/0/1 in spanning tree instance 1 to be 2,000.
1) Perform this configuration in system view
<device> system-view
[device] stp interface GigabitEthernet1/0/1 instance 1 cost 2000
2) Perform this configuration in Ethernet port view
<device> system-view
[device] interface GigabitEthernet1/0/1
[device-GigabitEthernet1/0/1] stp instance 1 cost 2000
Configuration example (B)
# Configure the path cost of GigabitEthernet 1/0/1 in spanning tree instance 1 to be calculated by the
MSTP-enabled device according to the IEEE 802.1D-1998 standard.
1) Perform this configuration in system view
<device> system-view
[device] undo stp interface GigabitEthernet1/0/1 instance 1 cost