77
Aggregate interface
containing 4 selected
ports
NOTE:
When calculating path cost for an aggregate interface, IEEE 802.1d-1998 does not take into account
the number of selected ports in its aggregation group as IEEE 802.1t does. The calculation formula of
IEEE 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 selected ports in the aggregation group.
Configuring path costs of ports
Follow these steps to configure the path cost of ports:
Enter interface
view or port
group view
Enter Ethernet interface
view or Layer 2
aggregate interface view
interface interface-type
interface-number
Required
Use either command.
port-group manual port-
group-name
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.
CAUTION:
When the path cost of a port changes, MSTP re-calculates the role of the port and initiates a state
transition.
Configuration example
# Specify that the device uses IEEE 802.1d-1998 to calculate the default path costs of its ports.
<Sysname> system-view
[Sysname] stp pathcost-standard dot1d-1998
# Set the path cost of GigabitEthernet 1/0/3 on MSTI 2 to 200.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] stp instance 2 cost 200
Configuring port priority
The priority of a port is an important factor in determining whether the port can be elected as the root
port of a device. If all other conditions are the same, the port with the highest priority will be elected as
the root port.