MSTP:一棵vlan一棵生成树,实现链路的负载均衡
PC1
PC2
SW3:
undo terminal monitor
system-view
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei]sysname SW3
[SW3]vlan batch 10 20
[SW3]int e0/0/3
[SW3-Ethernet0/0/3]port hybrid pvid vlan 10
[SW3-Ethernet0/0/3]port hybrid untagged vlan 10 20
[SW3]int e0/0/1
[SW3-Ethernet0/0/1]port hybrid pvid vlan 10
[SW3-Ethernet0/0/1]port hybrid untagged vlan 10 20
[SW3]int e0/0/4
[SW3-Ethernet0/0/4]port hybrid pvid vlan 20
[SW3-Ethernet0/0/4]port hybrid untagged vlan 10 20
[SW3]int e0/0/2
[SW3-Ethernet0/0/2]port hybrid pvid vlan 20
[SW3-Ethernet0/0/2]port hybrid untagged vlan 10 20
SW1
undo terminal monitor
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei]sysname SW1
[SW1]vlan batch 10 20
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]port hybrid pvid vlan 10
[SW1-Ethernet0/0/1]port hybrid untagged vla
[SW1]int g0/0/1n 10 20
[SW1-GigabitEthernet0/0/1]port hybrid pvid vlan 10
[SW1-GigabitEthernet0/0/1]port hybrid untagged vlan 10 20
[SW1]int g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
SW2:
undo terminal monitor
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei]sysname SW2
[SW2]vlan batch 10 20
[SW2]int e0/0/1
[SW2-Ethernet0/0/1]port hybrid pvid vlan 10
[SW2-Ethernet0/0/1]port hybrid untagged vlan 10 20
[SW2]int g0/0/1
[SW2-GigabitEthernet0/0/1]port hybrid pvid vlan 20
[SW2-GigabitEthernet0/0/1]port hybrid untagged vlan 10 20
[SW2]int g0/0/2
[SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
[SW2-GigabitEthernet0/0/2]port link-type trunk
R1:
undo terminal monitor
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei]sysname R1[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.2.1 24
MSTP配置部分
SW1:
[SW1]stp mode mstp
[SW1]stp region-configuration
[SW1-mst-region]region-name wj
[SW1-mst-region]revision-level 1
[SW1-mst-region]instance 1 vlan 10
[SW1-mst-region]instance 2 vlan 20
[SW1]stp instance 1 root primary
[SW1]stp instance 2 root secondary
SW2:
[SW2]stp mode mstp
[SW2]stp region-configuration
[SW2-mst-region]region-name wj
[SW2-mst-region]revision-level 1
[SW2-mst-region]instance 1 vlan 10
[SW2-mst-region]instance 2 vlan 20
[SW1]stp instance 2 root primary
[SW2]stp instance 1 root secondary
SW3:
[SW1]stp mode mstp
[SW1]stp region-configuration
[SW1-mst-region]region-name wj
[SW1-mst-region]revision-level 1
[SW1-mst-region]instance 1 vlan 10
[SW1-mst-region]instance 2 vlan 20