教程博客

 

RSTP / MSTP

快速生成树RSTP的配置


config ter

spanning-tree

spanning-tree mode rstp

查看生成树配置信息

#show spanning-tree

stpVersion 版本信息

sysStpStatus 生成树状态

Priority 交换机优先级

RootCost 交换机到达根交换机的开销    0代表本交换机为根交换机

RootPort 交换机上的根端口                  0代表本端口为根端口 b

设置生成树的优先级

config ter

spanning-tree priority 4096

查看端口状态

#show spanning-tree interface f0/1

PortState:forwarding   //f0/1处于转发状态

PortRole:rootPort        //端口角色为根端口



多生成树MSTP的配置


多生成树必须每台设备上有相同的VLAN,即使没有端口也必须配置该VLAN,否则将造成一条出口链路的DOWN使相应VLAN无法继续通信。

生成树mstp模式配置

DCS (config)#spannning-tree                                                            

DCS (Config)# spanning-tree mst configuration                            <进入MSTP配置模式>

DCS (Config-Mstp-Region)#name mstp                                          <命名>

DCS (Config-Mstp-Reg ion)#instance 1 vlan 10                               <将vlan10加入到实例1>

DCS (Config-Mstp-Region)#instance 2 vlan 20                               <将vlna20加入到实例2>

DCS (Config-Mstp-Region)#exit

DCS (Config)# spanning-tree

MSTP is starting now, please wait........... 

MSTP is enabled successfully.

switchA(Config)#spanning-tree mst 1 cost 300000                         <配置mstp的路径开销>

改变交换机优先级

switchB(Config)#spanning-tree mst 0 priority 28672  

改变链路开销 

switchA(config-Ethernet0/0/2 )#spanning-tree mst 1 cost 300000

改变端口优先级

switchA(Config-Ethernet0/0/2)#spanning-tree mst 0 port-priority 144


评论
Top

© Hades | Powered by LOFTER