拓扑:api
SW1配置:网络
spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
name mst
revision 1
instance 1 vlan 10-19
instance 2 vlan 20-29
!
spanning-tree mst 1-2 priority 24576
!
interface Ethernet0/0
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/1
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10ide
SW2配置:spa
spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
name mst
revision 1
instance 1 vlan 10-19
instance 2 vlan 20-29
!
spanning-tree mst 1-2 priority 28672
!
interface Ethernet0/0
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/1
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 103d
SW3配置:blog
spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
name mst
revision 2
instance 1 vlan 10-19
instance 2 vlan 20-29
!
spanning-tree mst 1-2 priority 24576
!
interface Ethernet0/0
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/1
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/2
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10get
SW4配置:it
spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
name mst
revision 2
instance 1 vlan 10-19
instance 2 vlan 20-29
!
interface Ethernet0/0
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/1
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10io
SW5配置:class
spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
name mst
revision 2
instance 1 vlan 10-19
instance 2 vlan 20-29
!
interface Ethernet0/0
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/1
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/2
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
SW6配置:
spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
name mst
revision 3
instance 1 vlan 10-19
instance 2 vlan 20-29
!
interface Ethernet0/0
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/1
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
interface Ethernet0/2
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
SW7配置:
spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
name mst
revision 3
instance 1 vlan 10-19
instance 2 vlan 20-29
!
spanning-tree mst 1-2 priority 24576
!
interface Ethernet0/0
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/1
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/2
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
SW8配置:
spanning-tree mode mst
spanning-tree extend system-id
!
spanning-tree mst configuration
name mst
revision 3
instance 1 vlan 10-19
instance 2 vlan 20-29
!
interface Ethernet0/0
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
!
interface Ethernet0/1
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
spanning-tree mst 0-2 cost 10
SW9配置:
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
interface Ethernet0/0
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree link-type point-to-point
分析:
区域A
因为SW1的优先级(24577)小于SW2的优先级(28637)因此对于区域A来讲SW1是跟桥。
因为SW3的优先级大于SW4 SW5的优先级,因此在区域B中被选位跟桥。
因为SW7的优先级大于SW6 SW8的优先级,因此在区域C中被选位跟桥。
从上面分析能够看出在区域内的行为和RSTP相似。从这个交换机网络来讲无论是MST区域仍是非MST区域(SW9)选举跟桥(总根)的行为是同样的既最小的桥ID。
从上图看出若是把区域看作是一个虚拟的交换机,那个在整个区域的行为和RSTP相似。