stp port priority

Function

The stp port priority command sets a priority for a port on a spanning tree.

The undo stp port priority command restores the default priority.

By default, the priority of a port on a spanning tree is 128.

Format

stp [ process process-id ] [ instance instance-id ] port priority priority

undo stp [ process process-id ] [ instance instance-id ] port priority

Parameters

Parameter Description Value
process process-id

Indicates the ID of a Multiple Spanning Tree Protocol (MSTP) process.

If this parameter is not specified, the priority of a port in process 0 is displayed.

The value is an integer ranging from 1 to 256.

instance instance-id

Specifies the ID of a spanning tree instance.

If this parameter is not specified, statistics about the topology changes of a Common and Internal Spanning Tree (CIST) are displayed.

The value is an integer ranging from 0 to 4094, Value 0 indicates CIST.

priority

Specifies the priority of a port used in spanning tree calculation.

The value ranges from 0 to 240 and is an integer multiple of 16, such as, 0, 16, and 32.

Views

100GE interface view, 10GE interface view, 25GE interface view, 400GE interface view, 40GE interface view, 50GE interface view, Eth-Trunk interface view, GE optical interface view, GE electrical interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
mstp write

Usage Guidelines

Usage Scenario

When ports participate in spanning tree calculation, the port IDs (PIDs) of these ports on 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.

To change the priority of a port, run the stp port priority command. This affects the PID of the port and determines whether the port can be elected as the designated port.

Configuration Impact

When the priority of a port changes, a spanning tree protocol recalculates the role of the port and causes the port status change.

Precautions

The port priority determines a port role in a specified spanning tree instance and process. You can set different priorities for a port in different spanning tree instances or processes so that user traffic can be forwarded along different links and traffic load balancing can be implemented.

Example

# Set the priority of interface Eth-Trunk1 to 16 in spanning tree instance 2.
<HUAWEI> system-view
[~HUAWEI] interface eth-trunk 1
[~HUAWEI-Eth-Trunk1] portswitch
[*HUAWEI-Eth-Trunk1] stp instance 2 port priority 16
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >