10-MSTP Configuration

Download

Table of Contents

Chapter 1 MSTP Configuration. 1-1

1.1 MSTP Overview. 1-1

1.1.1 Introduction to STP. 1-1

1.1.2 Introduction to MSTP. 1-11

1.1.3 Protocols and Standards. 1-18

1.2 Configuration Task List 1-18

1.3 Configuring the Root Bridge. 1-20

1.3.1 Configuring an MST Region. 1-20

1.3.2 Specifying the Root Bridge or a Secondary Root Bridge. 1-22

1.3.3 Configuring the Work Mode of MSTP Device. 1-23

1.3.4 Configuring the Priority of the Current Device. 1-24

1.3.5 Configuring the Maximum Hops of an MST Region. 1-25

1.3.6 Configuring the Network Diameter of a Switched Network. 1-26

1.3.7 Configuring Timers of MSTP. 1-27

1.3.8 Configuring the Timeout Factor 1-29

1.3.9 Configuring the Maximum Transmission Rate of Ports. 1-29

1.3.10 Configuring Ports as Edge Ports. 1-30

1.3.11 Configuring Whether Ports Connect to Point-to-Point Links. 1-31

1.3.12 Configuring the Mode a Port Uses to Recognize/Send MSTP Packets. 1-33

1.3.13 Enabling the Output of Port State Transition Information. 1-34

1.3.14 Enabling the MSTP Feature. 1-34

1.4 Configuring Leaf Nodes. 1-35

1.4.1 Configuring an MST Region. 1-35

1.4.2 Configuring the Work Mode of MSTP. 1-35

1.4.3 Configuring the Timeout Factor 1-35

1.4.4 Configuring the Maximum Transmission Rate of Ports. 1-35

1.4.5 Configuring Ports as Edge Ports. 1-36

1.4.6 Configuring Path Costs of Ports. 1-36

1.4.7 Configuring Port Priority. 1-38

1.4.8 Configuring Whether Ports Connect to Point-to-Point Links. 1-39

1.4.9 Configuring the Mode a Port Uses to Recognize/Send MSTP Packets. 1-39

1.4.10 Enabling Output of Port State Transition Information. 1-39

1.4.11 Enabling the MSTP Feature. 1-39

1.5 Performing mCheck. 1-40

1.5.1 Configuration Prerequisites. 1-40

1.5.2 Configuration Procedure. 1-40

1.5.3 Configuration Example. 1-41

1.6 Configuring Digest Snooping. 1-41

1.6.1 Configuration Prerequisites. 1-41

1.6.2 Configuration Procedure. 1-42

1.6.3 Configuration Example. 1-43

1.7 Configuring No Agreement Check. 1-44

1.7.1 Prerequisites. 1-45

1.7.2 Configuration Procedure. 1-45

1.7.3 Configuration Example. 1-46

1.8 Configuring Protection Functions. 1-46

1.8.1 Configuration prerequisites. 1-47

1.8.2 Enabling BPDU Guard. 1-47

1.8.3 Enabling Root Guard. 1-48

1.8.4 Enabling Loop Guard. 1-49

1.8.5 Enabling TC-BPDU Attack Guard. 1-50

1.9 Displaying and Maintaining MSTP. 1-51

1.10 MSTP Configuration Example. 1-51

 


Chapter 1  MSTP Configuration

When configuring MSTP, go to these sections for information you are interested in:

l           MSTP Overview

l           Configuring the Root Bridge

l           Configuring Leaf Nodes

l           Performing mCheck

l           Configuring Protection Functions

l           Displaying and Maintaining MSTP

1.1  MSTP Overview

1.1.1  Introduction to STP

I. Why STP?

The Spanning Tree Protocol (STP) was established based on the 802.1d standard of IEEE to eliminate physical loops at the data link layer in a local area network (LAN). Devices running this protocol detect loops in the network by exchanging information with one another and eliminate loops by selectively blocking certain ports until the loop structure is pruned into a loop-free network structure. This avoids proliferation and infinite recycling of packets that would occur in a loop network and prevents deterioration of the packet processing capability of network devices caused by duplicate packets received.

