MSTP --- Multiple Spanning Tree Protocol --- 802.1s
在 MSTP 中 ,提出了实例的概念,相当于可用让多个VLAN同时属于一个实例,然后只需要一个实例生成一棵树。 --- 一种 VLAN 分流的思想
实例ID :instance ID 由 12位 二进制 构成,范围:0 - 4095 可用:1 - 4094
VLAN 中 可用的也是1 - 4094 其中 0 作为保留的VLAN ID ,放在配置BPDU中的 Route ID 中的后12位中。
默认存在实例0 --- 1 - 4094 ,并且初始所有的VLAN 均属于实例0,相当于初始时只有一颗MSTP树。
MSTP协议中 考虑到交换网络的大小问题 ,设计了 MST - 域 --- 即MST region
配置
配置MSTP时,要必须保证某些参数要一致。
1.域名必须相同
2.相同的修订等级
3.必须要有相同的 VLAN 和 实例 的映射关系。


[huawei]stp mode mstp --- 华为设备默认使用生成树协议是MSTP

[huawei]display stp region-configuration --- 查看MSTP域配置的指令
Format selector:0 --- 配置标识格式选择符,长度为一个字节,固定设置为0
Region name:4c1fccc329c2 --- 交换机启动MSTP后会自动生成一个域名(交换机管理接口的MAC地址)
Revision level:0 --- 修订等级,默认都是0
交换网络配置流程: 首先 配置完 交换机 ,再到 路由器 。
1.配置VLAN
2.配置STP(MSTP)
[huawei]stp enable --- 开启 生成树协议
[huawei]stp mode mstp --- 生成树选择为多生成树
[huawei]stp region-configuraion --- 进入MSTP域
[huawei-stp -region]region-name aa --- 修改域名
[huawei-stp -region]region-level ? ---- 0-65535 --- 修改修订等级
[huawei-stp -region]instance 1 (1-4094) vlan 1 2 3 to 5 --- 实例1和vlan1-5绑定

查看 发现 mstp 的修改 没有 成功 !!!

关键一步:必须要激活域中的配置
[huawei-stp -region]active region-configuration

注意:无论添加还是删除都得 再次激活才能修改配置。

修改优先级

---实例1 根 实例2 备份根

实例2 主根 实例1备份根