This is the fourth lab in my JNCIP-ENT preparation series. It compares the behavior of three spanning-tree protocols on a single physical topology. The objective is to build a small redundant switching design, observe its behavior under RSTP, convert the same topology to MSTP, and finally convert it to VSTP.
Overview
The topology consists of four switches. SW1 and SW2 form the distribution pair, SW3 and SW4 are dual-homed access switches, and a direct trunk connects the two distribution switches. Four VLANs are configured: 10, 20, 100, and 200.
The difference between the three protocols can be summarized as follows:
- RSTP: one spanning tree for the entire Layer 2 domain
- MSTP: a small number of trees, each carrying a group of VLANs
- VSTP: one tree per VLAN
Under plain RSTP, every VLAN follows the same forwarding and blocking decisions, because there is only one logical tree. In a redundant topology this means one uplink is blocked. If one VLAN group can instead be directed toward SW1 and another toward SW2, both uplinks carry traffic and the design achieves load sharing. MSTP accomplishes this by mapping VLANs into a small number of instances. VSTP gives every VLAN an independent tree, which provides the most granular control at the cost of additional control-plane overhead meaning the switch must process more BPDUs and maintain separate protocol state for each VLAN.
Step 1: Observe the RSTP Limitation
The base build already has all trunks configured and plain RSTP enabled, so the first step is purely observational.
On SW3:
show spanning-tree bridgeshow spanning-tree interfaceThe output demonstrates three points:
- a single switch is elected root for the entire topology
- all four VLANs share the same Layer 2 tree
- one redundant path is blocked, and it is blocked for every VLAN
This is the limitation the lab addresses. The blocked uplink represents wasted capacity it carries no traffic until a failure occurs.
Example output on SW3:
show spanning-tree bridge:
show spanning-tree interface:
Step 2: Convert the Topology to MSTP
The low VLAN group (10, 20) will go into MST instance 1 and the high VLAN group (100, 200) into MST instance 2.
MSTP cannot coexist with RSTP on the same switch, so RSTP must be removed first.
On all four switches:
configuredelete protocols rstpset protocols mstp configuration-name labset protocols mstp revision-level 1set protocols mstp msti 1 vlan 10set protocols mstp msti 1 vlan 20set protocols mstp msti 2 vlan 100set protocols mstp msti 2 vlan 200set protocols mstp interface xe-0/0/0set protocols mstp interface xe-0/0/1commit and-quitOn SW1 and SW2 only, enable MSTP on the inter-distribution trunk:
configureset protocols mstp interface xe-0/0/2commit and-quitConfiguration details:
| Command | Purpose |
|---|---|
set protocols mstp configuration-name lab | Names the MST region; must match on every switch in the region |
set protocols mstp revision-level 1 | Sets the region revision; must also match on every switch |
set protocols mstp msti 1 vlan 10 | Maps VLAN 10 into MST instance 1 |
set protocols mstp msti 2 vlan 100 | Maps VLAN 100 into MST instance 2 |
set protocols mstp interface xe-0/0/0 | Enables MSTP on a participating trunk interface |
The region name, the revision level, and the VLAN-to-instance mapping together define the MST region. All three values must match on every member switch. This requirement is fundamental: switches that disagree on any of the three are, by definition, in different regions.
Step 3: Verify the Region Before Examining Roots
On every switch:
show spanning-tree mstp configurationVerify the following:
- the region name is
lab - the revision is
1 - the digest is identical on all four switches
msti 1owns VLANs10and20, andmsti 2owns VLANs100and200
The digest is a checksum computed over the region configuration, and it serves as proof that the switches agree. A switch whose digest differs from its neighbors is operating in a separate region regardless of how similar its configuration appears.
Example output on SW3:
Step 4: Assign Roots to SW1 and SW2
With default priorities, the switch with the lowest MAC address is elected root for every instance. This is valid MSTP behavior, but it provides no load sharing. So we will assign roots explicitly.
On SW1:
configureset protocols mstp bridge-priority 4kset protocols mstp msti 1 bridge-priority 4kset protocols mstp msti 2 bridge-priority 8kcommit and-quitOn SW2:
configureset protocols mstp msti 1 bridge-priority 8kset protocols mstp msti 2 bridge-priority 4kcommit and-quitThis configuration makes SW1 the CIST root and the root for msti 1, while SW2 becomes the root for msti 2. The result is verified on SW3:
show spanning-tree interface msti 1 detailshow spanning-tree interface msti 2 detailThe output should show:
msti 1selectingSW1as rootmsti 2selectingSW2as root- a different root port on
SW3for each instance
Both uplinks now carry traffic, each for a different VLAN group, while the topology remains a single region with only two instances. This is the central argument for MSTP: per-group path control without the cost of a separate control-plane instance for every VLAN.
Example output on SW3:
show spanning-tree interface msti 1 detail:
show spanning-tree interface msti 2 detail:
Step 5: Convert the Same Topology to VSTP
The final conversion moves from grouped instances to per-VLAN trees. For VSTP, MSTP is removed, RSTP is retained as a fallback, and VSTP is enabled only for the four VLANs of interest.
RSTP remains configured because VSTP is applied per VLAN. VLANs 10, 20, 100, and 200 are protected by VSTP, while RSTP continues to protect any VLAN not explicitly placed under VSTP, including the default VLAN. This model also corresponds closely to Cisco's PVST+ and Rapid-PVST, in which each VLAN maintains its own spanning-tree view, which makes VSTP the natural choice for interoperability with those environments.
On all four switches:
configuredelete protocols mstpset protocols rstp interface xe-0/0/0set protocols rstp interface xe-0/0/1set protocols vstp vlan 10set protocols vstp vlan 20set protocols vstp vlan 100set protocols vstp vlan 200set protocols vstp interface xe-0/0/0set protocols vstp interface xe-0/0/1commit and-quitOn SW1 and SW2 only, add the inter-distribution trunk to both protocols:
configureset protocols rstp interface xe-0/0/2set protocols vstp interface xe-0/0/2commit and-quitThe design goal is the same as in the MSTP scenario, but it is now expressed per VLAN rather than per instance.
On SW1:
configureset protocols vstp vlan 10 bridge-priority 4kset protocols vstp vlan 20 bridge-priority 4kset protocols vstp vlan 100 bridge-priority 8kset protocols vstp vlan 200 bridge-priority 8kcommit and-quitOn SW2:
configureset protocols vstp vlan 10 bridge-priority 8kset protocols vstp vlan 20 bridge-priority 8kset protocols vstp vlan 100 bridge-priority 4kset protocols vstp vlan 200 bridge-priority 4kcommit and-quitStep 6: Verify Per-VLAN Control on SW3
On SW3, confirm that VLAN 10 and VLAN 100 make independent path decisions:
show spanning-tree bridge vlan-id 10show spanning-tree bridge vlan-id 100The output should show:
- VLAN
10selectingSW1as root - VLAN
100selectingSW2as root - different root ports on
SW3for different VLANs
This output captures the VSTP trade-off precisely: each VLAN has an independent tree, which provides the most granular control available, but the switch must process more BPDUs and maintain spanning-tree state separately for each VLAN. The overhead difference can be observed directly with monitor traffic interface xe-0/0/0 no-resolve under each protocol. MSTP carries information for all instances within a single BPDU stream per port, while VSTP generates visibly more per-VLAN control-plane traffic.
Example output on SW3:
show spanning-tree bridge vlan-id 10:
show spanning-tree bridge vlan-id 100:
Key Takeaways
RSTP provides a single tree and therefore a single blocked uplink for all VLANs. MSTP provides a small number of trees at low control-plane cost, with the region digest as the single configuration element that must be consistent on every switch. VSTP provides one tree per VLAN, which is the most control and the most overhead.
As a design guideline, MSTP with two or three well-chosen instances is the appropriate answer for most environments, while VSTP is best reserved for cases that genuinely require per-VLAN control or PVST+ interoperability
