MSTP
- MSTP:多生成树协议—可为每个vlan或者多个vlan为一组,构造一个生成树,实现网络的负载分担(均衡)
-----------将sw1、Sw2分别做vlan10、vlan20的根网桥----------
[sw1]stp mode mstp
###将交换机配置成MSTP模式,MSTP兼容sTP/RSTP。
[Sw1 ]stp region-configuration
###进入MSTP域视图MSTP配置模式
[ sw1-mst-region] region-name huawei1
###配置MSTP域的域名为huawei1,缺省为交换设备主控板上管理网口的Mac地址。
[ Sw1-mst-region] revision-level 1
###配置MST域的MSTP修订级别为1,缺省情况下MSTP域的MSTP修订级别为0,需要将各设备的MSTP修订级别修改为一致
手动配置多生成树实例和VLAN的映射关系,同一vlan的数据只能对应一个实例,而一个实例可以对应多个vlan (instance 1vlan 2 to 10)
[Sw1-mst-region]instance 1 vlan 10
###将vlan 10加入实例1中
[Sw1-mst-region]instance 2 vlan 20
###将vlan 20加入实例2中
[Sw1-mst-region] check region-configuration
###查看MSTP域配置参数
[Sw1-mst-region] active region-configuration
##激活MSTP域的配置(必须配置)
[Sw1-mst-region] quit
###退出配置模式
[Sw1]stp instance 1 root primary
###配置此交换机为实例1的主根桥
[sw1]stp instance 2 root secondary
###配置此交换机为实例2的备份根桥