[All About Switches] Example for Configuring MSTP

Latest reply: Jul 25, 2016 09:46:38 4663 2 2 0
 

1      Overview

The Multiple Spanning Tree Protocol (MSTP) defined in IEEE 802.1s combines the Spanning Tree Protocol (STP) and Virtual Local Area Network (VLAN). Simply speaking, STP or RSTP is implemented based on ports, whereas MSTP based on instances. MSTP inherits fast transition of RSTP and solves the problem of RSTP in which where all VLANs share one spanning tree.

2      Implementation

2.1         Region and Instance

Compared with STP/RSTP, MSTP uses instances and regions.

?  One Multiple Spanning Tree Instance (MSTI) is a collection of multiple VLANs. Multiple VLANs where the same service is transmitted can be mapped to one MSTI. The topology of each MSTI is calculated independent of one another. Traffic can be load balanced through the mapping between VLANs and MSTIs. By default, all VLANs map to MSTI 0.

?  A region consists of the region name, revision level, and mapping between VLANs and MSTIs. All switches in a region must have the same MST region configuration. That is, the switches that have the same region name, revision level, and mapping between VLANs and MSTIs belong to the same region. By default, the region name is the bridge MAC address of a switch, the revision level is 0, and all VLANs are mapped to MSTI 0.

MSTP defines the following spanning trees:

1.       The Common Internal Spanning Tree (CIST) is composed of the Common Spanning Tree (CST) and Internal Spanning Tree (IST).

2.       The CST connects all the MST regions on a switching network.

3.       The IST is located in an MST region.

4.       A Single Spanning Tree (SST) is formed when a switching device running STP or RSTP belongs to only one spanning tree or an MST region has only one switching device.

2.2         Regional Root and CIST Root

[All About Switches] Example for Configuring MSTP-1225983-1

?  For all connected switches running STP/RSTP/MSTP, there is only one CIST root, that is, root of MSTI 0. In the preceding figure, the root of A0 is the CIST root.

?  Each MSTI in each region has a regional root. That is, the number of regional roots in each region depends on the number of MSTIs.

2.3         Master Port and Regional Edge Port

[All About Switches] Example for Configuring MSTP-1225983-2

?  Master port: Among all edge ports in an MST region, the master port has the smallest cost to the CIST root. The master port is located on the shortest path connecting MST regions to the CIST root. The master port is the root port in a CIST.

?  Regional edge port: A regional edge port is located at the edge of an MST region and connects to another MST region. Multiple regional edge ports may exist in an MST region.

2.4         MSTP Topology Calculation

?  CIST calculation

The following vectors participate in the CIST calculation to trim a ring network into a tree network:

{root ID, external root path cost, region root ID, internal root path cost, designated switching device ID, designated port ID, receiving port ID}

CIST calculation procedure:

1.       Devices on a network send and receive BPDUs. After comparing the configuration BPDUs, the device with the highest priority on the entire network is selected as the CIST root.

2.       MSTP calculates an IST for each MST region.

3.       MSTP considers each MST region as a single switch and computes a CST to interconnect MST regions.

The CST and ISTs constitute a CIST for the entire network.

?  MSTI calculation

The following vectors participate in the MSTI calculation to trim a ring network into a tree network:

{regional root ID, internal root path cost, designated switching device ID, designated port ID, receiving port ID}

In an MST region, MSTP calculates an MSTI for each VLAN based on the mapping between VLANs and MSTIs. Each MSTI is calculated independently. The calculation process is similar to the process for STP/RSTP to calculate a spanning tree.

3      Configuration Notes

?  The VLANs bound to MSTIs must have been created, and ports have been added to VLANs. The display stp brief command displays only information about all STP-enabled ports in Up state.

?  After configuring parameters of an MST region, you must run the active region-configuration command to activate the MST region configuration.

?  The default region name is the MAC address of a device. The MAC address of each device is different, so you must manually specify a region to keep region information consistency on switches.

?  On fixed switches, ports send STP BPDUs to the CPU after the bpdu enable command is configured globally or on ports. Without this configuration, the ports cannot send BPDUs to the CPU after receiving the BPDUs. STP then cannot converge.

For S2700 switches in V100R005 and earlier versions, check whether the bpdu enable command has been configured globally. For other fixed switches in V100R005 and earlier versions, check whether the bpdu enable command has been configured on physical ports and the Eth-Trunk.

For fixed switches in V100R006 and later versions, the bpdu enable command is configured globally or on ports by default on corresponding models.

?  After STP is enabled on an Eth-Trunk, change the cost of the Eth-Trunk to a value smaller than the cost of physical ports so that the Eth-Trunk will be not negotiated as the backup port. The cost of the Eth-Trunk is the cost of a member port divided by the number of member ports. Therefore, the Eth-Trunk cost changes after the status of member ports changes. A smaller cost indicates better link quality.

