eNSP - Multiple Spanning-tree 802.1s


What is Multiple spanning tree? A standard based way of using multiple instances of STP in a network, it allows the tuning of  STP parameters on a per-instance basis so that while some links block on one set of VLans, they can forward another set of  VLans.

Out of all MST instances, the instance 0 also called IST (internal spanning tree), which resides within an MST region, has a special meaning. This instance always exists even if no other MST instances are created, without any additional configuration all Vlans are mapped onto the IST providing a loop-free network. The IST is the only instance that interacts with STP running on switches outside the MST region.

To inter-operate with 802.1d switches, MST establishes the CST (common spanning tree). CST connects all MST regions with 802.1d switches and perceives every region as a single virtual bridge.

The IST and CST will form the CIST (common and internal spanning tree) and MST will calculate using STP or RSTP a CIST Root, which will be the bridge with the lowest bridge ID among all switches in MST regions and Non-MST region. For every MST region, MST will calculate a CIST Regional Root, which will be the switch with the shortest path to the CIST Root.

MST logical approach

On 802.1d & 802.1w there can only be one Root bridge for the entire network, meaning that it is not possible to perform VLAN traffic engineering across redundant links, once a link is blocked, it is blocked for all Vlans. The more traffic is forwarded over the links closer to the root bridge, the higher is the demand on the root bridge resources, both in terms of CPU and links capacity utilization.

To overcome this limitation and to have a more efficient use of the network, the idea behind MST is that for a full redundant physical topology there can be only x amount of spanning trees.


MST runs a number of vlan independent STP instances (representing logical topologies) and then the administrator maps each VLAN to the most appropriate logical topology (STP instance). The number of STP instances is kept to minimum, saving switch resources and the network capacity is utilized in more efficient way, by using all possible paths for VLAN traffic.

MST Region

Each switch running in a network has a single MST configuration, for a group of switches to form a MST Region, MST configuration, which consists on three attributes, must be identical on all switches.

    - Same region name
    - Same MSTI Vlan mappings
    - Same MSTP revision level

Ports Roles

MST uses the same port roles as RSTP and for MST Instances uses an additional port role. The new port role is called Master Port. A Master Port is a edge regional port that functions as root port for the IST and as Master port for MST Instances providing connectivity with the CIST Root that lies outside the MST Region. If the CIST Root is within a MST Region there will be no Master Ports for the MST Instances on the CIST Regional Root.

MST BPDU Format

MST BPDUs contain information about the CIST Root, CIST Regional Root and MST Instances as show in the following picture.


To exactly identify the boundaries of the regions MST BPDUs are sent with the characteristics of the region except for vlan-to-instance mappings, because switches only need to know whether they are in a region as a neighbour. Therefore a digest of the vlan-to-instance table mapping along with revision number and name is sent. Once the BPDU is received by the neighbour switch, the switch extracts the digest and compares this digest with its own computed digest. If the digest differ, the port on which the BPDU was received is at a boundary of a region.

Configuring MST

The following topology illustrate how MST organizes the network into one or more regions. all ports interconnecting the switches must be previously configured as trunk ports and allow all vlans.



1 - Non-MST Region:

Switch SW11
#
vlan batch 10
#
stp mode rstp
#

2 - MST Regions:

Region A - SW1, SW3 & SW9
[SW1]vlan batch 10 20 30
[SW1]stp region-configuration
[SW1-mst-region]region-name RegionA
[SW1-mst-region]revision-level 1
[SW1-mst-region]instance 1 vlan 20
[SW1-mst-region]instance 2 vlan 30
[SW1-mst-region]active region-configuration
Sw1 is the root for instance 1 and Sw3 the root for instance 2.
[SW1]stp instance 1 root primary
[SW3]stp instance 2 root primary

Region B - SW2, SW4 & SW10
[SW2]vlan batch 10 40 50
[SW2]stp region-configuration
[SW2-mst-region]region-name RegionB
[SW2-mst-region]revision-level 1
[SW2-mst-region]instance 1 vlan 40
[SW2-mst-region]instance 2 vlan 50
[SW2-mst-region]active region-configuration  

Verification commands:

To verify the MST configuration run the command "display stp region-configuration". This command will display the region name, revision level and the vlan-to-instance mappings.

After configuring the illustrated topology with the previous commands run the "display stp" to find which bridge is the CIST Root Bridge.
[SW1]display stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge         :32768.4c1f-cc94-6d88
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 19
CIST Root/ERPC      :32768.4c1f-cc4a-502d / 0
CIST RegRoot/IRPC   :32768.4c1f-cc4a-502d / 20000
CIST RootPortId     :128.22
BPDU-Protection     :Disabled
TC or TCN received  :25
TC count per hello  :0
STP Converge Mode   :Normal 
Time since last TC  :0 days 0h:17m:57s
Number of TC        :10
Last TC occurred    :GigabitEthernet0/0/24
From the "display stp" on SW1, in red is the CIST Root mac-address with an ERPC (external root path cost) of 0, this means that the CIST Root for the entire network its in the same region as SW1. In orange is the CIST Regional Root with an IRPC (internal root path cost) of 20000, which is the same bridge as the CIST Root and is one hop away from SW1 considering the path cost (IRPC). In blue the root port id is GigabitEthernet 0/0/22 which can be confirmed with the command "display stp brief" or "display stp int GigabitEthernet 0/0/22".

To display the port roles for all MST Instances run the command "display stp brief".
[SW2]display stp brie
 MSTID  Port                        Role  STP State     Protection
   0    GigabitEthernet0/0/21       ALTE  DISCARDING      NONE
   0    GigabitEthernet0/0/22       DESI  FORWARDING      NONE
   0    GigabitEthernet0/0/23       DESI  FORWARDING      NONE
   0    GigabitEthernet0/0/24       ROOT  FORWARDING      NONE
   1    GigabitEthernet0/0/21       ALTE  DISCARDING      NONE
   1    GigabitEthernet0/0/22       DESI  FORWARDING      NONE
   1    GigabitEthernet0/0/23       DESI  FORWARDING      NONE
   1    GigabitEthernet0/0/24       MAST  FORWARDING      NONE
   2    GigabitEthernet0/0/21       ALTE  DISCARDING      NONE
   2    GigabitEthernet0/0/22       ALTE  DISCARDING      NONE
   2    GigabitEthernet0/0/23       ROOT  FORWARDING      NONE
   2    GigabitEthernet0/0/24       MAST  FORWARDING      NONE
This output displays the Root and Master port for MST RegionB, in this scenario GigabitEthernet 0/0/24 is the port with the shortest path to the Root Bridge.

To display which switch is the root bridge for a MST Instance run the command "display stp instance [x]".
[SW1]display stp instance 1
-------[MSTI 1 Global Info]-------
MSTI Bridge ID      :0.4c1f-cc94-6d88
MSTI RegRoot/IRPC   :0.4c1f-cc94-6d88 / 0
MSTI RootPortId     :0.0
MSTI Root Type      :Primary root
Master Bridge       :32768.4c1f-cc4a-502d
Cost to Master      :20000
TC received         :6
TC count per hello  :0
Time since last TC  :0 days 0h:0m:59s
Number of TC        :8
Last TC occurred    :GigabitEthernet0/0/24
The "display stp instance  [x] " confirms that Sw1 is the root bridge for MST Instance 1 as configured before, it also displays the Master bridge. The Master bridge is the CIST Regional Root which in this case is also the CIST Root.