SWA
sys
sys SWA
stp enable
stp mode stp
stp priority 4096
SWB
sys
sys SWB
stp enable
stp mode stp
stp priority 8192
SWC
sys
sys SWC
stp enable
stp mode stp
SWA
sys
sys SWA
stp mode rstp
stp priority 4096
SWB
sys
sys SWB
stp mode rstp
stp priority 8192
SWC
sys
sys SWC
stp mode rstp
SWC设置边缘端口
sys
int g0/0/1
stp edged-port enable
dis stp int g0/0/1
dis cu int g0/0/1
SWC开启bpdu保护
sys
int g0/0/1
stp edged-port enable
qu
stp bpdu-protection
dis stp br
#SWA,SWB,SWC
dis stp br
设置root保护
做到这里,你需要添加一个交换机LSW4连到SWC,注意使用一根线就行
#LSW4
sys
stp priority 0#SWA,SWB,SWC 查看端口角色
dis stp br
#SWC
sys
int g0/0/2
shut
#开启root保护
stp root-protection
#测试线路是否down
undo sh
dis stp br
#SWA,SWB,SWC
dis stp br
什么是mstp呢?
多生成树(MST)使用修正的快速生成树(RSTP)协议,叫做多生成树协议(MSTP)
Mstp又有什么优势呢?
- rstp和stp有一个共同的缺陷:局域网所有的VLAN共享一颗生成树,链路被阻塞后将不能承载任何流量,造成宽带浪费,因此无法再vlan间实现数据流量的均衡负载,
SWA
return
sys
sysn SWA
vlan ba 11 12 21 22 31 32
int g0/0/3
port link-type trunk
port trunk allow-pass vlan all
int g0/0/4
port link-type trunk
port trunk allow-pass vlan all
return
sys
stp enable
stp mode mstp
stp region-conf
region-name yh
revision-level 1
instance 1 vlan 11 21 31
instance 2 vlan 12 22 32
active region-conf
quit
stp instance 1 root p
stp instance 2 root s
SWB
return
sys
sysn SWB
vlan ba 11 12 21 22 31 32
int g0/0/8
port link-type trunk
port trunk allow-pass vlan all
int g0/0/9
port link-type trunk
port trunk allow-pass vlan all
return
sys
stp enable
stp mode mstp
stp region-conf
region-name yh
revision-level 1
instance 1 vlan 11 21 31
instance 2 vlan 12 22 32
active region-conf
quit
stp instance 2 root p
stp instance 1 root s
SWC
return
sys
sysn SWC
vlan ba 11 12 21 22 31 32
int g0/0/8
port link-type trunk
port trunk allow-pass vlan all
int g0/0/9
port link-type trunk
port trunk allow-pass vlan all
return
sys
stp enable
stp mode mstp
stp region-conf
region-name yh
revision-level 1
instance 1 vlan 11 21 31
instance 2 vlan 12 22 32
active region-conf
quitdis stp br
dis stp region-conf
你可以参考下面这种拓扑图
11、12表示vlan号,使用access接口,不同实例走不同路线
int g0/0/1
port link-type access
port default vlan 11
int g0/0/2
port link-type access
port default vlan 12