In the narrow sense, STP refers to the STP protocol defined in IEEE 802.1d; in the broad sense, it refers to the STP protocol defined in IEEE 802.1d and various enhanced spanning tree protocols derived from the STP protocol.

II. Protocol Packets of STP

STP uses bridge protocol data units (BPDUs), also known as configuration messages, as its protocol packets.

STP identifies the network topology by transmitting BPDUs between STP-compliant network devices. BPDUs contain sufficient information for the network devices to complete the spanning tree calculation.

In STP, BPDUs come in two types:

l           Configuration BPDUs, used for calculating spanning trees and maintaining the spanning tree topology.

l           Topology change notification (TCN) BPDUs, used for notifying concerned devices of network topology changes, if any.

III. Basic concepts in STP

1)         Root bridge

A tree network must have a root; hence the concept of “root bridge” has been introduced in STP.

There is one and only one root bridge in the entire network, and the root bridge can change alone with changes of the network topology. Therefore, the root bridge is not fixed.

Upon network convergence, the root bridge generates and sends out configuration BPDUs at a certain interval, and other devices just forward the BPDUs. This mechanism ensures topological stability.

2)         Root port

On a non-root bridge device, the root port is the port nearest to the root bridge. The root port is responsible for communication with the root bridge. A non-root-bridge device has one and only one root port. The root bridge has no root port.

3)         Designated bridge and designated port

The following table describes a designated bridge and a designated port.

Table 1-1 Description of designated bridge and designated port

Classification

Designated bridge

Designated port

For a device

The device directly connected with this device and responsible for forwarding BPDUs

The port through which the designated bridge forwards BPDUs to this device

For a LAN

The device responsible for forwarding BPDUs to this LAN segment

The port through which the designated bridge forwards BPDUs to this LAN segment

 

Figure 1-1 shows designated bridges and designated ports. In the figure, AP1 and AP2, BP1 and BP2, and CP1 and CP2 are ports on Device A, Device B, and Device C respectively.

l           If Device A forwards BPDUs to Device B through AP1, the designated bridge for Device B is Device A, and the designated port is the port AP1 on Device A.

l           Two devices are connected to the LAN: Device B and Device C. If Device B forwards BPDUs to the LAN, the designated bridge for the LAN is Device B, and the designated port is the port BP2 on Device B.

Figure 1-1 A schematic diagram of designated bridges and designated ports

IV. Path cost

Path cost is a reference value used for link selection in STP. By calculating the path cost, STP selects relatively “robust” links and blocks redundant links, and finally prunes the network into loop-free tree structure.

 

&  Note:

All the ports on the root bridge are designated ports.

 

V. How STP works

STP identifies the network topology by transmitting configuration BPDUs between network devices. Configuration BPDUs contain sufficient information for network devices to complete the spanning tree calculation. Important fields in a configuration BPDU include:

l           Root bridge ID: consisting of root bridge priority and MAC address.

l           Root path cost: the cost of the shortest path to the root bridge.

l           Designated bridge ID: designated bridge priority plus MAC address.

l           Designated port ID, designated port priority plus port name.

l           Message age: age of the configuration BPDU while it propagates in the network.

l           Max age: maximum age of the configuration BPDU maintained in the device.

l           Hello time: configuration BPDU interval.

l           Forward delay: forward delay of the port.

 

&  Note:

For the convenience of description, the description and examples below involve only four parts of a configuration BPDU:

l      Root bridge ID (in the form of device priority)

l      Root path cost

l      Designated bridge ID (in the form of device priority)

l      Designated port ID (in the form of port name)

 

1)         Specific calculation process of the STP algorithm

l           Initial state

Upon initialization of a device, each port generates a BPDU with itself as the root bridge, in which the root path cost is 0, designated bridge ID is the device ID, and the designated port is the local port.

l           Selection of the optimum configuration BPDU

Each device sends out its configuration BPDUs and receives configuration BPDUs from other devices.

The process of selecting the optimum configuration BPDU is as follows:

Table 1-2 Selection of the optimum configuration BPDU

Step

Description

1

Upon receiving a configuration BPDU on a port, the device performs the following processing:

