2.
Configure RSTP protection functions. For example, configure root protection on designated
ports of the root bridge.
Procedure
Step 1
Configure basic RSTP functions.
1.
Configure the RSTP mode for the devices on the ring network.
# Configure the RSTP mode on RouterA.
<Huawei>
system-view
[Huawei]
sysname RouterA
[RouterA]
stp mode rstp
# Configure the RSTP mode on SwitchA, SwitchB, SwitchC and SwitchD.
2.
Configure primary and secondary root bridges.
# Configure RouterA as the primary root bridge.
[RouterA]
stp root primary
# Configure SwitchA as a second root bridge according to the configuration guide of
SwitchA.
3.
Set a path cost for the port to be blocked.
NOTE
l
The path cost value range depends on path cost calculation methods. This example uses the
Huawei proprietary calculation method and sets the path cost to 200000.
l
All switching devices on a network must use the same path cost calculation method. To use other
path cost calculation methods, see the list of recommended value ranges for the specific path cost
calculation method.
# On RouterA, set the path cost calculation method to the Huawei proprietary method.
[RouterA]
stp pathcost-standard legacy
# On SwitchA, SwitchB, SwitchC and SwitchD, set the path cost calculation method to the
Huawei proprietary method according to the configuration guide of the switches.
# Set the path cost of Eth0/0/4 on SwitchC and SwitchD to 200000. (The detailed
configuration is not provided here.)
4.
Enable RSTP to eliminate loops.
l
Disable RSTP on the ports directly connected to PCs.
# Disable RSTP on the ports of SwitchC and SwitchD connected to PCs.
l
Enable RSTP globally.
# Enable RSTP globally on RouterA.
[RouterA]
stp enable
# Enable RSTP globally on other switching devices.
l
Enable RSTP on all the ports except those connected to PCs.
# Enable RSTP on RouterA Ethernet2/0/0 and Ethernet2/0/1.
[RouterA]
interface ethernet 2/0/0
[RouterA-Ethernet2/0/0]
stp enable
[RouterA-Ethernet2/0/0]
quit
[RouterA]
interface ethernet 2/0/1
[RouterA-Ethernet2/0/1]
stp enable
[RouterA-Ethernet2/0/1]
quit
Huawei AR530&AR550 Series Industrial Switch Routers
Configuration Guide - Ethernet Switching
6 STP/RSTP Configuration
Issue 01 (2014-11-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
218