配置MSTP及负载均衡

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置MSTP及负载均衡相关的知识,希望对你有一定的参考价值。

技术分享图片

LSW1的初始配置:
<Huawei>undo te m
Info: Current terminal monitor is off.
<Huawei>sy
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]port-group group-member g0/0/1 g0/0/2
[Huawei-port-group]port link-type access
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-port-group]port default vlan 10
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei-GigabitEthernet0/0/2]port default vlan 10
[Huawei-port-group]port default vlan 20
[Huawei-GigabitEthernet0/0/1]port default vlan 20
[Huawei-GigabitEthernet0/0/2]port default vlan 20
[Huawei-port-group]q
[Huawei]port-group group-member g0/0/3 g0/0/4
[Huawei-port-group]port link-type trunk
[Huawei-GigabitEthernet0/0/3]port link-type trunk
[Huawei-GigabitEthernet0/0/4]port link-type trunk
Huawei-port-group]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/4]port trunk allow-pass vlan all
LSW2的初始配置:
<Huawei>un te m
Info: Current terminal monitor is off.
<Huawei>system-view
[Huawei]vlan 10
[Huawei]vlan 20
[Huawei]port-group group-member g0/0/1 g0/0/2
[Huawei-port-group]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/2]port link-type trunk
[Huawei-port-group]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[Huawei]int g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 10
LSW3的初始配置:
[Huawei]vlan 10
[Huawei]vlan 20
[Huawei]port-group group-member g0/0/1 g0/0/2
[Huawei-port-group]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/2]port link-type trunk
[Huawei-port-group]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[Huawei]int g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 20
LSW1的再配置:
[Huawei]stp mode mstp
[Huawei]stp region-configuration
[Huawei-mst-region]region-name hcnp
[Huawei-mst-region]instance 1 vlan 10
[Huawei-mst-region]instance 2 vlan 20
[Huawei-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
LSW2的再配置:
[Huawei]stp mode mstp
[Huawei]stp region-configuration
[Huawei-mst-region]region-name hcnp
[Huawei-mst-region]instance 1 vlan 10
[Huawei-mst-region]instance 2 vlan 20
[Huawei-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-mst-region]q
[Huawei]stp instance 1 priority 0
[Huawei]stp instance 2 priority 4096
LSW3的再配置:
[Huawei]stp mode mstp
[Huawei]stp region-configuration
[Huawei-mst-region]region-name hcnp
[Huawei-mst-region]instance 1 vlan 10
[Huawei-mst-region]instance 2 vlan 20
[Huawei-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-mst-region]q
[Huawei]stp instance 1 priority 4096
[Huawei]stp instance 2 priority 0
PC机设置如图:
主要是PC1与PC3在同一个网段
主要是PC2与PC4在同一个网段技术分享图片技术分享图片技术分享图片技术分享图片
这时
LWS2成为vlan 10 的主根,vlan 20 的次根
LWS3成为vlan 20 的主根,vlan 10 的次根
根据优先级走向如图技术分享图片
发生故障时走向图:技术分享图片
另一个发生故障时走向图:技术分享图片

也可以通过抓包来进行查看,有不好的地方可以再下面留言啊
我继续完善下 谢谢啦

以上是关于配置MSTP及负载均衡的主要内容,如果未能解决你的问题,请参考以下文章

配置MSTP及负载均衡

华为MSTP负载均衡配置示例

通过MSTP技术实现小型制造工厂的网络链路备份以及负载均衡

配置MSTP实现负载均衡

配置mstp实现负载均衡

配置 MSTP 实现负载均衡