Huawei Quidway S3000 Operation Manual

Operation Manual - STP Quidway S3000 Series Ethernet Switches Table of Contents
i
Table of Contents
Chapter 1 RSTP Configuration..................................................................................................... 1-1
1.1 STP Overview....................................................................................................................1-1
1.2 Configure RSTP................................................................................................................. 1-7
1.3 Display and Debug RSTP................................................................................................1-18
1.4 RSTP Configuration Example.......................................................................................... 1-19
Chapter 2 MSTP Region-configuration ....................................................................................... 2-1
2.1 MSTP Overview.................................................................................................................2-1
2.2 Configure MSTP ..............................................................................................................2-10
Operation Manual - STP Quidway S3000 Series Ethernet Switches Table of Contents
ii
2.3 Display and Debug MSTP ............................................................................................... 2-28
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-1
Chapter 1 RSTP Configuration
1.1 STP Overview
1.1.1 Function of STP
Spanning Tree Protocol ( STP ) is applied in loop network to block some undesirable redundant paths with certain algorithms and prune the network into a loop-free tree, thereby avoiding the proliferation and infinite cycling of the packet in the loop network.
1.1.2 Implement STP
The fundamental of STP is that the switches exchange a special ki nd of protocol packet (which is called configuration Bridge Protocol Data Units, or BPDU, in IEEE 802.1D) to decide the topology of the network. The configuration BPDU contains the information enough to ensure the switches to compute the spanning tree.
The configuration BPDU mainly contains the following information:
1) The root ID consisting of root priority and MAC address
2) The cost of the shortest path to the root
3) Designated switch ID consisting of designated switch priority and MAC address
4) Designated port ID consisting of port priority and port number
5) The age of the configuration BPDU: MessageAge
6) The maximum age of the configuration BPDU: MaxAge
7) Configuration BPDU interval: HelloTime
8) Forward delay of the port: ForwardDelay. What are the designated switch and designated port?
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-2
Switch A
Switch C
Switch B
CP2
BP2
CP1
BP1
AP2AP1
LAN
Figure1-1 Designated switch and designated port
For a switch, the designated switch is a switch in charge of forwarding packets to the local switch via a port called the designated port accordingly . For a LAN, the designated switch is a switch that in charge of forwarding packets to the network segment via a port called the designated port accordingly . As illustrated in the figu re1-1, Switch A forwards data to Switch B via the port AP1. So to Switch B, the designated switch is Switch A and the designated port is AP1. Also in the figure above, Switch B and Switch C are connected to the LAN and Switch B forwards packets to LAN. So the designated switch of LAN is Switch B and the designated port is BP2.
Note:
AP1, AP2, BP1, BP2, CP1 and CP2 respectively delegate the ports of Switch A, Switch B and Switch C.
z The specific calculation process of STP algorithm.
The following example illustrates the calculation process of STP. The figure1-2 below illustrates the network.
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-3
Switch A
with priority 0
Switch C
with priority 2
Switch B
with priority 1
CP2
BP2
CP1
BP1
AP2
AP1
4
10
5
Figure1-2 Ethernet switch networking
To facilitate the descriptions, only the first four parts of the configuration BPDU are described in the example. They are root ID (expressed as Ethernet switch priority), path cost to the root, designated switch ID (expressed as Ethernet switch priority) and the designated port ID (expressed as the port number). As illustrated in the figure above, the priorities of Switch A, B and C are 0, 1 and 2 and the p ath costs of their links are 5, 10 and 4 respectively.
9) Initial state When initialized, each port of the switches will generate the configuration BPDU taking
itself as the root with a root path cost as 0, designated switch IDs as their own switch IDs and the designated ports as their ports.
Switch A: Configuration BPDU of AP1: {0, 0, 0, AP1} Configuration BPDU of AP2: {0, 0, 0, AP2} Switch B: Configuration BPDU of BP1: {1, 0, 1, BP1} Configuration BPDU of BP2: {1, 0, 1, BP2} Switch C: Configuration BPDU of CP2: {2, 0, 2, CP2} Configuration BPDU of CP1: {2, 0, 2, CP1}
10) Select the optimum configuration BPDU Every switch transmits its configuration BPDU to others. When a port receives a
configuration BPDU with a lower priority than that of its own, it will discard the message and keep the local BPDU unchanged. When a higher-priority configuration BPDU is
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-4
received, the local BPDU is updated. And the optimum configuration BPDU will be elected through comparing the configuration BPDUs of all the ports.
The comparison rules are:
z The configuration BPDU with a smaller root ID has a higher priority z f the root IDs are the same, perform the comparison based on root path costs. The
cost comparison is as follows: the path cost to the root recorded in the configuration BPDU plus the corresponding path cost of the local port is set as S, the configuration BPDU with a smaller S has a higher priority.
z If the costs of path to the root are also the same, compare in sequence the
designated switch ID, designated port ID and the ID of the port via which the configuration BPDU was received.
In summary, we assume that the optimum BPDU can be selected through root ID comparison in the example.
11) Specify the root port, block the redundancy link and update the configuration BPDU of the designated port.
The port receiving the optimum configuration BPDU is designated to be the root port, whose configuration BPDU remains the same. Any other port, whose configuration BPDU has been updated in the step Select the optimum configuration BPDU, will be blocked and will not forward any data, in addition, it will only receive but not transmit BPDU and its BPDU remains the same. The port, wh ose BPDU has not been updated in the step Select the optimum configuration BPDU will be the designated port. Its configuration BPDU will be modified as follows: substituting the root ID with the root ID in the configuration BPDU of the root port, the cost of path to root with the value made by the root path cost plus the path cost corresponding to the root port, the designated switch ID with the local switch ID and the designated port ID with the local port ID.
The comparison process of each switch is as follows. Switch A: AP1 receives the configuration BPDU from Switch B and finds out that the local
configuration BPDU priority is higher than that of the received one, so it discards the received configuration BPDU. The configuration BPDU is processed on the AP2 in a similar way. Thus Switch A finds itself the root and designated switch in the configuration BPDU of every port; it regards itself as the root, retains the configuration BPDU of each port and transmits configuration BPDU to others regularly thereaf ter. By now, the configuration BPDUs of the two ports are as follows:
Configuration BPDU of AP1: {0, 0, 0, AP1}. Configuration BPDU of AP2: {0, 0, 0, AP2}. Switch B:
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-5
BP1 receives the configuration BPDU from Switch A and finds that the received BPDU has a higher priority than the local one, so it updates its configuration BPDU.
BP2 receives the configuration BPDU from Switch C and finds that the local BPDU priority is higher than that of the received one, so it discards the received BPDU.
By now the configuration BPDUs of each port are as follows: Configuration BPDU of BP1: {0, 0, 0, AP1}, Configuration BPDU of BP2: {1, 0, 1, BP2}.
Switch B compares the configuration BPDUs of the ports and select s the BP1 BPDU as the optimum one. Thus BP1 is elected as the root port and the configuration BPDUs of Switch B ports are updated as follows.
The configuration BPDU of the root port BP1 retains a s {0, 0, 0, BP1}. BP2 updates root ID with that in the optimum configuration BPDU, the path cost to root with 5, sets the designated switch as the local switch ID and the designated port ID as the local port ID. Thus the configuration BPDU becomes {0, 5, 1, BP2}.
Then all the designated ports of Switch B transmit the configuration BPDUs regularly. Switch C: CP2 receives from the BP2 of Switch B the configuration BPDU {1, 0, 1, BP2} that has
not been updated and then the updating process is launched. {1, 0, 1, BP2}. CP1 receives the configuration BPDU {0, 0, 0, AP2} from Switch A and Switch C
launches the updating. The configuration BPDU is updated as {0, 0, 0, AP2}. By comparison, CP1 configuration BPDU is elected as the optimum one. The CP1 is
thus specified as the root port with no modifications made on its configuration BPDU. However, CP2 will be blocked and its BPDU also remains same, but it will not receive the data (excluding the STP packet) forwarded from Switch B until spanning tree calculation is launched again by some new events. For example, the link from Switch B to C is down or the port receives any better configuration BPDU.
CP2 will receive the updated configuration BPDU, {0, 5, 1, BP2}, from Switch B. Since this configuration BPDU is better then the old one, the old BPDU will be updated to {0, 5, 1, BP2}.
Meanwhile, CP1 receives the configuration BPDU from Switch A but its configuration BPDU will not be updated and retain {0, 0, 0, AP2}.
By comparison, the configuration BPDU of CP2 is elected as the optimum one, CP2 is elected as the root port, whose BPDU will not change, while CP1 will be blocked and retain its BPDU, but it will not receive the data forwarded from Switch A until spanning tree calculation is triggered again by some changes. For example, the link from Switch B to C as down.
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-6
Thus the spanning tree is stabilized. The tree with the root Switch A is illustrated in the figure1-3 below.
Switch A
with priority 0
Switch C
with priority 2
Switch B
with priority 1
CP2
BP2
BP1
AP1
4
5
Figure1-3 The final stabilized spanning tree
To facilitate the descriptions, the description of the example is simplified. For example, the root ID and the designated switch ID in actual calculation should comprise both switch priority and switch MAC address. Designated port ID should comprise port priority and port MAC address. In the updating process of a configuration BPDU, other configuration BPDUs besides the first four items will make modifications according to certain rules. The basic calculation process is de scribed below:
z Configuration BPDU forwarding mechanism in STP:
Upon the initiation of the network, all the switches regard themselves as the roots. The designated ports send the configuration BPDUs of local ports at a regular interval of HelloTime. If it is the root port that receives the configuration BPDU, the switch will enable a timer to time the configuration BPDU as well as increase MessageAge carried in the configuration BPDU by certain rules. If a path goes wrong, the root port on this path will not receive configuration BPDUs any more and the old configuration BPDUs will be discarded due to timeout. Hence, recalculation of the spanning tree will be initiated to generate a new path to replace the failed one and thus restore the network connectivity.
However, the new configuration BPDU as now recalculated will not be propagated throughout the network right away , so the old root ports and design ated ports that have not detected the topology change will still forward the data through the old path. If the new root port and designated port begin to forward data immediately after they are elected, an occasional loop may still occur . In RSTP, a transitional state mechanism is thus adopted to ensure the new configuration BPDU has been propagated throughout the network before the root port and designated port begin to send data again. That is, the root port and designated port should undergo a transitional state for a period of Forward Delay before they enter the forwarding state.
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-7
1.1.3 Implement RSTP on Ethernet Switch
The Ethernet Switch implements the Rapid Spanning Tree Protocol (RSTP), i.e., the enhancement of STP. The Forward Delay for the root ports and designated ports to enter forwarding state is greatly reduced in certain conditions, thereby shortening the time period for stabilizing the network topology.
To achieve the rapid transition of the root port state, the following requirement should be met: The old root port on this switch has stopped data forwarding and the designated port in the upstream has begun forwarding data.
The conditions for rapid state transition of the designated port are:
z The port is an Edge port that does not connect with any switch dire ctly or indirectly.
If the designated port is an edge port, it can switch to forwarding state directly without immediately forwarding data.
z The port is connected with the point-to-point link, that is, it is the master port in
aggregation ports or full duplex port. It is feasible to configure a point-to-point connection. However, errors may occur and therefore this configuration is not recommended. If the designated port is connected with the point-to-point link, it can enter the forwarding state right after handshaking with the do wnstream switch and receiving the response.
The switch that uses RSTP is compatible with the one using STP. Both protocol packets can be identified by the switch running RSTP and used in spanni ng tree calculation.
Note:
RSTP is the protocol of single spanning tree. A switching network only has one spanning tree. To guarantee the normal communication inside a VLAN, the devices of a VLAN shall have routes to one another on the Spanning Tree, otherwise, the communication inside the VLAN will be affected if some links inside a VLAN are blocked. For some VLAN that cannot be arranged along the spanning tree paths for some special requirements, you have to disable RSTP on the switch port corresponding to the VLAN.
1.2 Configure RSTP
RSTP configuration includes:
z Enable/Disable RSTP on the switch z Enable/Disable RSTP on the port z Configure RSTP Operating Mode z Set priority of a specified bridge
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-8
z Set Forward Delay of a specified bridge z Set Hello Time of the specified bridge z Set Max Age of the specified bridge z Set the maximum transmission speed of the specified port z Set specified port as the EdgePort z Set path cost of the specified port z Set the priority of a specified port z Configure a specified port to be connected to a point-to-point link z Set mCheck of the specified port
Among the above-mentioned tasks, only the steps of enabling STP on the switch and enabling STP on the port are required. For other tasks, if you do not configu re them, the system will use the default settings.
Before enabling spanning tree, relative parameters of Ethernet port or the device can be configured. After disabling the span ning tree, these configuration parameters will be reserved and becoming functional after enabling the spanning tree again.
1.2.1 Enable/Disable RSTP on a Switch
You can use the following command to enable RSTP on the switch. Perform the following configurations in system view .
Table1-1 Enable/Disable RSTP on a device
Operation Command
Enable/Disable RSTP on a device stp { enable | disable } Restore RSTP to the default value undo stp
Only after the RSTP is enabled on the switch can other configurations take effect. Note that some network resource will be occupied after RSTP is e nabled. By default, RSTP is disabled.
1.2.2 Enable/Disable RSTP on a Port
Y ou can use the following command to e nable/disable the RSTP on the de signated port. To flexibly control the RSTP operations, after RSTP is enabled on the Ethernet po rts of the switch, it can be disabled again to forbid the ports to p articipate in the span ning tree calculation.
Perform the following configurations in Ethernet port view.
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-9
Table1-2 Enable/Disable RSTP on a port
Operation Command
Enable RSTP on a specified port stp enable Disable RSTP on a specified port stp disable
Note that the redundancy route may be generated after RSTP is disabled on the Ethernet port.
By default, RSTP on all the ports will be enabled after it is enabled on the switch.
1.2.3 Configure RSTP Operating Mode
RSTP is executable in RSTP mode or STP-compatible mode. RSTP mode is applied when all the network devices provided for executing RSTP, while the STP-compatible mode is applied when both STP and RSTP are execu table on the network.
You can use the following command to set the RSTP operating mode. Perform the following configurations in system view .
Table1-3 Set RSTP operating mode
Operation Command
Configure to run RSTP in STP-compatible/RSTP mode stp mode { stp | rstp } Restore the default RSTP mode undo stp mode
Normally , if there is a bridge provided to execute STP in the switching network, the port (in the switch running RSTP), which connects to another port (in the switch for executing STP), can automatically switch to STP compatible mode from RSTP mode.
By default, RSTP runs in RSTP mode.
1.2.4 Set Priority of a Specified Bridge
Whether a bridge can be selected as the “root” of the spanning tree depends on its priority . By assignin g a lower pri ority, a bridge can be artificially specified as the root of the spanning tree.
You can use the following command to configure the priority of a specified bridge. Perform the following configurations in system view .
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-10
Table1-4 Set priority of a specified bridge
Operation Command
Set priority of a specified bridge stp priority bridge-priority Restore the default priority of specified bridge undo stp priority
Note that if the priorities of all the bridges in the switching network are the same, the bridge with the smallest MAC address will be selected as the “root”. When RSTP is enabled, an assignment of a priority to the bridge will lead to recalculation of the spanning tree.
By default, the priority of the bridge is 32768.
1.2.5 Specify the Switch as Primary or Secondary Root Switch
RSTP can determine the spanning tree root through calculation. You can also specify the current switch as the root using this command.
You can use the following commands to specify the current switch as the primary or secondary root of the spanning tree.
Perform the following configuration in system view.
Table1-5 Specify the switch as primary or secondary root switch
Operation Command
Specify the current switch as the primary root switch of the spanning tree. stp root primary Specify the current switch as the secondary root switch of the spanning tree. stp root secondary Disqualify the current switch as the primary or secondary root. undo stp root
After a switch is configured as primary root switch or secondary root switch, user can’t modify the bridge priority of the switch.
A switch can either be a primary or secondary root bridge, but not both of them. If the primary root of a spanning tree instance is down or powered off, the secondary
root will take its place, unless you configure a new primary root. Of two or more configured secondary root switches, RSTP selects the one with the smallest MAC address to take the place of the failed primary root.
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-11
Note:
To configure a switch as the root of the spanning tree instance, you can specify its priority as 0 or simply set it as the root, using the command. It is not necessary to specify two or more roots for an STI. In other words, please do not specify the root for an STI on two or more switches. You can configure more than one secondary root for a spanning tree through specifying the secondary STI root on two or more switches. Generally, you are recommended to designate one primary root and more than one secondary roots for a spanning tree.
By default, a switch is neither the primary root nor the secondary root of the spanning tree.
1.2.6 Set Forward Delay of a Specified Bridge
Link failure will cause recalculation of the spanning tree and change its structure. However, the newly calculated configuration BPDU cannot be propagated throughout the network immediately. If the newly selected root port and designated port begin to forward data frame right away, occasional loop can be caused. Accordingly, the protocol adopts a state transition mechanism, that is, the root port and the designated port must undergo a transition state for a period of Forward Delay before they transition to the forwarding state and resume data frame forwarding. This delay ensures that the new configuration BPDU has been propagated throughout the network before the dat a frame forwarding is resumed.
You can use the following command to set the Forward Delay for a specified bridge. Perform the following configurations in system view .
Table1-6 Set forward delay of a specified bridge
Operation Command
Set Forward Delay of a specified bridge stp timer forward-delay centiseconds Restore the default Forward Delay of specified bridge undo stp timer forward-delay
Forward Delay of the bridge is related to the diameter of the switching network. As a rule , the larger the network diameter , the longer the Forward Delay. Note that if the Forward Delay is configured too short, occasional path redundancy may occur. If the Forward Delay is configured too long, the restoring of network connection may take a long time. It is recommended to use the default setting.
By default, the bridge Forward Delay is 15 seconds.
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-12
1.2.7 Set Hello Time of the Specified Bridge
A bridge transmit s hello pa cket regularly to the adjacen t bridges to check if there is link failure.
You can use the following command to set the Hello Ti me of a specified bridge. Perform the following configurations in system view .
Table1-7 Set Hello Time of the specified bridge
Operation Command
Set Hello Time of the specified bridge stp timer hello centiseconds Restore the default Hello Time of the specified bridge undo stp timer hello
Appropriate Hello Time can ensure that the bridge can detect the link failure in the network in time without occupying too many network resources. If the Hello Time is too long it will result in the spanning tree recalculation because the bridge mistakes due to the frame dropping of the link for link failure. If the Hello T i me is too short, it will result in frequently sending of configuration BPDUs by the bridge and thus unduly increasing the switch load and wastes of network resource.
By default, the Hello Time of the bridge is 2 seconds.
1.2.8 Set Max Age of the Specified Bridge
Max Age is a parameter to judge whether the configuration BPDU is “timeout”. Users can configure it according to the actual network situation.
You can use the following command to set Max Age of a specified b ridg e. Perform the following configurations in system view .
Table1-8 Set Max Age of the specified bridge
Operation Command
Set Max Age of the specified bridge stp timer max-age centiseconds Restore the default Max Age of the specified bridge undo stp timer max-age
If the Max Age is too short, it will result in frequent calculation of spanning tree or misjudge the network congestion as a link fault. On the other hand, too long Max Age may make the bridge unable to find link failure in time and weaken the network auto-sensing ability. It is recommended to use the default setting.
By default, the bridge Max Age is 20 seconds.
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-13
1.2.9 Set Timeout Factor of the Bridge
A bridge transmit s hello pa cket regularly to the adjacen t bridges to check if there is link failure. Generally, if the switch doesn’t receive the RSTP packets from the upstream switch for 3 times of hello time, the switch will decide the upstream switch is dead and will recalculate the topology of the network. Then in steady network, the recalculation may be caused when the upstream is busy. In this case, user can redefine the timeout interval to a longer time by define the multiple of hello time.
Y ou can use the follo wing command to set the multiple value of hello time of a sp ecified bridge.
Perform the following configurations in system view .
Table1-9 Set Timeout Factor of the Bridge
Operation Command
Set the multiple value of hello time of a specified bridge stp timeout-factor number Restore the default multiple value of hello time undo stp timeout-factor
It is recommended to set 5, 6 or 7 as the value of multiple in the steady network. By default, the multiple value of hello time of the bridge is 3.
1.2.10 Set the Maximum Transmission Speed of the Specified Port
The maximum transmission speed of Ethernet port is related to its physical state and network structure. Users can configure it according to the actual network situation.
You can use the following command to set the maximum transmission speed of the specified port.
Perform the following configurations in Ethernet port view.
Table1-10 Set the maximum transmission speed of the specified port
Operation Command
Set the maximum transmission speed of the specified port stp transit-limit packetnum Restore the default maximum transmission speed of the specified port
undo stp transit-limit
If the max transmission speed on a port is too high, there will be too many packets being transmitted per unit time, which occupies excessive network resources. It is recommended to use the default setting.
Operation Manual - STP Quidway S3000 Series Ethernet Switches Chapter 1 RSTP Configuration
1-14
By default, the maximum transmission speed is 3 (a counter value without unit) on all the Ethernet ports of the bridge.
1.2.11 Set Specified Port to be an EdgePort
EdgePort is not connected to any switch directly or indirectly via the connected network.
You can use the following command to set a specified port as an EdgePort. Perform the following configurations in Ethernet port view.
Table1-11 Set specified port as the EdgePort
Operation Command
Set a specified port as an EdgePort or a non-EdgePort stp edged-port { enable | disable } Set the specified port as the non-EdgePort, as defaulted undo stp edged-port
In the process of recalculating the spanning tree, the EdgePort can transfer to the forwarding state directly and reduce unnecessary transition time. If the current Ethernet port is not connected with any Ethernet port of other bridges, this port should be set as an EdgePort. If a specified port connected to a port of any other bridge is configured as an edge port, RSTP will automatically detect and reconfigure it as a non-EdgePort.
After the network topology changed, if a configured non-EdgePort changes to an EdgePort and is not connected to any other port, it is recommende d to configur e it as an EdgePort manually because RSTP cannot configure a non-EdgePort as an EdgePort automatically.
Configure the port directly connected to the terminal as an EdgePort, so that the port can transfer immediately to the forwarding state.
By default, all the Ethernet ports are configured as non-EdgePort.
1.2.12 Set Path Cost of the Specified Port
The path cost of Ethernet port is related to the speed of a link connected to the port. You can use the following command to set the Path Cost of a specified port. Perform the following configurations in Ethernet port view.
Loading...
+ 35 hidden pages