MSTP Configuration


802.1D, 802.1w, and 802.1s are spanning tree protocols that can avoid the loop in Layer2. You can configure the parameters of MSTP, including bridge-priority, forward-delay, max-age, and hello-time interval.

NOTE:

  • A chassis switch supports a maximum of 16 MST instances.
  • Once the spanning tree protocol is enabled on the network, the port starts to perform spanning tree calculation. Parameters such as the device priority and port priority affect spanning tree calculation, and the change of these parameters may cause network flapping. To ensure fast and stable spanning tree calculation, configure parameters such as the device priority and port priority before enabling spanning tree protocols.


Enabling Spanning Tree Mode in MSTP

admin@XorPlus# set protocols spanning-tree force-version 3
admin@XorPlus# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# 

Configuring Basic Global Parameters of MSTP

When configuring global parameters, make sure to set the forward delay to greater than Max-Age/2 + 1, or the commit will fail.

admin@XorPlus# set protocols spanning-tree mstp bridge-priority 4096
admin@XorPlus# set protocols spanning-tree mstp forward-delay 20
admin@XorPlus# set protocols spanning-tree mstp hello-time 2
admin@XorPlus# set protocols spanning-tree mstp max-age 20
admin@XorPlus# set protocols spanning-tree mstp max-hops 8
admin@XorPlus# set protocols spanning-tree mstp configuration-name test1
admin@XorPlus# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# run show spanning-tree mstp bridge 
Bridge Spanning Tree Parameters
Enabled Protocol: MSTP
Root ID: 4096.08:9e:01:39:1a:fe
External Root Path Cost: 0
CIST Regional Root ID: 4096.08:9e:01:39:1a:fe
Root Port: 
CIST Internal Root Path Cost: 0
Hello Time: 2
Maximum Age: 20
Forward Delay: 20
Remaining Hops: 8
Bridge Configuration Name: test1
Bridge Configuration Digest: ac36177f50283cd4b83821d8ab26de62
Number of Topology Changes: 13
Time Since Last Topology Change: 0 days 00:00:31
Local Parameters
Bridge ID: 4096.08:9e:01:39:1a:fe
Hello Time: 2
Maximum Age: 20
Forward Delay: 20
Remaining Hops: 8
admin@XorPlus#
admin@XorPlus# set vlans vlan-id 100
admin@XorPlus# set vlans vlan-id 200
admin@XorPlus# set vlans vlan-id 300
admin@XorPlus# set vlans vlan-id 400
admin@XorPlus# commit 
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# set protocols spanning-tree mstp msti 1
admin@XorPlus# set protocols spanning-tree mstp msti 2
admin@XorPlus# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# set protocols spanning-tree mstp msti 1 vlan 100
admin@XorPlus# set protocols spanning-tree mstp msti 1 vlan 200
admin@XorPlus# set protocols spanning-tree mstp msti 2 vlan 300
admin@XorPlus# set protocols spanning-tree mstp msti 2 vlan 400
admin@XorPlus# commit 
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus#
admin@XorPlus# run show spanning-tree mstp bridge 
Bridge Spanning Tree Parameters
Enabled Protocol: MSTP
Root ID: 4096.08:9e:01:39:1a:fe
External Root Path Cost: 0
CIST Regional Root ID: 4096.08:9e:01:39:1a:fe
Root Port: 
CIST Internal Root Path Cost: 0
Hello Time: 2
Maximum Age: 20
Forward Delay: 20
Remaining Hops: 8
Bridge Configuration Name: test1
Bridge Configuration Digest: 8b5d98ca042bad0d7fa5f18744f4755d
Msti 1 Member VLANs:
100, 200, 
Msti 2 Member VLANs:
300, 400, 
Number of Topology Changes: 14
Time Since Last Topology Change: 0 days 00:02:49
Local Parameters
Bridge ID: 4096.08:9e:01:39:1a:fe
Hello Time: 2
Maximum Age: 20
Forward Delay: 20
Remaining Hops: 8
admin@XorPlus# 

Configuring MSTP Interface Parameters

admin@XorPlus# set protocols spanning-tree mstp interface ge-1/1/1 external-path-cost 30000
admin@XorPlus# set protocols spanning-tree mstp interface ge-1/1/1 internal-path-cost 10000
admin@XorPlus# set protocols spanning-tree mstp interface ge-1/1/1 edge true
admin@XorPlus# set protocols spanning-tree mstp interface ge-1/1/1 mode point-to-point 
admin@XorPlus# set protocols spanning-tree mstp interface ge-1/1/1 port-priority 100
admin@XorPlus# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# run show spanning-tree mstp interface 
Spanning Tree Interface Parameters for Instance 0
Interface Port ID Designated Designated Bridge Ext Port Int Port State Role
Port ID ID Cost Cost
---------- --------- ---------- ----------------------- --------- --------- ---------- ------
ge-1/1/1 96.1 96.1 8192.08:9e:01:39:1a:fe 30000 10000 FORWARDING EDGE 

Configuring the BPDU Filter

The BPDU filter prevents the bridge from using BPDUs for STP calculations. The switch then ignores any BPDUs that it receives.

admin@XorPlus# set protocols spanning-tree mstp interface ge-1/1/1 bpdu-filter true
admin@XorPlus# commit 
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# 

Configuring BPDU Root Guard

If a switch port receives a higher bridge-priority BPDU, it will ignore the BPDU and keep the current root-bridge as the root-bridge.

