华为交换机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)

相关推荐
米羊12132 分钟前
已有安全措施确认(中)
网络
听麟1 小时前
HarmonyOS 6.0+ 跨端智慧政务服务平台开发实战:多端协同办理与电子证照管理落地
笔记·华为·wpf·音视频·harmonyos·政务
前端世界1 小时前
从单设备到多设备协同:鸿蒙分布式计算框架原理与实战解析
华为·harmonyos
迎仔1 小时前
A-算力中心网络隔离总览:数字世界的“酒店房间“
网络
wangjialelele1 小时前
Linux下的IO操作以及ext系列文件系统
linux·运维·服务器·c语言·c++·个人开发
宝塔面板1 小时前
AllinSSL 一站式搞定 SSL 自动续期:永久免费,开源可自托管
网络·网络协议·ssl
csdn今天倒闭了吗2 小时前
飞牛lucky配置ipv6 ddns+ssl+反向代理
网络·网络协议·ssl
HypoxiaDream2 小时前
LINUX-Ext系列⽂件系统
linux·运维·服务器
小毛驴8502 小时前
Linux curl 命令用法
linux·运维·chrome
强风7942 小时前
Linux-网络层
网络