l      If the received configuration BPDU has a lower priority than that of the configuration BPDU generated by the port, the device will discard the received configuration BPDU without doing any processing on the configuration BPDU of this port.

l      If the received configuration BPDU has a higher priority than that of the configuration BPDU generated by the port, the device will replace the content of the configuration BPDU generated by the port with the content of the received configuration BPDU.

2

The device compares the configuration BPDUs of all the ports and chooses the optimum configuration BPDU.

 

&  Note:

Principle for configuration BPDU comparison:

l      The configuration BPDU that has the lowest root bridge ID has the highest priority.

l      If all the configuration BPDUs have the same root bridge ID, they will be compared for their root path costs. If the root path cost in a configuration BPDU plus the path cost corresponding to this port is S, the configuration BPDU with the smallest S value has the highest priority.

l      If all configuration BPDUs have the same root path cost, they will be compared for their designated bridge IDs, then their designated port IDs, and then the IDs of the ports on which they are received. The smaller the ID, the higher message priority.

 

l           Selection of the root bridge

At network initialization, each STP-compliant device on the network assumes itself to be the root bridge, with the root bridge ID being its own device ID. By exchanging configuration BPDUs, the devices compare one another’s root bridge ID. The device with the smallest root bridge ID is elected as the root bridge.

l           Selection of the root port and designated ports

The process of selecting the root port and designated ports is as follows:

Table 1-3 Selection of the root port and designated ports

Step

Description

1

A non-root-ridge device regards the port on which it received the optimum configuration BPDU as the root port.

2

Based on the configuration BPDU and the path cost of the root port, the device calculates a designated port configuration BPDU for each of the rest ports.

l      The root bridge ID is replaced with that of the configuration BPDU of the root port.

l      The root path cost is replaced with that of the configuration BPDU of the root port plus the path cost corresponding to the root port.

l      The designated bridge ID is replaced with the ID of this device.

l      The designated port ID is replaced with the ID of this port.

3

The device compares the calculated configuration BPDU with the configuration BPDU on the port of which the port role is to be defined, and does different things according to the comparison result:

l      If the calculated configuration BPDU is superior, the device will consider this port as the designated port, and the configuration BPDU on the port will be replaced with the calculated configuration BPDU, which will be sent out periodically.

l      If the configuration BPDU on the port is superior, the device will block this port without updating its configuration BPDU, so that the port will only receive BPDUs, but not send any, and will not forward data.

 

&  Note:

When the network topology is stable, only the root port and designated ports forward traffic, while other ports are all in the blocked state – they only receive STP packets but do not forward user traffic.

 

Once the root bridge, the root port on each non-root bridge and designated ports have been successfully elected, the entire tree-shaped topology has been constructed.

The following is an example of how the STP algorithm works. The specific network diagram is shown in Figure 1-2. In the feature, the priority of Device A is 0, the priority of Device B is 1, the priority of Device C is 2, and the path costs of these links are 5, 10 and 4 respectively.

Figure 1-2 Network diagram for the STP algorithm

l           Initial state of each device

The following table shows the initial state of each device.

Table 1-4 Initial state of each device

Device

Port name

BPDU of port

Device A

AP1

{0, 0, 0, AP1}

AP2

{0, 0, 0, AP2}

Device B

BP1

{1, 0, 1, BP1}

BP2

{1, 0, 1, BP2}

Device C

CP1

{2, 0, 2, CP1}

CP2

{2, 0, 2, CP2}

 

l           Comparison process and result on each device

The following table shows the comparison process and result on each device.

Table 1-5 Comparison process and result on each device

Device

Comparison process

BPDU of port after comparison

Device A

l      Port AP1 receives the configuration BPDU of Device B {1, 0, 1, BP1}. Device A finds that the configuration BPDU of the local port {0, 0, 0, AP1} is superior to the configuration received message, and discards the received configuration BPDU.

l      Port AP2 receives the configuration BPDU of Device C {2, 0, 2, CP1}. Device A finds that the BPDU of the local port {0, 0, 0, AP2} is superior to the received configuration BPDU, and discards the received configuration BPDU.

l      Device A finds that both the root bridge and designated bridge in the configuration BPDUs of all its ports are Device A itself, so it assumes itself to be the root bridge. In this case, it does not make any change to the configuration BPDU of each port, and starts sending out configuration BPDUs periodically.

AP1: {0, 0, 0, AP1}

AP2: {0, 0, 0, AP2}

Device B

l      Port BP1 receives the configuration BPDU of Device A {0, 0, 0, AP1}. Device B finds that the received configuration BPDU is superior to the configuration BPDU of the local port {1, 0, 1, BP1}, and updates the configuration BPDU of BP1.

l      Port BP2 receives the configuration BPDU of Device C {2, 0, 2, CP2}. Device B finds that the configuration BPDU of the local port {1, 0, 1, BP2} is superior to the received configuration BPDU, and discards the received configuration BPDU.

BP1: {0, 0, 0, AP1}

BP2: {1, 0, 1, BP2}

l      Device B compares the configuration BPDUs of all its ports, and determines that the configuration BPDU of BP1 is the optimum configuration BPDU. Then, it uses BP1 as the root port, the configuration BPDUs of which will not be changed.

l      Based on the configuration BPDU of BP1 and the path cost of the root port (5), Device B calculates a designated port configuration BPDU for BP2 {0, 5, 1, BP2}.

l      Device B compares the calculated configuration BPDU {0, 5, 1, BP2} with the configuration BPDU of BP2. If the calculated BPDU is superior, BP2 will act as the designated port, and the configuration BPDU on this port will be replaced with the calculated configuration BPDU, which will be sent out periodically.

Root port BP1:

{0, 0, 0, AP1}

Designated port BP2:

{0, 5, 1, BP2}

Device C

l      Port CP1 receives the configuration BPDU of Device A {0, 0, 0, AP2}. Device C finds that the received configuration BPDU is superior to the configuration BPDU of the local port {2, 0, 2, CP1}, and updates the configuration BPDU of CP1.

l      Port CP2 receives the configuration BPDU of port BP2 of Device B {1, 0, 1, BP2} before the message was updated. Device C finds that the received configuration BPDU is superior to the configuration BPDU of the local port {2, 0, 2, CP2}, and updates the configuration BPDU of CP2.

CP1: {0, 0, 0, AP2}

CP2: {1, 0, 1, BP2}

By comparison:

l      The configuration BPDU of CP1 is elected as the optimum configuration BPDU, so CP1 is identified as the root port, the configuration BPDUs of which will not be changed.

l      Device C compares the calculated designated port configuration BPDU {0, 10, 2, CP2} with the configuration BPDU of CP2, and CP2 becomes the designated port, and the configuration BPDU of this port will be replaced with the calculated configuration BPDU.

Root port CP1:

{0, 0, 0, AP2}

Designated port CP2:

{0, 10, 2, CP2}

l      Next, port CP2 receives the updated configuration BPDU of Device B {0, 5, 1, BP2}. Because the received configuration BPDU is superior to its old one, Device C launches a BPDU update process.

l      At the same time, port CP1 receives configuration BPDUs periodically from Device A. Device C does not launch an update process after comparison.

CP1: {0, 0, 0, AP2}

CP2: {0, 5, 1, BP2}

By comparison:

l      Because the root path cost of CP2 (9) (root path cost of the BPDU (5) plus path cost corresponding to CP2 (4)) is smaller than the root path cost of CP1 (10) (root path cost of the BPDU (0) + path cost corresponding to CP2 (10)), the BPDU of CP2 is elected as the optimum BPDU, and CP2 is elected as the root port, the messages of which will not be changed.

l      After comparison between the configuration BPDU of CP1 and the calculated designated port configuration BPDU, port CP1 is blocked, with the configuration BPDU of the port remaining unchanged, and the port will not receive data from Device A until a spanning tree calculation process is triggered by a new condition, for example, the link from Device B to Device C becomes down.

Blocked port CP2:

{0, 0, 0, AP2}

Root port CP2:

{0, 5, 1, BP2}

 

After the comparison processes described in the table above, a spanning tree with Device A as the root bridge is stabilized, as shown in Figure 1-3.

