STP 生成树协议
1.将所有交换机创建trunk链路模式:
[Huawei]port-group 1
[Huawei-port-group-1]group-member GigabitEthernet0/0/01 to GigabitEthernet 0/0/5
[Huawei-port-group-1]port link-type trunk
[Huawei-port-group-1]port trunk allow-pass vlan all
2.将所有交换机创建4个vlan
[Huawei]vl batch 10 20 30 40
3.进入区域模式 创建树并将vlan加入树 激活
[Huawei]stp region-configuration
[Huawei-mst-region]region-name 111
[Huawei-mst-region]instance 1 vlan 10 20
[Huawei-mst-region]instance 2 vlan 30 40
[Huawei-mst-region]active region-configuration
4.将树设置优先级
[Huawei]stp instance 1 root ?
主 primary Primary root switch
副 secondary Secondary root switch
[Huawei]stp instance 1 root primary
[Huawei]stp instance 2 root secondary
[Huawei]stp instance 1 root secondary
[Huawei]stp instance 2 root primary