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

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值