stp (VSI-LDP-PW view)

Function

The stp enable command enables STP/Rapid Spanning Tree Protocol (RSTP)/Multiple Spanning Tree Protocol (MSTP) on a device or an interface.

The undo stp enable command cancels the stp enable command configuration.

The stp disable command disables STP/RSTP/MSTP on a device or an interface.

The undo stp disable command cancels the stp disable command configuration.

By default, STP/RSTP/MSTP is enabled on a Layer 2 interface.

Format

stp { enable | disable }

undo stp { enable | disable }

Parameters

None

Views

VSI-LDP-PW view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
mstp write

Usage Guidelines

Usage Scenario

  • On a complex Layer 2 network, STP/RSTP/MSTP can be configured on devices to prevent or break loops.
  • To enable STP/RSTP/MSTP, run the stp enable command. The devices running STP/RSTP/MSTP exchange information to discover loops on the network and block some interfaces to trim the ring topology into a loop-free tree topology. This prevents packet replication and circular propagation and device performance deterioration.
  • Spanning tree calculation consumes system resources. Therefore, run the stp disable command to disable STP/RSTP/MSTP on devices or interfaces that do not need to participate in spanning tree calculation.

Configuration Impact

If STP/RSTP/MSTP is enabled on an interface, the interface participates in spanning tree calculation, and its forwarding state is determined based the calculation result.

If STP/RSTP/MSTP is disabled on an interface, the interface does not participate in spanning tree calculation and is always in the forwarding state.

Precautions

  • STP/RSTP/MSTP must be enabled on all interfaces that participate in spanning tree calculation. Otherwise, a loop may occur.
  • If STP and VPLS multi-homing (VPLS multi-homing enables data packets to be blocked on the backup PE's AC interface, preventing loops) have been deployed, the AC interfaces of both the master and backup PEs may be blocked because the backup PE's AC interface does not block Layer 2 protocol packets.
  • In an STP over VPLS scenario, root protection needs to be configured on the AC interface of the device where STP access to VPLS is configured. This prevents the PW interface from being unexpectedly blocked due to a large cost value.
  • In an STP over PW scenario, run the track admin-vsi command to bind a service VSI to a specified mVSI to prevent loops in a service VSI.

Example

# Enable pw1 STP/RSTP/MSTP.
<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 enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >