mstp实例分析

拓扑:

 

 

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 10

SW2配置:

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 10

SW3配置:

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 10

SW4配置:

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

SW5配置:

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类似。

 

 

你可能感兴趣的:(mstp)