stp port priority
Function
The stp port priority command sets the priority of a port in a spanning tree.
The undo stp port priority command restores the default priority.
By default, the priority of a port in a spanning tree is 128.
Format
stp [ instance instance-id ] port priority priority
undo stp [ instance instance-id ] port priority
Parameters
Parameter | Description | Value |
---|---|---|
instance instance-id | Specifies the spanning tree instance. If this parameter is not specified, the statistics about the topology changes of a CIST are displayed. |
The value is an integer ranging from 0 to 4094. Value 0 refers to CIST. |
priority | Specifies the priority of a port. | The priority ranks from 0 to 240 in descending order. The value is an integer multiple of 16, such as, 0, 16, and 32. |
Usage Guidelines
Usage Scenario
When ports participate in spanning tree calculation, the PIDs of these ports on switching devices may affect the designated port election result. During spanning tree calculation, the port with the smallest PID is elected as the designated port.
A PID is the ID of a port, and consists of a 4-bit priority and a 12-bit port number.
The stp port priority command can be used to change the priority of a port. This affects the PID of the port and determines whether the port can be elected as the designated port.
Precautions
When the priority of a port changes, a spanning tree protocol recalculates the role of the port and performs status transition for the port.
The priority of a port determines the role of the port in a specified spanning tree instance. You can set different priorities for a port in different spanning tree instances so that user traffic can be forwarded along different links and traffic load balancing can be implemented.