Data Preparation
To complete the configuration, you need the following data.
l
Ethernet interface number: as shown in
l
Primary root bridge: RouterA
l
Secondary root bridge: SwitchA
l
Path cost of the interface to be blocked: 200000
Procedure
Step 1
Configure basic STP functions.
1.
Configure the STP mode for the devices on the ring network.
# Configure the STP mode on RouterA.
<Huawei>
system-view
[Huawei]
sysname RouterA
[RouterA]
stp mode stp
# Configure the STP mode on SwitchA, SwitchB, SwitchC and SwitchD.
NOTE
l
Huawei 2300 Series Switch is used in this example. If other types of switches are used, refer to
the documentation of the switches.
2.
Configure primary and secondary root bridges.
# Configure RouterA as the primary root bridge.
[RouterA]
stp root primary
# Configure SwitchA as the secondary root bridge.
3.
Set path costs for ports in each spanning tree to block certain ports.
NOTE
l
The values of path costs depend on path cost calculation methods. This example uses the Huawei
proprietary calculation method and sets the path cost to 200000.
l
If the switches are not Huawei 2300 Series, all switches on a network must use the same path
cost calculation method. Refer to STP List of path costs to get standard of other calculation
methods.
# On RouterA, configure the path cost calculation method as the Huawei proprietary
method.
[RouterA]
stp pathcost-standard legacy
# On SwitchA, SwitchB, SwitchC and SwitchD, configure the path cost calculation method
as the Huawei proprietary method.
# As shown in
, set the path cost of Eth0/0/4 on SwitchC and SwitchD to 200000.
4.
Enable STP to eliminate loops.
l
Disable STP on interfaces connected to PCs.
# Disable STP on interfaces connected to terminals for SwitchC and SwitchD.
l
Enable STP globally.
# Enable STP globally on RouterA.
[RouterA]
stp enable
# Enable STP globally on other switching devices.
l
Enable STP on all the interfaces except the interfaces connected to terminals.
Huawei AR3200 Series Enterprise Routers
Configuration Guide - LAN
7 STP/RSTP Configuration
Issue 02 (2012-03-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
210