华为交换机MSTP和VRRP综合应用配置

采用"双核心"的冗余网络,可以保证网络的稳定性。利用MSTP(多生成树协议)和VRRP(虚拟路由冗余协议)提高网络可靠性。

一、基本配置

LSW1:

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

Huawei\]undo info-center ena Info: Information center is disabled. \[Huawei\]sys LSW1 \[LSW1\]vlan batch 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. \[LSW1\]int vlan 10 \[LSW1-Vlanif10\]ip add 192.168.10.252 24 \[LSW1-Vlanif10\]int vlan 20 \[LSW1-Vlanif20\]ip add 192.168.20.252 24 \[LSW1-Vlanif20\]int g0/0/1 \[LSW1-GigabitEthernet0/0/1\]p l t \[LSW1-GigabitEthernet0/0/1\]p t a v 10 20 \[LSW1-GigabitEthernet0/0/1\]int g0/0/2 \[LSW1-GigabitEthernet0/0/2\]p l t \[LSW1-GigabitEthernet0/0/2\]p t a v 10 20 \[LSW1-GigabitEthernet0/0/2\]qu \[LSW1\]int eth \[LSW1\]int Eth-Trunk 1 \[LSW1-Eth-Trunk1\]p l t \[LSW1-Eth-Trunk1\]p t a v 10 20 \[LSW1-Eth-Trunk1\]qu \[LSW1\]int g0/0/23 \[LSW1-GigabitEthernet0/0/23\]eth-trunk 1 Info: This operation may take a few seconds. Please wait for a moment....done. \[LSW1-GigabitEthernet0/0/23\]int g0/0/24 \[LSW1-GigabitEthernet0/0/24\]eth-trunk 1 Info: This operation may take a few seconds. Please wait for a moment...done. \[LSW1-GigabitEthernet0/0/24\]qu LSW2: \sys Enter system view, return user view with Ctrl+Z. \[Huawei\]undo info-center ena Info: Information center is disabled. \[LSW\]sysn LSW2 \[LSW2\]vlan batch 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. \[LSW2\]int vlan 10 \[LSW2-Vlanif10\]ip add 192.168.10.253 24 \[LSW2-Vlanif10\]int vlan 20 \[LSW2-Vlanif20\]ip add 192.168.20.253 24 \[LSW2-Vlanif20\]int g0/0/1 \[LSW2-GigabitEthernet0/0/1\]p l t \[LSW2-GigabitEthernet0/0/1\]p t a v 10 20 \[LSW2-GigabitEthernet0/0/1\]int g0/0/2 \[LSW2-GigabitEthernet0/0/2\]p l t \[LSW2-GigabitEthernet0/0/2\]p t a v 10 20 \[LSW2-GigabitEthernet0/0/2\]qu \[LSW2\]int eth \[LSW2\]int Eth-Trunk 1 \[LSW2-Eth-Trunk1\]p l t \[LSW2-Eth-Trunk1\]p t a v 10 20 \[LSW2-Eth-Trunk1\]int g0/0/23 \[LSW2-GigabitEthernet0/0/23\]eth-trunk 1 Info: This operation may take a few seconds. Please wait for a moment...done. \[LSW2-GigabitEthernet0/0/23\]int g0/0/24 \[LSW2-GigabitEthernet0/0/24\]eth-trunk 1 Info: This operation may take a few seconds. Please wait for a moment...done. \[LSW2-GigabitEthernet0/0/24\]qu LSW3: \sys Enter system view, return user view with Ctrl+Z. \[Huawei\]undo info-center ena Info: Information center is disabled. \[LSW\]sysn LSW3 \[LSW3\]vlan batch 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. \[LSW3\]int e0/0/1 \[LSW3-Ethernet0/0/1\]p l a \[LSW3-Ethernet0/0/1\]p d v 10 \[LSW3-Ethernet0/0/1\]int e0/0/2 \[LSW3-Ethernet0/0/2\]p l a \[LSW3-Ethernet0/0/2\]p d v 20 \[LSW3-Ethernet0/0/2\]int g0/0/1 \[LSW3-GigabitEthernet0/0/1\]p l t \[LSW3-GigabitEthernet0/0/1\]p t a v 10 20 \[LSW3-GigabitEthernet0/0/1\]int g0/0/2 \[LSW3-GigabitEthernet0/0/2\]p l t \[LSW3-GigabitEthernet0/0/2\]p t a v 10 20 \[LSW3-GigabitEthernet0/0/2\]qu LSW4: \sys Enter system view, return user view with Ctrl+Z. \[Huawei\]undo info-center ena Info: Information center is disabled. \[Huawei\]sysn LSW4 \[LSW4\]vlan batch 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. \[LSW4\]int e0/0/1 \[LSW4-Ethernet0/0/1\]p l a \[LSW4-Ethernet0/0/1\]p d v 10 \[LSW4-Ethernet0/0/1\]int e0/0/2 \[LSW4-Ethernet0/0/2\]p l a \[LSW4-Ethernet0/0/2\]p d v 20 \[LSW4-Ethernet0/0/2\]int g0/0/1 \[LSW4-GigabitEthernet0/0/1\]p l t \[LSW4-GigabitEthernet0/0/1\]p t a v 10 20 \[LSW4-GigabitEthernet0/0/1\]int g0/0/2 \[LSW4-GigabitEthernet0/0/2\]p l t \[LSW4-GigabitEthernet0/0/2\]p t a v 10 20 \[LSW4-GigabitEthernet0/0/2\]qu 二、交换机的MSTP配置 LSW1: \[LSW1\]stp in \[LSW1\]stp instance 1 priority 4096 \[LSW1\]stp instance 2 priority 0 \[LSW1\]stp region-configuration \[LSW1-mst-region\]region-name test \[LSW1-mst-region\]revision-level 1 \[LSW1-mst-region\]instance 1 vlan 10 \[LSW1-mst-region\]instance 2 vlan 20 \[LSW1-mst-region\]active region-configuration Info: This operation may take a few seconds. Please wait for a mome \[LSW1-mst-region\]qu LSW2: \[LSW2\]stp instance 1 priority 0 \[LSW2\]stp instance 2 priority 4096 \[LSW2\]stp region-configuration \[LSW2-mst-region\]region-name test \[LSW2-mst-region\]revision-level 1 \[LSW2-mst-region\]instance 1 vlan 10 \[LSW2-mst-region\]instance 2 vlan 20 \[LSW2-mst-region\]active region-configuration Info: This operation may take a few seconds. Please wait for a moment...done. LSW3: \[LSW3\]stp region-configuration \[LSW3-mst-region\]region-name test \[LSW3-mst-region\]revision-level 1 \[LSW3-mst-region\]instance 1 vlan 10 \[LSW3-mst-region\]instance 2 vlan 20 \[LSW3-mst-region\]active region-configuration Info: This operation may take a few seconds. Please wait for a moment...done. \[LSW3-mst-region\]qu LSW4: \[LSW4\]stp region-configuration \[LSW4-mst-region\]region-name test \[LSW4-mst-region\]revision-level 1 \[LSW4-mst-region\]instance 1 vlan 10 \[LSW4-mst-region\]instance 2 vlan 20 \[LSW4-mst-region\]active region-configuration Info: This operation may take a few seconds. Please wait for a moment...done. \[LSW4-mst-region\]qu 三、交换机的VRRP配置 LSW1: \[LSW1\]int vlan 10 \[LSW1-Vlanif10\]vrrp vrid 10 virtual-ip 192.168.10.254 \[LSW1-Vlanif10\]vrrp vrid 10 priority 120 \[LSW1-Vlanif10\]qu \[LSW1\]int vlan 20 \[LSW1-Vlanif20\]vrrp vrid 20 virtual-ip 192.168.20.254 \[LSW1-Vlanif20\]qu LSW2: \[LSW2\]int vlan 10 \[LSW2-Vlanif10\]vrrp vrid 10 virtual-ip 192.168.10.254 \[LSW2-Vlanif10\] int vlan 20 \[LSW2-Vlanif20\]vrrp vrid 20 virtual-ip 192.168.20.254 \[LSW2-Vlanif20\]vrrp vrid 20 priority 150 \[LSW2-Vlanif20\]qu 四、验证 ![](https://i-blog.csdnimg.cn/direct/a87384b720a743d18c840bc990c12042.png)![](https://i-blog.csdnimg.cn/direct/10296534b15041529acd5614b7ab4ad1.png)![](https://i-blog.csdnimg.cn/direct/8b737ee9d1ab4255b418942bce0013f9.png)![](https://i-blog.csdnimg.cn/direct/29f6cbdec8c74a0492ac2a297be06322.png)

相关推荐
xixixi777778 小时前
CDN(内容分发网络)——缓存和分发网站、应用程序、视频等内容,以提高用户访问速度和稳定性,减少网络延迟和拥塞,同时减轻源服务器的压力
网络·缓存·架构·系统架构·cdn·业务·内容分发网络
-To be number.wan9 小时前
【补漏版】计算机网络期末大题预测合集
网络·计算机网络
云和恩墨9 小时前
表空间、巡检、建库:DBA最熟悉的3个场景,正在被zCloud开放运维中心重新定义
运维·数据库·表空间·dba·巡检·建库
liulilittle9 小时前
OPENPPP2 Code Analysis Two
网络·c++·网络协议·信息与通信·通信
爱怪笑的小杰杰9 小时前
紧急补救:TCP心跳检测失效问题复盘与彻底解决
网络
学烹饪的小胡桃10 小时前
WGCAT工单系统 v1.2.7 更新说明
linux·运维·服务器·网络·工单系统
BigBigHang10 小时前
【docker】离线设备安装镜像
运维·docker·容器
学好statistics和DS10 小时前
Docker文件与本地文件,系统
运维·docker·容器
liuc031710 小时前
docker下安装SearXNG
运维·docker·容器
云飞云共享云桌面10 小时前
非标自动化工厂的设计云桌面为什么要选云飞云智能共享云桌面?
大数据·运维·服务器·网络·自动化·负载均衡