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

相关推荐
程序员清洒2 小时前
Flutter for OpenHarmony:GridView — 网格布局实现
android·前端·学习·flutter·华为
代码游侠3 小时前
ARM开发——阶段问题综述(二)
运维·arm开发·笔记·单片机·嵌入式硬件·学习
Miguo94well3 小时前
Flutter框架跨平台鸿蒙开发——地理知识速记APP的开发流程
flutter·华为·harmonyos·鸿蒙
时光慢煮4 小时前
【Flutter × OpenHarmony】跨端开发实现全局Toast提示卡片
flutter·华为·开源·openharmony
Mr.朱鹏4 小时前
Nginx路由转发案例实战
java·运维·spring boot·nginx·spring·intellij-idea·jetty
java_logo4 小时前
OpenCode 企业级 Docker 部署完整指南
运维·docker·容器·opencode·opencode本地化部署·opencode部署手册·opencode部署方案
讯方洋哥4 小时前
HarmonyOS App开发——鸿蒙音乐播放机应用App开发
华为·harmonyos
Cisco_hw_zte5 小时前
小型网络中部署Aruba无线
网络
小雨青年5 小时前
【鸿蒙原生开发会议随记 Pro】 会议随记 Pro v1.1 发布 详解 HarmonyOS NEXT 原生国际化(i18n)架构与最佳实践
华为·harmonyos