Ethernet Switching and Spanning Tree · Topic 3 of 3

MSTP and VSTP

JN0-650 study page on MSTP regions, instances and CIST, VSTP per-VLAN spanning tree on Junos, bridge priority, edge ports and verification commands.

  • 5 min
In a nutshell
  • MSTP region = same name, revision level and VLAN to instance mapping.
  • MSTI 1 and up carry mapped VLANs; the CIST (instance 0) carries unmapped VLANs and connects regions.
  • Bridge priority default 32768; lower wins; steps of 4096.

What it is

A single spanning tree blocks the same links for every VLAN, so some links carry no traffic. MSTP (Multiple Spanning Tree Protocol, IEEE 802.1s) groups VLANs into a few instances, each with its own tree and its own root, so different VLANs can use different links.

VSTP (VLAN Spanning Tree Protocol) is the Junos implementation of per-VLAN spanning tree. It runs one instance for each VLAN, and it can interoperate with Cisco PVST+ and Rapid PVST+.

VLANs 10 and 20mapped toMSTI 1Root switch AtreeLinks usedVLANs 30 and 40mapped toMSTI 2Root switch BtreeOther links used

How it works

MSTP concepts

TermMeaning
MST regionSwitches with the same name, revision level and VLAN to instance mapping
MSTIA spanning tree instance for a set of VLANs, numbered 1 and up
CISTThe common and internal spanning tree, instance 0, which also links regions and carries unmapped VLANs
ISTThe part of the CIST inside one region
CSTThe common spanning tree that connects regions and non-MSTP bridges

Switches belong to the same region only if the configuration name, the revision level and the VLAN to instance mapping all match. If one differs, the switch is in a different region and treats its neighbor as outside. A VLAN not mapped to any instance belongs to the CIST.

set protocols mstp configuration-name REGION1
set protocols mstp revision-level 1
set protocols mstp msti 1 vlan [ 10 20 ]
set protocols mstp msti 2 vlan [ 30 40 ]
set protocols mstp msti 1 bridge-priority 4k
set protocols mstp msti 2 bridge-priority 8k
set protocols mstp interface ge-0/0/1
set protocols mstp interface ge-0/0/2

In the example, one switch gets a lower priority for instance 1, and the other for instance 2, so each becomes the root for its own set of VLANs. The default bridge priority is 32768, and the priority is a multiple of 4096.

SettingDefault or note
Bridge priority32768, lower wins, in steps of 4096
Max hops20
Port rolesRoot, designated, alternate, backup, plus master and boundary at region edges
Port statesDiscarding, learning, forwarding

Protecting the topology

set protocols mstp interface ge-0/0/5 edge
set protocols mstp bpdu-block-on-edge

An edge port connects an end host and goes forward at once. With bpdu-block-on-edge, an edge port that receives a BPDU is blocked, which prevents someone attaching a switch to a host port. The goal in all spanning tree versions is the same: never let an unexpected device become root.

VSTP

VSTP creates one spanning tree for each VLAN named under the protocol.

set protocols vstp vlan 10 bridge-priority 4k
set protocols vstp vlan 20 bridge-priority 8k
set protocols vstp vlan 10 interface ge-0/0/1
set protocols vstp vlan 20 interface ge-0/0/1
MSTPVSTP
InstancesA few, shared by many VLANsOne per VLAN
StandardIEEE 802.1sJunos per-VLAN implementation, compatible with PVST+
BPDU loadLowGrows with the number of VLANs
Interoperates withOther MSTP regions and RSTPCisco PVST+ and Rapid PVST+
Best fitLarge VLAN count, standard based designMixed vendor network that already runs per-VLAN trees
Exam tip

If a question mentions many VLANs and wants low overhead and load sharing, choose MSTP. If it mentions interoperating with Cisco per-VLAN spanning tree, choose VSTP.

Monitoring

show spanning-tree bridge
show spanning-tree interface
show spanning-tree mstp configuration

show spanning-tree bridge shows the root bridge, the local bridge ID and the instance. show spanning-tree interface shows the role and state of each port. show spanning-tree mstp configuration shows the region name, revision and the VLAN to instance mapping, which you compare between switches.

SymptomLikely cause
Switch will not join the regionName, revision or VLAN mapping differs
Wrong switch is rootBridge priority not set, so the lowest MAC address wins
All VLANs use one pathVLANs not mapped to separate instances, or the same root for both
A VLAN is not forwarded on a linkVLAN missing in the instance mapping on one side, or a blocked port in that instance
Edge port goes downbpdu-block-on-edge blocked it after a BPDU
Compare regionMSTP configuration outputsame?Check rootBridge outputexpected?Check port rolesInterface output
Watch out

The VLAN to instance mapping is part of the region identity. Adding a VLAN to an instance on one switch only silently moves that switch into another region.

Common mistakes

Leaving the revision level different. A small mismatch creates a separate region.

Not setting bridge priorities. The root election falls to the lowest MAC address.

Using one root for all instances. There is then no load sharing.

Forgetting unmapped VLANs go to the CIST. They follow instance 0, not an MSTI.

Running VSTP on hundreds of VLANs. Each one sends BPDUs and uses resources.

What to remember for the exam

  • MSTP region = same name, revision level and VLAN to instance mapping.
  • MSTI 1 and up carry mapped VLANs; the CIST (instance 0) carries unmapped VLANs and connects regions.
  • Bridge priority default 32768; lower wins; steps of 4096.
  • MSTP is IEEE 802.1s; VSTP is per-VLAN and interoperates with Cisco PVST+.
  • Edge ports and bpdu-block-on-edge protect against unexpected switches.
  • show spanning-tree mstp configuration, bridge and interface are the main verification commands.

Check yourself

  • What three values must match for two switches to share an MST region?

    The configuration name, the revision level and the VLAN to instance mapping.

  • Where does a VLAN that is not mapped to any MSTI go?

    Into the CIST, which is instance 0.

  • Which protocol runs one spanning tree per VLAN and interoperates with Cisco PVST+?

    VSTP.

Topic 3 of 3 in Ethernet Switching and Spanning Tree

Test yourself on Ethernet Switching and Spanning Tree

The full Juniper JNCIP-ENT JN0-650 question bank has 858 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 Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.