Configuring path costs of ports, Configuration example – H3C Technologies H3C S5120 Series Switches User Manual
Page 190

1-25
When calculating path cost for an aggregate port, 802.1d-1998 does not take into account the number
of member ports in its aggregation group as 802.1t does. The calculation formula of 802.1t is: Path Cost
= 200,000,000/link speed (in 100 kbps), where link speed is the sum of the link speed values of the
non-blocked ports in the aggregation group.
Configuring path costs of ports
Follow these steps to configure the path cost of ports:
To do...
Use the command...
Remarks
Enter system view
system-view
—
Enter Layer 2
Ethernet port view, or
Layer 2 aggregate
port view
interface interface-type
interface-number
Enter port
view or port
group view
Enter port group view
port-group manual
port-group-name
Required
Use either command.
Configure the path cost of the ports
stp
[ instance instance-id ]
cost cost
Required
By default, MSTP
automatically calculates
the path cost of each port.
z
If you change the standard that the device uses in calculating the default path cost, the port path
cost value set through the stp cost command will be invalid.
z
When the path cost of a port is changed, MSTP will re-calculate the role of the port and initiate a
state transition. If you use 0 as instance-id, you are setting the path cost of the CIST.
Configuration example
# Specify that the device use 802.1d-1998 when calculating the default path costs of its ports.
[Sysname] stp pathcost-standard dot1d-1998
# Set the path cost of GigabitEthernet 1/0/3 on MSTI 2 to 200.
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] stp instance 2 cost 200