4      Configuration Examples

4.1         Networking Requirements

[All About Switches] Example for Configuring MSTP-1225983-3

As shown in the figure, SwitchA, SwitchB, SwitchC, and SwitchD constitute a ring network to back up links and load balance traffic of two departments. MSTP is required to block a port and prune the network into a loop-free tree network.

?  Traffic in department 1 and department 2 needs to be load balanced.

?  SwitchA and SwitchB function as the root bridge and secondary root bridge of the two departments.

?  On SwitchC and SwitchD, GE0/0/3 ports connected to users cannot participate in STP calculation.

 

4.2         Configuration Roadmap

The configuration roadmap is as follows:

1.         Create VLANs and add ports to VLANs.

2.         Configure switches to work in MSTP mode.

3.         Configure the region named RG1 and specify the mapping between VLANs and MSTIs.

4.         Configure SwitchA and SwitchB as the root bridge and secondary root bridge of the two departments.

5.      Configure switches to use the default path cost. Huawei switches use IEEE 802.1T standard to calculate path costs by default. By default, the cost of a GE port is 20000, and the cost of an Ethernet port is 200000. In eNSP, the default STP path cost is 1.

6.         Disable STP on GE0/0/3 ports on SwitchC and SwitchD.

7.         Enable STP on SwitchA, SwitchB, SwitchC, and SwitchD.

4.3         Procedure

Step 1: Create VLANs and add ports to VLANs.

<HUAWEI> system-view

[HUAWEI] sysname SwitchA

[SwitchA] vlan batch 2 to 4094

[SwitchA] interface gigabitethernet0/0/1

[SwitchA-GigabitEthernet0/0/1] port link-type trunk