Figure 1-3 The final calculated spanning tree

 

&  Note:

To facilitate description, the spanning tree calculation process in this example is simplified, while the actual process is more complicated.

 

2)         The BPDU forwarding mechanism in STP

l           Upon network initiation, every switch regards itself as the root bridge, generates configuration BPDUs with itself as the root, and sends the configuration BPDUs at a regular interval of hello time.

l           If it is the root port that received the configuration BPDU and the received configuration BPDU is superior to the configuration BPDU of the port, the device will increase message age carried in the configuration BPDU by a certain rule and start a timer to time the configuration BPDU while it sends out this configuration BPDU through the designated port.

l           If the configuration BPDU received on the designated port has a lower priority than the configuration BPDU of the local port, the port will immediately send out its better configuration BPDU in response.

l           If a path becomes faulty, the root port on this path will no longer receive new configuration BPDUs and the old configuration BPDUs will be discarded due to timeout. In this case, the device will generate a configuration BPDU with itself as the root and sends out the BPDU. This triggers a new spanning tree calculation process so that a new path is established to restore the network connectivity.

However, the newly calculated configuration BPDU will not be propagated throughout the network immediately, so the old root ports and designated ports that have not detected the topology change continue forwarding data along the old path. If the new root port and designated port begin to forward data as soon as they are elected, a temporary loop may occur.

3)         STP timers

STP calculations need three important timing parameters: forward delay, hello time, and max age.

l           Forward delay is the delay time for device state transition. A path failure will cause re-calculation of the spanning tree, and the spanning tree structure will change accordingly. However, the new configuration BPDU as the calculation result cannot be propagated throughout the network immediately. If the newly elected root port and designated ports start to forward data right away, a temporary loop is likely to occur. For this reason, as a mechanism for state transition in STP, a newly elected root port or designated port requires twice the forward delay time before transitioning to the forwarding state, when the new configuration BPDU has been propagated throughout the network.

l           Hello time is the time interval at which a device sends hello packets to the surrounding devices to make sure that the paths are fault-free.

l           Max age is a parameter used to determine whether a configuration BPDU held in the device has expired. A configuration BPDU beyond the max age will be discarded.

1.1.2  Introduction to MSTP

I. Why MSTP

1)         Disadvantages of STP and RSTP

STP does not support rapid state transition of ports. A newly elected root port or designated port must wait twice the forward delay time before transitioning to the forwarding state, even if it is a port on a point-to-point link or it is an edge port, which directly connects to a user terminal rather than to another device or a shared LAN segment.

The rapid spanning tree protocol (RSTP) is an optimized version of STP. RSTP allows a newly elected root port or designated port to enter the forwarding state much quicker under certain conditions than in STP. As a result, it takes a shorter time for the network to reach the final topology stability.

 

&  Note:

l      In RSTP, a newly elected root port can enter the forwarding state rapidly if this condition is met: The old root port on the device has stopped forwarding data and the upstream designated port has started forwarding data.

l      In RSTP, a newly elected designated port can enter the forwarding state rapidly if this condition is met: The designated port is an edge port or a port connected with a point-to-point link. If the designated port is an edge port, it can enter the forwarding state directly; if the designated port is connected with a point-to-point link, it can enter the forwarding state immediately after the device undergoes handshake with the downstream device and gets a response.

 

Although RSTP support rapid network convergence, it has the same drawback as STP does: All bridges within a LAN share the same spanning tree, so redundant links cannot be blocked based on VLANs, and the packets of all VLANs are forwarded along the same spanning tree.

2)         Features of MSTP

The multiple spanning tree protocol (MSTP) overcomes the shortcomings of STP and RSTP. In addition to support for rapid network convergence, it also allows data flows of different VLANs to be forwarded along their own paths, thus providing a better load sharing mechanism for redundant links. For description about VLANs, refer to VLAN Configuration.

MSTP features the following:

l           MSTP supports mapping VLANs to MST instances by means of a VLAN-to-instance mapping table. MSTP can save communication overheads and resource usage by mapping multiple VLANs to one MST instance.

l           MSTP divides a switched network into multiple regions, each containing multiple spanning trees that are independent of one another.

