当前位置:网站首页>华为设备配置VRRP与BFD联动实现快速切换
华为设备配置VRRP与BFD联动实现快速切换
2022-08-03 20:18: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. 配置静态BFD会话
[LSW1]bfd
[LSW1]bfd 1to2 bind peer-ip 10.1.1.2 interface Vlanif 10
[LSW1-bfd-session-1to2]discriminator local 1
[LSW1-bfd-session-1to2]discriminator remote 2
[LSW1-bfd-session-1to2]min-tx-interval 100
[LSW1-bfd-session-1to2]min-rx-interval 100
[LSW1-bfd-session-1to2]commit
[LSW2]bfd
[LSW2]bfd 2to1 bind peer-ip 10.1.1.1 interface Vlanif 10
[LSW2-bfd-session-2to1]discriminator local 2
[LSW2-bfd-session-2to1]discriminator remote 1
[LSW2-bfd-session-2to1]min-rx-interval 100
[LSW2-bfd-session-2to1]min-tx-interval 100
[LSW2-bfd-session-2to1]commit


6. 配置VRRP与BFD联动功能
[LSW1]int Vlanif 10
[LSW1-Vlanif10]vrrp vrid 2 track bfd-session 1 increased 40
[LSW2]int Vlanif 10
[LSW2-Vlanif10]vrrp vrid 1 track bfd-session 2 increased 40
7. 验证配置


[LSW1-GigabitEthernet0/0/3]shutdown


边栏推荐
- Leetcode 16. Numerical integral power (power + fast recursive/iteration)
- 汉源高科8光口12电口交换机千兆8光8电12电16电网管型工业以太网交换机
- JS 内置构造函数 扩展 prototype 继承 借用构造函数 组合式 原型式creat 寄生式 寄生组合式 call apply instanceof
- leetcode 899. 有序队列
- php根据两点经纬度计算距离
- Leetcode sword refers to Offer 15. 1 in the binary number
- 演讲议题及嘉宾重磅揭晓,TDengine 开发者大会推动数据技术“破局”
- ES6简介及let、var、const区别
- Likou 59 - Spiral Matrix II - Boundary Judgment
- 信使mRNA甲基化偶联3-甲基胞嘧啶(m3C)|mRNA-m3C
猜你喜欢

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

盲埋孔PCB叠孔设计的利与弊

不知道这4种缓存模式,敢说懂缓存吗?

ESP8266-Arduino编程实例-WS2812驱动

RNA核糖核酸修饰RNA-HiLyte FluorTM 405荧光染料|RNA-HiLyte FluorTM 405

ARMuseum

node版本切换工具NVM以及npm源管理器nrm

Li Mu hands-on learning deep learning V2-BERT fine-tuning and code implementation

In-depth understanding of JVM-memory structure

利用 rpush 和 blpop 实现 Redis 消息队列
随机推荐
Use ControlTemplate or Style from resource file in WPF .cs and find the control
Leetcode 16. Numerical integral power (power + fast recursive/iteration)
ES6 deconstruction assignment - array object deconstruction and deconstruction
谁的孙子最多II
【STM32】标准库-自定义BootLoader
Li Mu hands-on learning deep learning V2-BERT fine-tuning and code implementation
leetcode 125. 验证回文串
Detailed steps for tensorflow-gpu2.4.1 installation and configuration
调用EasyCVR云台控制接口时,因网络延迟导致云台操作异常该如何解决?
Detailed demonstration pytorch framework implementations old photo repair (GPU)
算法--交错字符串(Kotlin)
子结点的数量(2)
力扣206-反转链表——链表
揭秘5名运维如何轻松管理数亿级流量系统
消除对特权账户的依赖使用Kaniko构建镜像
JWT详解
Mapper输出数据中文乱码
Solidity智能合约开发 — 4.1-合约创建和函数修饰器
JS 内置构造函数 扩展 prototype 继承 借用构造函数 组合式 原型式creat 寄生式 寄生组合式 call apply instanceof
【微信小程序2】事件传参与数据同步[03]