stp port priority (VSI-LDP-PW view)

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 ] port priority priority

undo stp [ process process-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.

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

VSI-LDP-PW 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.

The configured port priority takes effect only for MSTP instance 0.

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 pw1 to 16 in spanning tree instance 2.
<HUAWEI> system-view
[~HUAWEI] mpls
[*HUAWEI-mpls] quit
[*HUAWEI] mpls l2vpn
[*HUAWEI-l2vpn] quit
[*HUAWEI] vsi 1
[*HUAWEI-vsi-1] pwsignal ldp
[*HUAWEI-vsi-1-ldp] vsi-id 33
[*HUAWEI-vsi-1-ldp] peer 1.1.1.1
[*HUAWEI-vsi-1-ldp] peer 1.1.1.1 pw pw1
[*HUAWEI-vsi-1-ldp-pw-pw1] quit
[*HUAWEI-vsi-1-ldp] pw pw1
[*HUAWEI-vsi-1-ldp-pw-pw1] stp priority 16
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >