1-32
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.
On an MSTP-enabled device, a port can have different priorities in different MSTIs, and the same port
can play different roles in different MSTIs, so that data of different VLANs can be propagated along
different physical paths, thus implementing per-VLAN load balancing. You can set port priority values
based on the actual networking requirements.
Configuration procedure
Follow these steps to configure the priority of a port or a group of ports:
To do...
Use the command...
Remarks
Enter system view
system-view
—
Enter Ethernet
interface view, or
Layer-2 aggregate
interface view
interface interface-type
interface-number
Enter
interface view
or port group
view
Enter port group
view
port-group manual
port-group-name
Required
Use either command.
Configurations made in
interface view will take effect on
the current port only;
configurations made in port
group view will take effect on all
ports in the port group.
Configure a priority for the port(s)
stp
[
instance
instance-id
]
port priority
priority
Optional
128 for all Ethernet ports by
default.
z
When the priority of a port is changed, MSTP will re-calculate the role of the port and initiate a state
transition.
z
Generally, a lower configured value indicates a higher priority. If you configure the same priority
value for all the ports on a device, the specific priority of a port depends on the index number of the
port. Changing the priority of a port triggers a new spanning tree calculation process.
Configuration example
# Set the priority of port GigabitEthernet 1/0/1 to 16 in MSTI 1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] stp instance 1 port priority 16
Setting the Link Type of a Port to P2P
Refer to
Setting the Link Type of a Port to P2P
in the section about root bridge configuration.