l           MSTP prunes loop networks into a loop-free tree, thus avoiding proliferation and endless recycling of packets in a loop network. In addition, it provides multiple redundant paths for data forwarding, thus supporting load balancing of VLAN data in the data forwarding process.

l           MSTP is compatible with STP and RSTP.

II. Basic concepts in MSTP

Assume that all the four switches in Figure 1-4 are running MSTP. In light with the diagram, the following paragraphs will present some basic concepts of MSTP.

Figure 1-4 Basic concepts in MSTP

1)         MST region

A multiple spanning tree region (MST region) is composed of multiple devices in a switched network and network segments among them. These devices have the following characteristics:

l           All are MSTP-enabled,

l           They have the same region name,

l           They have the same VLAN-to-instance mapping configuration,

l           They have the same MSTP revision level configuration, and

l           They are physically linked with one another.

For example, all the devices in region A0 in Figure 1-4 have the same MST region configuration:

l           The same region name,

l           The same VLAN-to-instance mapping (VLAN 1 is mapped to MST instance 1, VLAN 2 to MST instance 2, and the rest to the command and internal spanning tree (CIST). CIST refers to MST instance 0), and

l           The same MSTP revision level (not shown in the figure).

Multiple MST regions can exist in a switched network. You can use an MSTP command to group multiple devices to the same MST region.

2)         VLAN-to-instance mapping table

As an attribute of an MST region, the VLAN-to-instance mapping table describes the mapping relationships between VLANs and MST instances. In Figure 1-4, for example, the VLAN-to-instance mapping table of region A0 describes that the same region name, the same VLAN-to-instance mapping (VLAN 1 is mapped to MST instance 1, VLAN 2 to MST instance 2, and the rest to CIST). MSTP achieves load balancing by means of the VLAN-to-instance mapping table.

3)         IST

Internal spanning tree (IST) is a spanning tree that runs in an MST region.

ISTs in all MST regions and the common spanning tree (CST) jointly constitute the common and internal spanning tree (CIST) of the entire network. An IST is a section of the CIST in the given MST region.

In Figure 1-4, for example, the CIST has a section in each MST region, and this section is the IST in the respective MST region.

4)         CST

The CST is a single spanning tree that connects all MST regions in a switched network. If you regard each MST region as a “device”, the CST is a spanning tree calculated by these devices through STP or RSTP. For example, the red lines in Figure 1-4 describe the CST.

5)         CIST

Jointly constituted by ISTs and the CST, the CIST is a single spanning tree that connects all devices in a switched network.

In Figure 1-4, for example, the ISTs in all MST regions plus the inter-region CST constitute the CIST of the entire network.

6)         MSTI

Multiple spanning trees can be generated in an MST region through MSTP, one spanning tree being independent of another. Each spanning tree is referred to as a multiple spanning tree instance (MSTI). In Figure 1-4, for example, multiple spanning tree can exist in each MST region, each spanning tree corresponding to a VLAN. These spanning trees are called MSTIs.

7)         Regional root bridge

The root bridge of the IST or an MSTI within an MST region is the regional root bridge of the MST or that MSTI. Based on the topology, different spanning trees in an MST region may have different regional roots.

For example, in region D0 in Figure 1-4, the regional root of instance 1 is device B, while that of instance 2 is device C.

8)         Common root bridge

The common root bridge is the root bridge of the CIST.

In Figure 1-4, for example, the common root bridge is a device in region A0.

9)         Boundary port

A boundary port is a port that connects an MST region to another MST configuration, or to a single spanning-tree region running STP, or to a single spanning-tree region running RSTP.

During MSTP calculation, a boundary port assumes the same role on the CIST and on MST instances. Namely, if a boundary port is the master port on the CIST, it is also the master port on all MST instances within this region. In Figure 1-4, for example, if a device in region A0 is interconnected with the first port of a device in region D0 and the common root bridge of the entire switched network is located in region A0, the first port of that device in region D0 is the boundary port of region D0.

 

&  Note:

Currently, the device is not capable of recognizing boundary ports. When the device interworks with a third party’s device that supports boundary port recognition, the third party’s device may malfunction in recognizing a boundary port.

 

