Upload
jose-benitez
View
233
Download
1
Embed Size (px)
Citation preview
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
1/23
ODL010005
STP/RSTP/MSTP Laboratory Exercise
Guide
ISSUE 1.0
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
2/23
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
3/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0 Table of Contents
Confidential Information of Huawei. No Spreading without Permission i
Table of Contents
Experiment Description ....................................................................................................................1
Experiment Description ................................................................................................................1Version Introduction .....................................................................................................................1Experiment Objectives .................................................................................................................1Experiment Tasks ........................................................................................................................1Relevant Materials .......................................................................................................................1
Chapter 1 STP/RSTP Configuration .................................................................................................21.1 Networking and Service Description ......................................................................................21.2 Command Line List ................................................................................................................21.3 Configuration procedure ........................................................................................................31.4 Result Verification ..................................................................................................................3
1.4.1 Computation Process of Spanning Tree .....................................................................31.4.2 Port state switching .....................................................................................................91.4.3 Two Work Modes of RSTP ....................................................................................... 111.4.4 Other Configuration .................................................................................................. 121.5 FAQ ..................................................................................................................................... 13
1.6 Configuration Reference ..................................................................................................... 131.6.1 Starting up RSTP ..................................................................................................... 131.6.2 Check the Configured STP Information ................................................................... 131.6.3 Check the Received/Transmitted BPDU Message of Port After the Port StateTransition ........................................................................................................................... 131.6.4 Set the STP-Compatible Mode ................................................................................ 13
Chapter 2 MSTP Configuration ..................................................................................................... 142.1 Networking and Service Description ................................................................................... 142.2 Command Line List ............................................................................................................. 142.3 Configuration flow ............................................................................................................... 152.4 Configuration procedure ..................................................................................................... 152.5 Result Verification ............................................................................................................... 152.6 Configuration Reference ..................................................................................................... 17
2.6.1 Configure Vlan ......................................................................................................... 172.6.2 Starting up MSTP ..................................................................................................... 182.6.3 Configure MST ......................................................................................................... 182.6.4 Active region configuration ....................................................................................... 19
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
4/23
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
5/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission 1
Experiment Description
Experiment Description
This course introduces the computation process and basic principles of STP in detailin terms of technical theory and operation procedure. This experiment topic describesthe currently prevalent multi-switch for implementing the redundant LAN structure.
Version Introduction
This course corresponds to the product versions: VRP Version 3.10
Experiment Objectives
After completing the hands-on experiment of this course, you will be able to:
Grasp the STP computation process Understand the port state switching Understand the two work modes of RSTP protocol Understand the principle of MSTP protocol
Experiment Tasks
STP/RSTP Computation process and Port state switching. MSTP configuration.
Relevant Materials
Relevant Huawei product operation manuals
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
6/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission2
Chapter 1 STP/RSTP Configuration
1.1 Networking and Service Description
SS
SS SSSwitchA
SwitchB
SwitchC
E0/1
E0/1
E0/3 E0/3
E0/2
E0/2
SS
SS SSSwitchA
SwitchB
SwitchC
E0/1
E0/1
E0/3 E0/3
E0/2
E0/2
Figure 1-1
3 Quidway S3526E switches; 1 PC, 3 standard network cables, and 1 console cable
1.2 Command Line List The configuration commands in the system view are:
Operation Command
Start/shut down the device RSTP stp { enable |disable }Configure the switch that runs RSTP to work in theSTP compatible mode or the RSTP mode
stp mode { stp | rstp }
Configure the BPDU protection function of the switch stp bpdu-protection
Configure the Bridge preference level of the specificswitch
stp priority bridge-priority
Specify the switch as the root switch of spanning tree stp root primary
Specify the switch as backup root switch of spanningtree
stp root secondary
Configure Forward Delay of the specific switch stp timer forward-delay centisecondsConfigure Hello Time of the specific switch stp timer hello centiseconds
Configure Max Age of the specific switch stp timer max-age centiseconds
Configure the timeout factor of the specific switch stp timeout-factornumber
Configuration commands in the port view:
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
7/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission 3
Operation Command
Set Path Cost of the Specific Port stp cost costEnable RSTP on the specified port stp enable
Disable RSTP on the specified port stp disable
Configure the specific port as an edge port/non edge
port
stp edged-port { enable | disable }
Configure the loop protection function of the switch stp loop-protection
Set mCheck of the specified port stp mcheck { primary | secondary
Set Whether the Specific Port Is Connected toPoint-to-Point Link
stp point-to-point { auto |force-false | force-true }
Set Priority of the Specific Port stp port priorityport-priority
Configure the Root protection function of the switch stp root-protection
Set the Maximum Transmission Limit for the SpecificPort
stp transmit-limitpacketnum
Display and Debug STP
Operation Command
Display RSTP configuration information aboutthe local switch and the specified ports display stp [ interfaceinterface-list]
Turn on RSTP debugging switch (receiving andtransmitting of packet, event, and error)
[ undo ] debugging stp { error| event |packet | all }
Enable the debugging information to be output atthe terminal
terminal debugging
1.3 Configuration procedure
Task 1: Computation process of spanning tree
Run stp enable in the system-view.
Task 2: Port state switching
Disconnect Switch B from Switch C, and observe the change of the Switch C portstate
Task 3: Two work modes of RSTP
Run stp mode { rstp | stp } in system-view.
Task 4: Other optional configuration
Use commands to change key parameters of STP
1.4 Result Verification
1.4.1 Computation Process of Spanning Tree
As shown in the above figure, 3 Quidway S-series LANSwitches are connected in aring shape. The MAC addresses of the 3 switches are:
Switch A:00e0-fc22-6fda
Switch B:00e0-fc17-c484
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
8/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission4
Switch C:00e0-fc26-437c
After the connection is completed, the switch indicator will flash quickly. It indicatesthat the 3 switches forward packets to each other, thus forming a loop. You can STPprotocol to avoid loop.
STP is the abbreviation of Spanning Tree Protocol. This protocol can be used for loop
network. It can trim the loop network into tree-shape network without loops byinterdicting some redundancy paths via certain algorithm, so as to avoid theincrement and endless cycling of packets in the loop network.
The RSTP (Rapid STP) realized by Quidway Ethernet switch is the optimized versionof STP. The "Rapid" is shown in the way that the delay when the root port anddesignated port enter Forwarding status will be reduced greatly, therefore, the timeneed for stabilizing the network topology will be reduced.
On the Quidway Lanswitch, start the STP protocol. The commands are as follows:
[SwitchA] stp enable
[SwitchB] stp enable
[SwitchC] stp enable
After the RSTP protocol is configured in the whole network, each port of the switchenables the RSTP protocol by default. The switch indicator does not flash quickly anylonger. It indicates that the switch has established the loop-free forwarding spanningtree. What does this tree look like? We can analyze theoretically first, and verify ouranalysis results through the state information of the switch.
The process of the implementing the spanning tree algorithm is as follows:
1) Initial status
Initially, each port of each switch generates a configuration message, using the switchitself as root. The root path overhead is 0, the specified switch ID is the ID of thisswitch, and the specified port is this port.
Switch A:
Configuration message of port Ethernet 0/1:
{32768. 00e0-fc22-6fda,0,32768.00e0-fc22-6fda,e0/1}
Configuration message of port Ethernet 0/3:
{32768. 00e0-fc22-6fda,0,32768.00e0-fc22-6fda,e0/3}
Switch B:
Configuration message of port Ethernet 0/1:
{32768.00e0-fc17-c484,0,32768.00e0-fc17-c484,e0/1}
Configuration message of port Ethernet 0/2:
{32768.00e0-fc17-c484,0,32768.00e0-fc17-c484,e0/2} Switch C:
Configuration message of port Ethernet 0/2:
{32768.00e0-fc26-437c,0,32768.00e0-fc26-437c,e0/2}
Configuration message of port Ethernet 0/3:
{32768.00e0-fc26-437c,0,32768.00e0-fc26-437c,e0/3}
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
9/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission 5
2) Select the best configuration message, and determine the root switch
Each switch sends its configuration message to the outside. When the port receives aconfiguration message with a preference level lower than that of the port itself, theswitch will discard the received configuration message, and do not process theconfiguration message of this port. When the port receives a configuration messagewith a preference level higher than that of the port itself, the switch will replace thecontents of the configuration message with the received configuration message, thenthe Lanswitch will compare the configuration message of this port with theconfiguration message of other ports, and select the best configuration message.
According to the comparison principle, the IDs of the switches are compared first. TheID of the switch is composed of the preference level (default value: 32768) and theMAC address of the switch. Initially, the preference level of the switch is the defaultvalue, and the one with the lowest MAC value is the root. Obviously, the root switchshould be Switch B.
Use the following commands to view the configured STP information.
[SwitchA]display stp
Protocol mode: IEEE RSTP
The bridge ID (Pri.MAC): 32768.00e0-fc22-6fda
The bridge times: Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
Root bridge ID(Pri.MAC): 32768.00e0-fc17-c484
Root path cost: 200
Bridge bpdu-protection: disabled
Timeout factor: 3
[SwitchB]display stp
Protocol mode: IEEE RSTP
The bridge ID (Pri.MAC): 32768.00e0-fc17-c484
The bridge times: Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
Root bridge ID(Pri.MAC): 32768.00e0-fc17-c484
Root path cost: 0
Bridge bpdu-protection: disabled
Timeout factor: 3
[SwitchC]display stp
Protocol mode: IEEE RSTP
The bridge ID (Pri.MAC): 32768.00e0-fc26-437c
The bridge times: Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
Root bridge ID(Pri.MAC): 32768.00e0-fc17-c484
Root path cost: 200
Bridge bpdu-protection: disabled
Timeout factor: 3
We can see that 3 switches present the following information:
Root bridge ID(Pri.MAC): 32768.00e0-fc17-c484.
Therefore, the root switch is 00e0-fc17-c484, namely, Switch B. The defaultpreference level of the root switch is 32768 (default value, configurable).
3) Then determine the root port, block the redundancy link, and update theconfiguration information of the specified port.
The switch port that receives the preferred configuration message is the root port.The port configuration message will not change. In other ports, if the configurationmessage of a port is updated in the Select the preferred configuration messageprocess, the switch will block this port, and the port configuration message remainsunchanged. This port will not forward data any longer, and will only receive but notsend configuration messages. If the configuration message of a port is not updated inthe Select the preferred configuration message process, the switch will determine itas specified port, and the configuration message will change in this way: The tree rootID is replaced by the tree root ID of the root port; the root path overhead is replaced
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
10/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission6
by the root path overhead of configuration message plus the corresponding pathoverhead of root port; the specified switch ID is replaced by the ID of its own switch;and the specified port ID is replaced by the ID of its own port.
In this example, the comparison process of all switches is as follows:
Switch A:
Port Ethernet 0/1 receives the configuration message of Switch B, and Switch Adiscovers that the configuration message preference level of this port is lower thanthe preference level of the received configuration message. Therefore, theconfiguration message of Ethernet 0/1 of this port is updated.
Port Ethernet 0/3 receives the configuration message of Switch C, and Switch Adiscovers that the configuration message preference level of this port is higher thanthe preference level of the received configuration message. Therefore, the receivedconfiguration message is discarded.
Now, the configuration messages of the ports are as follows:
Configuration message of port Ethernet 0/1:
{32768.00e0-fc17-c484,200,32768.00e0-fc17-c484,e0/1}
Configuration message of port Ethernet 0/3:
{32768.00e0-fc22-6fda, 0,32768.00e0-fc22-6fda,e0/3}
Switch A compares the configuration message of each port, selects the configurationmessage of port Ethernet 0/1 as the preferred configuration message, thendetermines port Ethernet 0/1 as the root port. The configuration messages of all portsof the whole switch are updated as follows:
The configuration message of the root port Ethernet 0/1 remains unchanged:{32768.00e0-fc17-c484,200,32768.00e0-fc17-c484,e0/1}. In the configurationmessage of port Ethernet 0/3, the tree root ID is updated to the tree root ID of thepreferred configuration message. The root path overhead is updated to 200, and theID of the specified switch is updated to the ID of this switch, and the ID of thespecified port is updated to the ID of this port. The configuration message is changedto: {32768.00e0-fc17-c484,200,32768.00e0-fc22-6fda,e0/3}. Then the specified portof Switch A sends out its own configuration message periodically.
[SwitchA]display stp interface ethernet0/1 ethernet0/3
Protocol mode: IEEE RSTP
The bridge ID (Pri.MAC): 32768.00e0-fc22-6fda
The bridge times: Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
Root bridge ID(Pri.MAC): 32768.00e0-fc17-c484Root path cost: 200Bridge bpdu-protection: disabled
Timeout factor: 3
Port 1 (Ethernet0/1) of bridge is ForwardingPort spanning tree protocol: enabled
Port role: Root Port
Port path cost: 200
Port priority: 128
Designated bridge ID(Pri.MAC): 32768.00e0-fc17-c484The Port is a non-edged port
Connected to a point-to-point LAN segment
Maximum transmission limit is 3 Packets / hello time
Times: Hello Time 2 sec, Max Age 20 sec
Forward Delay 15, Message Age 0
BPDU sent: 4
TCN: 0, RST: 4, Config BPDU: 0
BPDU received: 458
TCN: 0, RST: 458, Config BPDU: 0
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
11/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission 7
Port 3 (Ethernet0/3) of bridge is ForwardingPort spanning tree protocol: enabled
Port role: Designated Port
Port path cost: 200
Port priority: 128
Designated bridge ID(Pri.MAC): 32768.00e0-fc22-6fdaThe Port is a non-edged port
Connected to a point-to-point LAN segment
Maximum transmission limit is 3 Packets / hello time
Times: Hello Time 2 sec, Max Age 20 sec
Forward Delay 15, Message Age 1
BPDU sent: 563
TCN: 0, RST: 563, Config BPDU: 0
BPDU received: 5
TCN: 0, RST: 5, Config BPDU: 0
Switch B:
Port Ethernet 0/1 receives the configuration message of Switch A. Switch B discoversthat the preference level of the configuration message of this port is higher than thatof the received configuration message, so discards the received configurationmessage. The configuration message of port Ethernet 0/2 is similar to port Ethernet0/1. Switch B discovers that the tree root in the configuration message of each portand the specified switch are switch B itself, so deems itself as tree root. Theconfiguration messages of all ports remain unchanged. Afterwards, the configurationmessages are sent out periodically. Now, the configuration messages of the two portsare as follows:
Configuration message of port Ethernet 0/1:{32768.00e0-fc17-c484,0,32768.00e0-fc17- c484,e0/1}
Configuration message of port Ethernet 0/2:{32768.00e0-fc17-c484,0,32768.00e0-fc17- c484,e0/2}
[SwitchB]display stp interface ethernet0/1 ethernet0/2
Protocol mode: IEEE RSTP
The bridge ID (Pri.MAC): 32768.00e0-fc17-c484
The bridge times: Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
Root bridge ID(Pri.MAC): 32768.00e0-fc17-c484Root path cost: 0
Bridge bpdu-protection: disabledTimeout factor: 3
Port 1 (Ethernet0/1) of bridge is ForwardingPort spanning tree protocol: enabled
Port role: Designated Port
Port path cost: 200
Port priority: 128
Designated bridge ID(Pri.MAC): 32768.00e0-fc17-c484
The Port is a non-edged port
Connected to a point-to-point LAN segment
Maximum transmission limit is 3 Packets / hello time
Times: Hello Time 2 sec, Max Age 20 sec
Forward Delay 15, Message Age 0
BPDU sent: 719
TCN: 0, RST: 719, Config BPDU: 0
BPDU received: 6
TCN: 0, RST: 6, Config BPDU: 0
Port 2 (Ethernet0/2) of bridge is ForwardingPort spanning tree protocol: enabled
Port role: Designated Port
Port path cost: 200
Port priority: 128
Designated bridge ID(Pri.MAC): 32768.00e0-fc17-c484
The Port is a non-edged port
Connected to a point-to-point LAN segment
Maximum transmission limit is 3 Packets / hello time
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
12/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission8
Times: Hello Time 2 sec, Max Age 20 sec
Forward Delay 15, Message Age 0
BPDU sent: 790
TCN: 0, RST: 790, Config BPDU: 0
BPDU received: 3
TCN: 0, RST: 3, Config BPDU: 0
Switch C:
Port Ethernet 0/2 receives the configuration message of Switch B, and Switch Cdiscovers that the configuration message preference level of this port is lower thanthe preference level of the received configuration message. Therefore, theconfiguration message of Ethernet 0/2 of this port is updated.
Port Ethernet 0/3 receives the configuration message of Switch A, and Switch Cdiscovers that the configuration message preference level of this port is lower thanthe preference level of the received configuration message. Therefore, theconfiguration message of Ethernet 0/3 of this port is updated.
Now, the configuration messages of the ports are as follows:
Configuration message of port Ethernet 0/2:
{32768.00e0-fc17-c484,200,32768.00e0-fc17-c484,e0/2}
Configuration message of port Ethernet 0/3:
{32768.00e0-fc17-c484,400,32768.00e0-fc22-6fda,e0/3}
Switch C compares the configuration message of each port, selects the configurationmessage of port Ethernet 0/2 as the preferred configuration message, thendetermines port Ethernet 0/2 as the root port. The configuration messages of all portsof the whole switch are updated as follows:
The configuration message of root port Ethernet 0/2 remains unchanged, and the portEthernet 0/3 may be blocked. The port configuration message also remainsunchanged, and this port does not receive the data forwarded from switch A(exclusive of protocol packets of STP) until new conditions occur and trigger the
recalculation of spanning tree, e.g., the link from switch B to switch C breaks down, orthe port receives a preferred configuration message.
[SwitchC]display stp interface ethernet0/2 ethernet0/3
Protocol mode: IEEE RSTP
The bridge ID (Pri.MAC): 32768.00e0-fc26-437c
The bridge times: Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
Root bridge ID(Pri.MAC): 32768.00e0-fc17-c484Root path cost: 200Bridge bpdu-protection: disabled
Timeout factor: 3
Port 2 (Ethernet0/2) of bridge is ForwardingPort spanning tree protocol: enabled
Port role: Root Port
Port path cost: 200
Port priority: 128
Designated bridge ID(Pri.MAC): 32768.00e0-fc17-c484The Port is a non-edged port
Connected to a point-to-point LAN segment
Maximum transmission limit is 3 Packets / hello time
Times: Hello Time 2 sec, Max Age 20 sec
Forward Delay 15, Message Age 0
BPDU sent: 8
TCN: 0, RST: 8, Config BPDU: 0
BPDU received: 1382
TCN: 0, RST: 1382, Config BPDU: 0
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
13/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission 9
Port 3 (Ethernet0/3) of bridge is DiscardingPort spanning tree protocol: enabled
Port role: Alternate Port
Port path cost: 200
Port priority: 128
Designated bridge ID(Pri.MAC): 32768.00e0-fc22-6fdaThe Port is a non-edged port
Connected to a point-to-point LAN segment
Maximum transmission limit is 3 Packets / hello time
Times: Hello Time 2 sec, Max Age 20 sec
Forward Delay 15, Message Age 1
BPDU sent: 8
TCN: 0, RST: 8, Config BPDU: 0
BPDU received: 1447
TCN: 0, RST: 1447, Config BPDU: 0
The spanning tree is now determined, and the tree root is switch B. The tree isillustrated below:
SS
SS SSSwitchA
SwitchB
SwitchC
E0/1
E0/1
E0/3 E0/3
E0/2
E0/2
SS
SS SSSwitchA
SwitchB
SwitchC
E0/1
E0/1
E0/3 E0/3
E0/2
E0/2
Figure 1-2
1.4.2 Port state switching
As shown in the above figure, when the spanning tree is in the stable state,ethernet0/2 of switch C is in the forwarding state, receives the BPDU messagenormally, and receives/sends packets normally. ethernet0/3 is in the discarding state,receives BPDU messages normally, but cannot receive or send packets. Listed beloware capabilities of relevant ports in receiving/sending BPDU messages.
debugging stp packet
terminal debugging% Current terminal debugging is on
Port3: Received Packet //The port in the Discarding state receives theBPDU message normally
*0.10511380 SwitchC RSTP/8/PACKET:
Protocol Identifier: 0000
Protocol Version ID: 02
BPDU Type: 02
Flags: 2e
Root Identifier: 80.00.00.e0.fc.17.c4.84
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
14/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission10
Root Path Cost: 00c8
Bridge Identifier: 80.00.00.e0.fc.22.6f.daPort Identifier: 80.03
Message Age: 0100
Max Age: 1400
Hello Time: 0200
Forward Delay: 0f00
Version 1 Length: 00
*0.10512487 SwitchC RSTP/8/PACKET:
Port2: Received Packet //The port in the Forwarding state receives BPDUmessage normally.*0.10646778 SwitchC RSTP/8/PACKET:
Protocol Identifier: 0000
Protocol Version ID: 02
BPDU Type: 02
Flags: 2c
Root Identifier: 80.00.00.e0.fc.17.c4.84Root Path Cost: 0000
Bridge Identifier: 80.00.00.e0.fc.17.c4.84
Port Identifier: 80.02
Message Age: 0000
Max Age: 1400
Hello Time: 0200
Forward Delay: 0f00
Version 1 Length: 00
*0.10647379 SwitchC RSTP/8/PACKET:
Now, Switch B is disconnected from Switch C. This way, the ethernet0/2 port of switchC will not break down. The port ethernet0/3 will change from the Discarding state tothe Forwarding state, and undertake the data receiving/sending.
The RSTP (Rapid STP) realized by Quidway Ethernet switch is the optimized versionof STP. The "Rapid" is shown in the way that the delay when the root port anddesignated port enter Forwarding status will be reduced greatly, therefore, the timeneed for stabilizing the network topology will be reduced.
Preconditions of fast transition of root port state are: Old ports on this switch havestopped forwarding data, and the upstream specified port has begun forwarding data.
The ethernet0/2 port of switch C stops forwarding data, and the ethernet0/3 of theupstream specified port switch A has been in the forwarding state, and meets theconditions of fast forwarding. Port ethernet0/3 of switch C will transition to theforwarding state quickly. The debugging information is as follows:
debugging stp packet
terminal debugging
Port3: Received Packet*0.11009688 SwitchC RSTP/8/PACKET:
Protocol Identifier: 0000
Protocol Version ID: 02
BPDU Type: 02
Flags: 2c
Root Identifier: 80.00.00.e0.fc.17.c4.84
Root Path Cost: 00c8
Bridge Identifier: 80.00.00.e0.fc.22.6f.da
Port Identifier: 80.03Message Age: 0100
Max Age: 1400
Hello Time: 0200
Forward Delay: 0f00
Version 1 Length: 00
*0.11011618 SwitchC RSTP/8/PACKET:
The port display information of switch C is as follows:
display stp interface ethernet0/2 ethernet0/3
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
15/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission 11
Protocol mode: IEEE RSTP
The bridge ID (Pri.MAC): 32768.00e0-fc26-437c
The bridge times: Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
Root bridge ID(Pri.MAC): 32768.00e0-fc17-c484
Root path cost: 400
Bridge bpdu-protection: disabled
Timeout factor: 3
Port 2 (Ethernet0/2) of bridge is DOWN //This port is disconnected
Port spanning tree protocol: enabled
Port role: Disabled Port
Port path cost: 200000
Port priority: 128
Designated bridge ID(Pri.MAC): 32768.00e0-fc26-437c
The Port is a non-edged port
Connected to a point-to-point LAN segment
Maximum transmission limit is 3 Packets / hello time
Times: Hello Time 2 sec, Max Age 20 sec
Forward Delay 15, Message Age 1
BPDU sent: 8
TCN: 0, RST: 8, Config BPDU: 0
BPDU received: 5166
TCN: 0, RST: 5166, Config BPDU: 0
Port 3 (Ethernet0/3) of bridge is Forwarding //Change to Forwarding state
Port spanning tree protocol: enabled
Port role: Root Port
Port path cost: 200
Port priority: 128
Designated bridge ID(Pri.MAC): 32768.00e0-fc22-6fda
The Port is a non-edged port
Connected to a point-to-point LAN segment
Maximum transmission limit is 3 Packets / hello time
Times: Hello Time 2 sec, Max Age 20 sec
Forward Delay 15, Message Age 1
BPDU sent: 9
TCN: 0, RST: 9, Config BPDU: 0
BPDU received: 5343
TCN: 0, RST: 5343, Config BPDU: 0
Connect switch B with switch C again, and port ethernet0/2 of switch C will changethe forwarding state again, and the port ethernet0/3 of switch C will be blocked again.
1.4.3 Two Work Modes of RSTP
The RSTP (Rapid STP) realized by Quidway Ethernet switch is the optimized versionof STP. The work modes of RSTP include two types: RSTP mode, andSTP-compatible mode. By default, the RSTP works in the RSTP mode. If all devicesin the network run the RSTP, the switch that runs the RSTP will work in the RSTPmode. If some devices run STP and others run RSTP in the network, it isrecommended to set the switch of RSTP to work in the STP-compatible mode.
Modify the configuration of switch C, and make it work in the STP-compatible mode.The command is:
[SwitchC]stp mode stp
Display the port information of switch C. Verify the interworking between the STPwork mode and the RSTP work mode.
Check the STP information:
[SwitchC]display stp interface ethernet0/2 ethernet0/3
Protocol mode: IEEE compatible STP //Work in the STP modeThe bridge ID (Pri.MAC): 32768.00e0-fc26-437c
The bridge times: Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
16/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission12
Root bridge ID(Pri.MAC): 32768.00e0-fc17-c484 //The root switch is stillSwitchBRoot path cost: 400
Bridge bpdu-protection: disabled
Timeout factor: 3
Port 2 (Ethernet0/2) of bridge is ForwardingPort spanning tree protocol: enabled
Port role: Root Port
Port path cost: 200
Port priority: 128
Designated bridge ID(Pri.MAC): 32768.00e0-fc17-c484
The Port is a non-edged port
Connected to a point-to-point LAN segment
Maximum transmission limit is 3 Packets / hello time
Times: Hello Time 2 sec, Max Age 20 sec
Forward Delay 15, Message Age 0
BPDU sent: 13
TCN: 3, RST: 8, Config BPDU: 2
BPDU received: 5185
TCN: 0, RST: 5169, Config BPDU: 16
Port 3 (Ethernet0/3) of bridge is Discarding
Port spanning tree protocol: enabled
Port role: Alternate Port
Port path cost: 200
Port priority: 128
Designated bridge ID(Pri.MAC): 32768.00e0-fc22-6fda
The Port is a non-edged port
Connected to a point-to-point LAN segment
Maximum transmission limit is 3 Packets / hello time
Times: Hello Time 2 sec, Max Age 20 sec
Forward Delay 15, Message Age 1
BPDU sent: 9
TCN: 0, RST: 9, Config BPDU: 0
BPDU received: 5634
TCN: 0, RST: 5634, Config BPDU: 0
As shown above, the root switch is still Switch B. The shape of the spanning treedoes not change. The port ethernet0/2 of switch C is still in the forwarding state. Theethernet 0/3 is still in the discarding state.
1.4.4 Other Configuration
Finally, there are some key parameters about STP, e.g., use the command stppriority { number } to modify the preference of switches, so as to configure thepriority of a specified bridge. Further, you can use the command stproot primaryand the command stp root secondary to specify the root switch and backup rootswitch directly; use the command stpcost {number } to modify the cost value of theport to affect the selection of root port of the spanning tree; or use the command stpedged-port { enable | disable } to configure the edge port. During recalculation ofthe spanning tree, the edge port can be transitioned to the forwarding state directly,thus avoiding the unnecessary transition time.
The STP implemented by the Quidway S-series switches also includes many otherparameters. By configuring such parameters, the switch performance can be exertedto a better extent, thus improving the network reliability. The learners can experiencethis in the lab.
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
17/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission 13
1.5 FAQ
Q: When I enable debugging to check the debugging information, the informationkeeps updating, and the screen keeps scrolling down, which is not stoppable. Whatshould I do?
A: You have to use the command undo debugging all to disable the debugginginformation and stop the output of information. When inputting the command, theoutput information may submerge the command characters that you have input. Justinput the complete command characters and press Enter. In addition, you can use themouse to select some of the information, and screen will stop scrolling down.
1.6 Configuration Reference
1.6.1 Starting up RSTP
[SwitchA]stp enable
[SwitchB]stp enable
[SwitchC]stp enable
1.6.2 Check the Configured STP Information
[SwitchA]display stp
[SwitchB]display stp
[SwitchC]display stp
[SwitchA]display stp interface ethernet0/1 ethernet0/3
[SwitchB]display stp interface ethernet0/1 ethernet0/2
[SwitchC]display stp interface ethernet0/2 ethernet0/3
1.6.3 Check the Received/Transmitted BPDU Message of Port After the PortState Transition
debugging stp packet
terminal debugging
1.6.4 Set the STP-Compatible Mode
[SwitchC]stp mode stp
[SwitchC]display stp interface ethernet0/2 ethernet0/3
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
18/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission14
Chapter 2 MSTP Configuration Additional task
2.1 Networking and Service Description
Switch A
Switch C
Switch B
Switch D
Permit :VLAN 10, 20
Permit :VLAN 10, 20
Permit :VLAN 20, 30
Permit :VLAN 20, 30
Permit :all VLAN
Permit :VLAN 20, 40
Switch A
Switch C
Switch B
Switch D
Permit :VLAN 10, 20
Permit :VLAN 10, 20
Permit :VLAN 20, 30
Permit :VLAN 20, 30
Permit :all VLAN
Permit :VLAN 20, 40
Figure 2-1
4 Quidway S3900 switches; 1 PC, 6 standard network cables, and 1 console cable
2.2 Command Line List
The configuration commands in the system view are:
Operation Command
Enter MSTP region view stp region-configuration
Configuration commands in the MST region view:
Operation Command
Specify region name region-namename
Specify revision level revision-levellevel
Spanning tree instance instanceinstance-idvlanvlan-list
Active region configuration active region-configuration
Display and Debug STP
Operation Command
Display STP configuration information about the localswitch and the specified ports
display stp
Display Spanning tree instance configuration information display stp instance instance-id[ interface
interface-list][ brief]Display MSTP region configuration information display stp region-configuration
Reset stp reset stp [ interfaceinterface-list]
Turn on RSTP debugging switch debugging stp [ interfaceinterface-list] { packet |event }
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
19/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission 15
2.3 Configuration flow
Vlan configuration
MSTI configuration
Active region
Run MSTP
Vlan configuration
MSTI configuration
Active region
Run MSTP
Figure 2-1
2.4 Configuration procedure
1) Vlan configuration
All the switches configure vlan 1, 2, 3, 4 and set the link between each switch as trucktype.
2) Run MSTPIn the system view, enable STP by default as MSTP mode.3) MST configurationAll switches belong to the same MST region. Configure every MSTI for every vlan.Configure MST attributes.
4) Active region configurationManually activate the MST region configuration
2.5 Result Verification
After finishing configuration, until network is stable, we can check all switches portsstatus.
[SWA]display stp brief
MSTID Port Role STP State Protection
0 Ethernet1/0/1 DESI FORWARDING NONE
0 Ethernet1/0/2 ROOT FORWARDING NONE
0 Ethernet1/0/3 DESI FORWARDING NONE
1 Ethernet1/0/1 DESI FORWARDING NONE
1 Ethernet1/0/2 ROOT FORWARDING NONE1 Ethernet1/0/3 DESI FORWARDING NONE
3 Ethernet1/0/1 DESI FORWARDING NONE
3 Ethernet1/0/3 DESI FORWARDING NONE
4 Ethernet1/0/1 DESI FORWARDING NONE
[SWB]display stp brief
MSTID Port Role STP State Protection
0 Ethernet1/0/1 ALTE DISCARDING NONE
0 Ethernet1/0/4 ROOT FORWARDING NONE
0 Ethernet1/0/5 ALTE DISCARDING NONE
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
20/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission16
1 Ethernet1/0/1 ALTE DISCARDING NONE
1 Ethernet1/0/4 ROOT FORWARDING NONE
1 Ethernet1/0/5 ALTE DISCARDING NONE
3 Ethernet1/0/1 ROOT FORWARDING NONE
3 Ethernet1/0/5 ALTE DISCARDING NONE
4 Ethernet1/0/1 ROOT FORWARDING NONE
[SWC]display stp brief
MSTID Port Role STP State Protection
0 Ethernet1/0/2 DESI FORWARDING NONE
0 Ethernet1/0/4 DESI FORWARDING NONE
0 Ethernet1/0/6 DESI FORWARDING NONE
1 Ethernet1/0/2 DESI FORWARDING NONE
1 Ethernet1/0/4 DESI FORWARDING NONE
1 Ethernet1/0/6 DESI FORWARDING NONE
4 Ethernet1/0/6 DESI FORWARDING NONE
[SWD]display stp brief
MSTID Port Role STP State Protection
0 Ethernet1/0/3 ALTE DISCARDING NONE
0 Ethernet1/0/5 DESI FORWARDING NONE
0 Ethernet1/0/6 ROOT FORWARDING NONE
1 Ethernet1/0/3 ALTE DISCARDING NONE
1 Ethernet1/0/5 DESI FORWARDING NONE
1 Ethernet1/0/6 ROOT FORWARDING NONE
3 Ethernet1/0/3 ROOT FORWARDING NONE
3 Ethernet1/0/5 DESI FORWARDING NONE
4 Ethernet1/0/6 ROOT FORWARDING NONE
Note:
The first column MSTID indicates the instance of the port. If its value is 0, it means CIST.
The third column Role indicates the role that the port acts as on the instance. Different instancescalculate separately.
The fourth column STP State indicates the status of the port. Because SWC has the smallest MAC address, it is the root bridge. So the states and the roles are
the same.
From the information above you can know the role of each port. You can also look upthe whole information about STP.
[SWA]dis stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge :32768.00e0-fc58-271dBridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.00e0-fc49-0d31 / 0CIST RegRoot/IRPC :32768.00e0-fc49-0d31 / 199999CIST RootPortId :128.2BPDU-Protection :disabled
TC or TCN received :22
Time since last TC :0 days 0h:3m:58s
----[Port1(Ethernet1/0/1)][FORWARDING]----Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128Port Cost(Dot1T) :Config=auto / Active=199999Desg. Bridge/Port :32768.00e0-fc58-271d / 128.1
Port Edged(Admin) :disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :2358
TCN: 0, Config: 0, RST: 0, MST: 2358
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
21/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission 17
BPDU Received :996
TCN: 0, Config: 0, RST: 0, MST: 996
----[Port2(Ethernet1/0/2)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Root Port
Port Priority :128
Port Cost(Dot1T) :Config=auto / Active=199999
Desg. Bridge/Port :32768.00e0-fc49-0d31 / 128.2
Port Edged(Admin) :disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :14
TCN: 0, Config: 0, RST: 0, MST: 14
BPDU Received :3591
TCN: 0, Config: 0, RST: 0, MST: 3591
----[Port3(Ethernet1/0/3)][FORWARDING]----Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128
Port Cost(Dot1T) :Config=auto / Active=199999
Desg. Bridge/Port :32768.00e0-fc58-271d / 128.3
Port Edged(Admin) :disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :2353
TCN: 0, Config: 0, RST: 0, MST: 2353
BPDU Received :1272
TCN: 0, Config: 0, RST: 0, MST: 1272
2.6 Configuration Reference
2.6.1 Configure Vlan
I. Configure Switch A
[SWA]vlan 10
[SWA]vlan 20
[SWA]vlan 30
[SWA]vlan 40
[SWA]interface Ethernet 1/0/1
[SWA-Ethernet1/0/1]port link-type trunk
[SWA-Ethernet1/0/1]port trunk permit vlan all
[SWA]interface Ethernet 1/0/2
[SWA-Ethernet1/0/2]port link-type trunk
[SWA-Ethernet1/0/2]port trunk permit vlan 10 20
[SWA]interface Ethernet 1/0/3
[SWA-Ethernet1/0/3]port link-type trunk[SWA-Ethernet1/0/3]port trunk permit vlan 20 30
II. Configure Switch B
[SWB]vlan 10
[SWB]vlan 20
[SWB]vlan 30
[SWB]vlan 40
[SWB]interface Ethernet 1/0/1
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
22/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission18
[SWB-Ethernet1/0/1]port link-type trunk
[SWB-Ethernet1/0/1]port trunk permit vlan all
[SWB]interface Ethernet 1/0/4
[SWB-Ethernet1/0/4]port link-type trunk
[SWB-Ethernet1/0/4]port trunk permit vlan 10 20
[SWB]interface Ethernet 1/0/5
[SWB-Ethernet1/0/5]port link-type trunk
[SWB-Ethernet1/0/5]port trunk permit vlan 20 30
III. Configure Switch C
[SWC]vlan 10
[SWC]vlan 20
[SWC]vlan 40
[SWC]interface Ethernet 1/0/2
[SWC-Ethernet1/0/2]port link-type trunk
[SWC-Ethernet1/0/2]port trunk permit vlan 10 20
[SWC]interface Ethernet 1/0/4
[SWC-Ethernet1/0/4]port link-type trunk
[SWC-Ethernet1/0/4]port trunk permit vlan 10 20
[SWC]interface Ethernet 1/0/6
[SWC-Ethernet1/0/6]port link-type trunk
[SWC-Ethernet1/0/6]port trunk permit vlan 20 40
IV. Configure Switch D[SWD]vlan 20
[SWD]vlan 30
[SWD]vlan 40
[SWD]interface Ethernet 1/0/3
[SWD-Ethernet1/0/3]port link-type trunk
[SWD-Ethernet1/0/3]port trunk permit vlan 20 30
[SWD]interface Ethernet 1/0/5
[SWD-Ethernet1/0/5]port link-type trunk
[SWD-Ethernet1/0/5]port trunk permit vlan 20 30
[SWD]interface Ethernet 1/0/6
[SWD-Ethernet1/0/6]port link-type trunk
[SWD-Ethernet1/0/6]port trunk permit vlan 20 40
2.6.2 Starting up MSTP
[SWA]stp enable
[SWB]stp enable
[SWC]stp enable
[SWD]stp enable
2.6.3 Configure MST
I. Configure Switch A
[SWA]stp region-configuration
[SWA-mst-region]region-name test
[SWA-mst-region]revision-level 0
[SWA-mst-region]instance 1 vlan 1
[SWA-mst-region]instance 3 vlan 3
[SWA-mst-region]instance 4 vlan 4
II. Configure Switch B
[SWB]stp region-configuration
[SWB-mst-region]region-name test
[SWB-mst-region]revision-level 0
[SWB-mst-region]instance 1 vlan 1
[SWB-mst-region]instance 3 vlan 3
[SWB-mst-region]instance 4 vlan 4
7/27/2019 Odl010006 Stp-rstp-mstp Laboratory Exercise Guide Issue 1
23/23
ODL010005 STP/RSTP/MSTP Laboratory Exercise Guide ISSUE1.0
Confidential Information of Huawei. No Spreading without Permission 19
III. Configure Switch C
[SWC]stp region-configuration
[SWC-mst-region]region-name test
[SWC-mst-region]revision-level 0
[SWC-mst-region]instance 1 vlan 1
[SWC-mst-region]instance 3 vlan 3
[SWC-mst-region]instance 4 vlan 4
IV. Configure Switch D
[SWD]stp region-configuration
[SWD-mst-region]region-name test
[SWD-mst-region]revision-level 0
[SWD-mst-region]instance 1 vlan 1
[SWD-mst-region]instance 3 vlan 3
[SWD-mst-region]instance 4 vlan 4
2.6.4 Active region configuration
[SWA-mst-region]active region-configuration
[SWB-mst-region]active region-configuration
[SWC-mst-region]active region-configuration
[SWD-mst-region]active region-configuration