R211x-HP Flexfabric 11900 Layer 2 - LAN Switching Configuration Guide
86
Step Command Remarks
3. Configure the path cost of the
ports.
• In STP/RSTP mode:
stp cost cost
• In MSTP mode:
stp [ instance instance-list ] cost cost
By default, the system
automatically calculates the
path cost of each port.
NOTE:
W
hen the path cost of a port chan
g
es, the system re-calculates the role of the port and initiates a state
transition.
Configuration example
# In MSTP mode, configure the device to calculate the default path costs of its ports by using IEEE
802.1d-1998, and set the path cost of Ten-GigabitEthernet 1/0/3 to 200 on MSTI 2.
<Sysname> system-view
[Sysname] stp pathcost-standard dot1d-1998
Cost of every port will be reset and automatically re-calculated after you change the
current pathcost standard. Continue?[Y/N]:y
Cost of every port has been re-calculated.
[Sysname] interface ten-gigabitethernet 1/0/3
[Sysname-Ten-GigabitEthernet1/0/3] stp instance 2 cost 200
Configuring the port priority
The priority of a port is a factor that determines 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 is elected as the root port.
On a spanning tree device, a port can have different priorities and play different roles in different
spanning trees, so that data of different VLANs can be propagated along different physical paths,
implementing per-VLAN load balancing. You can set port priority values based on the actual networking
requirements.
To configure the priority of a port:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Enter Layer 2 Ethernet or
aggregate interface view.
interface interface-type interface-number N/A
3. Configure the port priority.
• In STP/RSTP mode:
stp port priority priority
• In MSTP mode:
stp [ instance instance-list ] port priority
priority
The default setting is 128
for all ports.
NOTE:
W
hen the priority of a port chan
g
es, the system re-calculates the port role and initiates a state transition.