admin@XorPlus# set protocols spanning-tree mstp interface ge-1/1/1 root-guard true
admin@XorPlus# commit 
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# 

Configuring BPDU TCN-Guard

When a port is configured with TCN-guard, the port does not process or propagate any topology change information received on the configured port.

admin@XorPlus# set protocols spanning-tree mstp interface ge-1/1/1 tcn-guard true
admin@XorPlus# commit 
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# 

 Configuring MSTP BPDU-Guard

 When a port is configured with mstp bpdu-guard, the port which should not receive bpdu receives bpdu messages, it will be set to err-discard True and down. 

admin@XorPlus# set protocols spanning-tree mstp interface ge-1/1/1 bpdu-guard true
admin@XorPlus# co
Commit OK.
Save done.

If the port is down by mstp bpdu-guard, the port status as follows.

admin@XorPlus# run show interface gigabit-ethernet ge-1/1/1 
Physical interface: ge-1/1/1, Enabled, error-discard True, Physical link is Down
Interface index: 1, Mac Learning Enabled
Port mode: access
Description: User Port
Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Full
Source filtering: Disabled, Flow control: Disabled, Auto-negotiation: Enabled
Interface flags: Hardware-Down SNMP-Traps Internal: 0x0
Storm control ratio Broadcast: 1%
Interface rate limit ingress:0, egress:0
Current address: c4:39:3a:ff:2d:c1, Hardware address: c4:39:3a:ff:2d:c1
Traffic statistics:
5 sec input rate 0 bits/sec, 0 packets/sec
5 sec output rate 0 bits/sec, 0 packets/sec
Input Packets............................132
Output Packets...........................4733
Input Octets.............................11266
Output Octets............................1664371

When the port is down by mstp bpdu-guard, the port will be up after you delete bpdu-guard and disable, enable the port.

admin@XorPlus# delete protocols spanning-tree mstp interface ge-1/1/1 bpdu-guard
admin@XorPlus# commit
Commit OK.
Save done.
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 disable true
admin@XorPlus# commit
Commit OK.
Save done.
admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 disable false
admin@XorPlus# commit
Commit OK.
Save done.
admin@XorPlus# run show interface gigabit-ethernet ge-1/1/1
Physical interface: ge-1/1/1, Enabled, error-discard False, Physical link is Up
Interface index: 1, Mac Learning Enabled
Description: User Port
Link-level type: Ethernet, MTU: 1514, Speed: 1Gb/s, Duplex: Full
Source filtering: Disabled, Flow control: Disabled, Auto-negotiation: Disabled
Interface flags: Hardware-Down SNMP-Traps Internal: 0x0
Storm control ratio Broadcast: 1%
Interface rate limit  ingress:0, egress:0
Current address: c4:39:3a:ff:2d:c1, Hardware address: c4:39:3a:ff:2d:c1
Traffic statistics:
  5 sec input rate 0 bits/sec, 0 packets/sec
  5 sec output rate 688 bits/sec, 0 packets/sec
  Input Packets............................132
  Output Packets...........................4736
  Input Octets.............................11266
  Output Octets............................1664755

Disabling/Enabling MSTP

If you disable MSTP, the port will stay in forwarding status and cease to send BPDUs.

admin@XorPlus# set protocols spanning-tree enable false
admin@XorPlus# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# 
admin@XorPlus# run show spanning-tree mstp interface 
Spanning Tree Interface Parameters for Instance 0
Interface Port ID Designated Designated Bridge Ext Port Int Port State Role
Port ID ID Cost Cost
--------- ------- ---------- ----------------------- -------- -------- ---------- -------------
ge-1/1/1 96.1 96.1 8192.08:9e:01:39:1a:fe 30000 10000 FORWARDING MSTP DISABLED
ge-1/1/2 128.2 128.2 8192.08:9e:01:39:1a:fe 20000 20000 FORWARDING MSTP DISABLED
ge-1/1/13 128.13 128.13 8192.08:9e:01:39:1a:fe 20000 20000 FORWARDING MSTP DISABLED 
admin@XorPlus# set protocols spanning-tree enable true
admin@XorPlus# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# 
admin@XorPlus# run show spanning-tree mstp interface 
Spanning Tree Interface Parameters for Instance 0
Interface Port ID Designated Designated Bridge Ext Port Int Port State Role
Port ID ID Cost Cost
--------- ------- ---------- ----------------------- -------- -------- ---------- -----------
ge-1/1/1 96.1 96.1 8192.08:9e:01:39:1a:fe 30000 10000 FORWARDING EDGE 
ge-1/1/2 128.2 128.2 8192.08:9e:01:39:1a:fe 20000 20000 FORWARDING EDGE 
ge-1/1/13 128.13 128.13 8192.08:9e:01:39:1a:fe 20000 20000 FORWARDING DESIGNATED 

Configuring Root Guard

Configure Root Guard to protect devices or links. If a port is enabled with the root guard function, its port role on all instances can only be the designated port. Once the port that is enabled with root guard receives BPDUs with a higher priority, the port enters the Discarding state and does not forward packets. If the port does not receive any BPDUs with a higher priority for a long time, the port automatically returns to the Forwarding state.

admin@XorPlus# set protocols spanning-tree mstp interface te-1/1/3 root-guard true
admin@XorPlus# commit

Copyright © 2024 Pica8 Inc. All Rights Reserved.