[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 to 4094

[SwitchA-GigabitEthernet0/0/1] quit

[SwitchA] interface gigabitethernet0/0/2

[SwitchA-GigabitEthernet0/0/2] port link-type trunk

[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 4094

[SwitchA-GigabitEthernet0/0/2] quit

 

<HUAWEI> system-view

[HUAWEI] sysname SwitchB

[SwitchB] vlan batch 2 to 4094

[SwitchB] interface gigabitethernet0/0/1

[SwitchB-GigabitEthernet0/0/1] port link-type trunk

[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 to 4094

[SwitchB-GigabitEthernet0/0/1] quit

[SwitchB] interface gigabitethernet0/0/2

[SwitchB-GigabitEthernet0/0/2] port link-type trunk

[SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 4094

[SwitchB-GigabitEthernet0/0/2] quit

 

<HUAWEI> system-view

[HUAWEI] sysname SwitchC

[SwitchC] vlan batch 2 to 4094

[SwitchC] interface gigabitethernet0/0/1

[SwitchC-GigabitEthernet0/0/1] port link-type trunk

[SwitchC-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 to 4094

[SwitchC-GigabitEthernet0/0/1] quit

[SwitchC] interface gigabitethernet0/0/2

[SwitchC-GigabitEthernet0/0/2] port link-type trunk

[SwitchC-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 4094

[SwitchC-GigabitEthernet0/0/2] quit

 

<HUAWEI> system-view

[HUAWEI] sysname SwitchD

[SwitchD] vlan batch 2 to 4094

[SwitchD] interface gigabitethernet0/0/1

[SwitchD-GigabitEthernet0/0/1] port link-type trunk

[SwitchD-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 to 4094

[SwitchD-GigabitEthernet0/0/1] quit

[SwitchD] interface gigabitethernet0/0/2

[SwitchD-GigabitEthernet0/0/2] port link-type trunk

[SwitchD-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 4094

[SwitchD-GigabitEthernet0/0/2] quit

 

Step 2: Configure switches to work in MSTP mode.

On Huawei switches, MSTP is enabled by default, so you can skip this step.

 [SwitchA] stp mode mstp

 

 [SwitchB] stp mode mstp

 

 [SwitchC] stp mode mstp

 

 [SwitchD] stp mode mstp

 

Step 3: Configure the region named RG1 and specify the mapping between VLANs and MSTIs.

The region configuration on the four devices must be consistent so that the loop can be eliminated.

[SwitchA] stp region-configuration

[SwitchA-mst-region] region-name RG1   //Configure the region name RG1.

[SwitchA-mst-region] instance 1 vlan 1 to 200  //By default, all VLANs are mapped to MSTI 0. Here, VLANs 1 to 200 are mapped to MSTI 1, and VLANs 201 to 4094 are mapped to MSTI 0.

[SwitchA-mst-region] active region-configuration  //Activate the region configuration.

[SwitchA-mst-region] quit  

 

[SwitchB] stp region-configuration

[SwitchB-mst-region] region-name RG1

[SwitchB-mst-region] instance 1 vlan 1 to 200

[SwitchB-mst-region] active region-configuration

[SwitchB-mst-region] quit 

 

[SwitchC] stp region-configuration

[SwitchC-mst-region] region-name RG1

[SwitchC-mst-region] instance 1 vlan 1 to 200

[SwitchC-mst-region] active region-configuration

[SwitchC-mst-region] quit 

 

[SwitchD] stp region-configuration

[SwitchD-mst-region] region-name RG1

[SwitchD-mst-region] instance 1 vlan 1 to 200

[SwitchD-mst-region] active region-configuration

[SwitchD-mst-region] quit 

 

Step 4: Configure the root bridge and secondary root bridge.

Configure SwitchA as the root bridge and SwitchB as the secondary root bridge in MSTI 0, and configure SwitchA as the secondary root bridge and SwitchB as the root bridge in MSTI 1.

[SwitchA] stp instance 0 root primary   //You can also use the stp priority 0 command to set the STP priority to 0. Running the stp priority 0 command is equivalent to running the stp root primary command.

[SwitchA] stp instance 1 root secondary  //You can also use the stp priority 4096 command to set the STP priority to 4096. The stp priority 4096 command is equivalent to the stp root secondary command.

 

[SwitchB] stp instance 0 root secondary

[SwitchB] stp instance 1 root primary

 

Step 5: Disable STP on GE0/0/3 interfaces of SwitchC and SwitchD.

[SwitchC] interface gigabitethernet0/0/3

[SwitchC-GigabitEthernet0/0/3] stp disable

[SwitchC-GigabitEthernet0/0/3] quit

 

[SwitchD] interface gigabitethernet0/0/3

[SwitchD-GigabitEthernet0/0/3] stp disable

[SwitchD-GigabitEthernet0/0/3] quit

 

Step 6: Enable STP globally.

On Huawei X7 series switches, STP is enabled by default, so you can skip this step.

[SwitchA] stp enable

 

[SwitchB] stp enable

 

[SwitchC] stp enable

 

[SwitchD] stp enable

 

Step 7: Verify the configuration.

Check brief information about MSTP. You can view the port roles and states.

[All About Switches] Example for Configuring MSTP-1225983-4

4.4         Configuration Files

Configuration file of SwitchA

#

sysname SwitchA

#

vlan batch 2 to 4094

#

stp instance 0 root primary

stp instance 1 root secondary

stp enable

#

stp region-configuration

 region-name RG1

 instance 1 vlan 1 to 200

 active region-configuration

#

interface GigabitEthernet0/0/1

port link-type trunk

 port trunk allow-pass vlan 2 to 4094

# 

interface GigabitEthernet0/0/2

port link-type trunk

 port trunk allow-pass vlan 2 to 4094

# 

return

Configuration file of SwitchB

#

sysname SwitchB

#

vlan batch 2 to 4094

#

stp instance 0 root secondary

stp instance 1 root primary

stp enable

# 

stp region-configuration

 region-name RG1

 instance 1 vlan 1 to 200

 active region-configuration

#

interface GigabitEthernet0/0/1

port link-type trunk

 port trunk allow-pass vlan 2 to 4094

# 

interface GigabitEthernet0/0/2

port link-type trunk

 port trunk allow-pass vlan 2 to 4094

# 

return 

Configuration file of SwitchC

#

sysname SwitchC 

# 

vlan batch 2 to 4094

#

stp enable

#

stp region-configuration

 region-name RG1

 instance 1 vlan 1 to 200

 active region-configuration

# 

interface GigabitEthernet0/0/1

port link-type trunk

 port trunk allow-pass vlan 2 to 4094

# 

interface GigabitEthernet0/0/2

port link-type trunk

 port trunk allow-pass vlan 2 to 4094

# 

interface GigabitEthernet0/0/3

 stp disable

# 

return 

Configuration file of SwitchD

#

sysname SwitchD

#

vlan batch 2 to 4094

#

stp mode stp

# 

interface GigabitEthernet0/0/1

port link-type trunk

 port trunk allow-pass vlan 2 to 4094

# 

interface GigabitEthernet0/0/2

port link-type trunk

 port trunk allow-pass vlan 2 to 4094

# 

interface GigabitEthernet0/0/3

 stp disable

# 

return

 

★★★Summary★★★ All About Huawei Switch Features and Configurations

This article contains more resources

You need to log in to download or view. No account?Register

x
  • x
  • convention:

user_2790689
Created Jul 9, 2015 08:38:35 Helpful(0) Helpful(0)

Thank you.
  • x
  • convention:

tanveer121
Created Jul 21, 2016 17:42:29 Helpful(0) Helpful(0)

there is no support for VCMP on the current release of ESNP? how we can perform the Labs for VCMP? 
  • x
  • convention:

Comment

Reply
You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login