Configuring Spanning Tree
Configuration Example for MSTP
User Guide
351
2) Enable the spanning tree function on port 1/0/1 and port 1/0/2, and specify the path
cost of port 1/0/2 in instance 2 as 300000.
Switch(config)#interface gigabitEthernet 1/0/2
Switch(config-if)#spanning-tree
Switch(config-if)#spanning-tree mst instance 2 cost 300000
Switch(config-if)#exit
Switch(config)#interface gigabitEthernet 1/0/1
Switch(config-if)#spanning-tree
Switch(config-if)#exit
3) Configure the region name as 1, the revision number as 100; map VLAN101-VLAN103
to instance 1; map VLAN104-VLAN106 to instance 2; configure the priority of Switch B
in instance 1 as 0 to set it as the root bridge in instance 1:
Switch(config)#spanning-tree mst configuration
Switch(config-mst)#name 1
Switch(config-mst)#revision 100
Switch(config-mst)#instance 1 vlan 101-103
Switch(config-mst)#instance 2 vlan 104-106
Switch(config-mst)#exit
Switch(config)#spanning-tree mst instance 1 priority 0
Switch(config)#end
Switch#copy running-config startup-config
■
Configurations for Switch C
1) Configure the spanning tree mode as MSTP, then enable spanning tree function
globally.
Switch#configure
Switch(config)#spanning-tree mode mstp
Switch(config)#spanning-tree
2) Enable the spanning tree function on port 1/0/1 and port 1/0/2.
Switch(config)#interface range gigabitEthernet 1/0/1-2
Switch(config-if-range)#spanning-tree
Switch(config-if-range)#exit
Downloaded from