10)     Roles of ports

In the MSTP calculation process, port roles include root port, designated port, master port, alternate port, backup port, and so on.

l           Root port: a port responsible for forwarding data to the root bridge.

l           Designated port: a port responsible for forwarding data to the downstream network segment or device.

l           A master port connects an MST region to the common root. The path from the master port to the common root is the shortest path between the MST region and the common root. In the CST, the master port is the root port of the region, which is considered as a node. The master port is a special boundary port. It is a root port in the IST/CIST while a master port in the other MSTIs.

l           Alternate port: The standby port for the root port or master port. When the root port or master port is blocked, the alternate port becomes the new root port or master port.

l           Backup port: The backup port of designated ports. When a designated port is blocked, the backup port becomes a new designated port and starts forwarding data without delay. When a loop occurs while two ports of the same MSTP device are interconnected, the device will block either of the two ports, and the backup port is that port to be blocked.

A port can assume different roles in different MST instances.

Figure 1-5 Port roles

Figure 1-5 helps understand these concepts. Where,

l           Devices A, B, C, and D constitute an MST region.

l           Port 1 and port 2 of device A connect to the common root bridge.

l           Port 5 and port 6 of device C form a loop.

l           Port 3 and port 4 of device D connect downstream to other MST regions.

11)     Port states

In MSTP, port states fall into the following tree:

l           Forwarding: the port learns MAC addresses and forwards user traffic;

l           Learning: the port learns MAC addresses but does not forward user traffic; 

l           Discarding: the port neither learns MAC addresses nor forwards user traffic.

 

&  Note:

When in different MST instances, a port can be in different states.

l      The role a boundary port plays in an MSTI is consistent with the role it plays in the CIST. The master port, which is a root port in the CIST while a master port in the other MSTIs, is an exception.

l      For example, in Figure 1-5, port 1 on switch A is a boundary port. It is a root port in the CIST while a master port in all the other MSTIs in the region.

 

A port state is not exclusively associated with a port role. Table 1-6 lists the port state(s) supported by each port role (“√” indicates that the port supports this state, while “—“ indicates that the port does not support this state).

Table 1-6 Ports states supported by different port roles

Role

State

Root port/Master port

Designated port

Alternate port

Backup port

Forwarding

Learning

Discarding

 

III. How MSTP works

MSTP divides an entire Layer 2 network into multiple MST regions, which are interconnected by a calculated CST. Inside an MST region, multiple spanning trees are generated through calculation, each spanning tree called an MST instance. Among these MST instances, instance 0 is the IST, while all the others are MSTIs. Similar to STP, MSTP uses configuration BPDUs to calculate spanning trees. The only difference between the two protocols is that an MSTP BPDU carries the MSTP configuration on the device from which this BPDU is sent.

1)         CIST calculation

By comparison of configuration BPDUs, the device with the highest priority is elected as the root bridge of the CIST. MSTP generates an IST within each MST region through calculation, and, at the same time, MSTP regards each MST region as a single device and generates a CST among these MST regions through calculation. The CST and ISTs constitute the CIST of the entire network.

2)         MSTI calculation

Within an MST region, MSTP generates different spanning tree instances for different VLANs based on the VLAN-to-instance mappings. MSTP performs a separate calculation process, which is similar to spanning tree calculation in STP, for each spanning tree. For details, refer to How STP works.

In MSTP, a VLAN packet is forwarded along the following paths:

l           Within an MST region, the packet is forwarded along the corresponding MSTI.

l           Between two MST regions, the packet is forwarded along the CST.

IV. Implementation of MSTP on devices

MSTP is compatible with STP and RSTP. STP and RSTP protocol packets can be recognized by devices running MSTP and used for spanning tree calculation.

In addition to basic MSTP functions, many management-facilitating special functions are provided, as follows:

l           Root bridge hold

l           Root bridge backup

l           Root guard

l           BPDU guard

l           Loop guard

l           TC-BPDU guard

1.1.3  Protocols and Standards

MSTP is documented in:

l           IEEE 802.1d: Spanning Tree Protocol

l