Spanning Tree Protocol · Topic 2 of 3
MSTP Concepts
Understand multiple spanning tree: instances that map VLANs to separate trees, regions defined by name and revision, and the CST and CIST between regions.
- 5 min
- Includes a diagram
- MSTP maps groups of VLANs to instances, each with its own spanning tree.
- Instance 0 is always present and carries unmapped VLANs.
- A region needs the same name, revision and VLAN mapping on all its bridges.
What it is
MSTP lets one network run several spanning trees at once, with each VLAN mapped to one of them.
With plain RSTP there is one tree for all VLANs. A link that is blocked is blocked for every VLAN, so its capacity is wasted. With MSTP, VLANs are grouped into instances, and each instance can block different links.
MSTP is defined in IEEE 802.1s, now part of 802.1Q. It is backward compatible with RSTP and STP.
How it works
Instances, regions and a common tree between regions fit together to give load balancing without a tree per VLAN.
Instances
An instance is a spanning tree that serves a set of VLANs.
Instance 0 always exists and carries every VLAN that has no other mapping. You create further instances and map VLAN IDs to them. Each instance has its own root bridge and its own port roles, so you can make the root of one instance a different switch from the root of another.
Fewer trees means less work than one tree per VLAN. A network with hundreds of VLANs may need only two or three instances.
Regions
A region is a group of bridges that share the same MSTP configuration.
For two bridges to be in the same region, three things must match exactly.
- The region name.
- The configuration revision number.
- The mapping of VLANs to instances.
If any one differs, the bridges are in different regions, even when they are cabled together. Mismatched mapping is the most common reason for an unexpected split.
Configuration in RouterOS
Set MSTP mode, region data, and instance mappings on the bridge.
/interface bridge set bridge1 protocol-mode=mstp region-name=campus region-revision=1
/interface bridge msti add bridge=bridge1 identifier=1 vlan-mapping=10,20 priority=0x1000
/interface bridge msti add bridge=bridge1 identifier=2 vlan-mapping=30,40 priority=0x2000
Each msti entry has an identifier, a list of VLANs and a priority for that instance. The priority works like the bridge priority in RSTP, and the lowest value wins the root election for that instance. MSTP maps VLAN IDs to instances, so in practice it is used together with bridge VLAN filtering.
Repeat the same region name, revision and mapping on every switch of the region. The priorities can differ, and should, so that each instance has its own root.
CST and CIST
Between regions, the whole region looks like one bridge.
- CST (common spanning tree): the single tree that joins all regions, and also any plain STP or RSTP bridges outside them.
- IST (internal spanning tree): instance 0 inside a region.
- CIST (common and internal spanning tree): the combination of the CST and the ISTs. It spans the whole network, and decides which links between regions are active.
Inside a region, instances 1 and above can use different paths. Between regions, there is only one tree, the CST, so load balancing across a region boundary is limited.
Compatibility with RSTP
An MSTP bridge can connect to RSTP and STP bridges.
A neighbour that does not speak MSTP sees the whole region as a single RSTP bridge. Traffic between that neighbour and the region follows the CST.
Verifying
/interface bridge msti print
/interface bridge monitor bridge1
/interface bridge port print
Check that every switch shows the same region name and revision, and that each instance has the expected root.
Keep a written table of region name, revision and VLAN mapping, and copy it to every switch exactly.
What to remember for the exam
Seven facts cover most questions on this topic.
- MSTP maps groups of VLANs to instances, each with its own spanning tree.
- Instance 0 is always present and carries unmapped VLANs.
- A region needs the same name, revision and VLAN mapping on all its bridges.
- Different roots per instance allow load balancing across links.
- The CST joins regions, and the CIST combines the CST with the internal trees.
- A neighbouring RSTP bridge sees a region as one bridge.
- In RouterOS, set
protocol-mode=mstp, then addmstientries.
A typo in the region name or a different VLAN mapping on one switch splits it into its own region without any error message.
Common mistakes
These four mistakes appear often.
Different mapping on one switch. That switch forms a separate region and the topology breaks apart.
Forgetting instance 0. VLANs not mapped to an instance follow instance 0, so they all share one tree.
One root for every instance. Without different roots, there is no load balancing.
Expecting load balancing between regions. The CST gives one tree, so it limits it.
Check yourself
Work through these three questions.
What must match for two bridges to be in the same MSTP region?
The region name, the revision number and the VLAN to instance mapping.
What is the difference between CST and CIST?
The CST is the single tree between regions, and the CIST combines it with the internal tree of each region.
How does MSTP allow load balancing?
Different instances can have different root bridges, so different VLAN groups block different links.
Topic 2 of 3 in Spanning Tree Protocol
Test yourself on Spanning Tree Protocol
The full MikroTik MTCSWE question bank has 484 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by MikroTik. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.