当前位置:网站首页>华为设备配置VRRP负载分担
华为设备配置VRRP负载分担
2022-08-03 19:51:00 【51CTO】

1. 配置设备各接口的IP地址
[LSW1]vlan batch 10 20
[LSW1-GigabitEthernet0/0/3]port link-type hybrid
[LSW1-GigabitEthernet0/0/3]port hybrid pvid vlan 10
[LSW1-GigabitEthernet0/0/3]port hybrid untagged vlan 10
[LSW1-GigabitEthernet0/0/4]port link-type hybrid
[LSW1-GigabitEthernet0/0/4]port hybrid untagged vlan 20
[LSW1-GigabitEthernet0/0/4]port hybrid pvid vlan 20
[LSW1-Vlanif10]ip add 10.1.1.1 24
[LSW1-Vlanif20]ip add 10.1.2.1 24
[LSW2]vlan batch 10 30
[LSW2-GigabitEthernet0/0/3]port link-type hybrid
[LSW2-GigabitEthernet0/0/3]port hybrid untagged vlan 10
[LSW2-GigabitEthernet0/0/3]port hybrid pvid vlan 10
[LSW2-GigabitEthernet0/0/4]port link-type hybrid
[LSW2-GigabitEthernet0/0/4]port hybrid pvid vlan 30
[LSW2-GigabitEthernet0/0/4]port hybrid untagged vlan 30
[LSW2-Vlanif10]ip add 10.1.1.2 24
[LSW2-Vlanif30]ip add 10.1.3.2 24
[LSW4]vlan batch 20 30 100
[LSW4-GigabitEthernet0/0/1]port link-type hybrid
[LSW4-GigabitEthernet0/0/1]port hybrid untagged vlan 20
[LSW4-GigabitEthernet0/0/1]port hybrid pvid vlan 20
[LSW4-GigabitEthernet0/0/2]port link-type hybrid
[LSW4-GigabitEthernet0/0/2]port hybrid pvid vlan 30
[LSW4-GigabitEthernet0/0/2]port hybrid untagged vlan 30
[LSW4-GigabitEthernet0/0/3]port link-type hybrid
[LSW4-GigabitEthernet0/0/3]port hybrid untagged vlan 100
[LSW4-GigabitEthernet0/0/3]port hybrid pvid vlan 100
[LSW4-Vlanif20]ip add 10.1.2.4 24
[LSW4-Vlanif30]ip add 10.1.3.4 24
[LSW4-Vlanif100]ip add 172.16.1.4 24
2. 配置LSW3的二层转发功能
[LSW3]vlan batch 10
[LSW3-GigabitEthernet0/0/1]port link-type hybrid
[LSW3-GigabitEthernet0/0/1]port hybrid untagged vlan 10
[LSW3-GigabitEthernet0/0/1]port hybrid pvid vlan 10
[LSW3-GigabitEthernet0/0/2]port link-type hybrid
[LSW3-GigabitEthernet0/0/2]port hybrid untagged vlan 10
[LSW3-GigabitEthernet0/0/2]port hybrid pvid vlan 10
3. 配置OSPF协议进行互联
[LSW1]ospf 1
[LSW1-ospf-1]area 0
[LSW1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[LSW1-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[LSW2]ospf 1
[LSW2-ospf-1]area 0
[LSW2-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[LSW2-ospf-1-area-0.0.0.0]network 10.1.3.0 0.0.0.255
[LSW4]ospf 1
[LSW4-ospf-1]area 0
[LSW4-ospf-1-area-0.0.0.0]network 172.16.1.0 0.0.0.255
[LSW4-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[LSW4-ospf-1-area-0.0.0.0]network 10.1.3.0 0.0.0.255
4. 配置VRRP备份组
[LSW1]int Vlanif 10
[LSW1-Vlanif10]vrrp vrid 1 virtual-ip 10.1.1.254
[LSW1-Vlanif10]vrrp vrid 1 priority 120
[LSW1-Vlanif10]vrrp vrid 1 preempt-mode timer delay 20
[LSW1-Vlanif10]vrrp vrid 2 virtual-ip 10.1.1.253
[LSW2]int Vlanif 10
[LSW2-Vlanif10]vrrp vrid 2 virtual-ip 10.1.1.253
[LSW2-Vlanif10]vrrp vrid 2 priority 120
[LSW2-Vlanif10]vrrp vrid 2 preempt-mode timer delay 20
[LSW2-Vlanif10]vrrp vrid 1 virtual-ip 10.1.1.254
5. 验证配置


边栏推荐
- LOL英雄联盟卡顿掉帧问题解决办法 2022年8月1日
- Introduction to Cosine Distance
- epoll + 线程池 + 前后置服务器分离
- Line the last time the JVM FullGC make didn't sleep all night, collapse
- 阿洛的反思
- 揭秘5名运维如何轻松管理数亿级流量系统
- 基于移动GIS的环保生态管理系统
- 危化企业双重预防机制数字化建设进入全面实施阶段
- 京东云发布新一代分布式数据库StarDB 5.0
- LeetCode 952. Calculate Maximum Component Size by Common Factor
猜你喜欢

简易电子琴设计(c语言)

【飞控开发高级教程4】疯壳·开源编队无人机-360 度翻滚

List类的超详细解析!(超2w+字)
![【微信小程序2】事件传参与数据同步[03]](/img/d9/73004e6edf800c583231a94dfbd878.png)
【微信小程序2】事件传参与数据同步[03]

Node version switching tool NVM and npm source manager nrm

Interview Blitz: What Are Sticky Packs and Half Packs?How to deal with it?

ECCV2022 | 用于视频问题回答的视频图Transformer

头条服务端一面经典10道面试题解析

Network protocol-TCP, UDP difference and TCP three-way handshake, four wave

深入理解JVM-内存结构
随机推荐
redis常用命令,HSET,XADD,XREAD,DEL等
按需视觉识别:愿景和初步方案
Postgresql-xl global snapshot and GTM code walking (branch line)
ADS 2023 下载链接
安装anaconda并创建虚拟环境
Calculation of the array serial number of Likou brush questions (one question per day 7/28)
matplotlib画polygon, circle
The addition and subtraction of the score of the force deduction brush question (a daily question 7/27)
力扣刷题之合并两个有序数组
建模该从哪一步开始?给你分析,给零基础的你一些学习建议
The ecological environmental protection management system based on mobile GIS
数据驱动的软件智能化开发| ChinaOSC
net-snmp私有mib动态加载到snmpd
机器学习中专业术语的个人理解与总结(纯小白)
利用 rpush 和 blpop 实现 Redis 消息队列
Handler source code analysis
Execute the mysql script file in the docker mysql container and solve the garbled characters
Kettle 读取 Excel 数据输出到 Oracle 详解
入门3D建模基础教程详细分解
从文本匹配到语义相关——新闻相似度计算的一般思路