目录
VRRP实验配置
BFD实验配置
配置单跳检测
配置多跳检测
配置单臂回声
BFD与路由协议联动配置
BFD与OSPF联动
BFD与ISIS联动
BFD与BGP联动
VRRP实验配置
VRRP配置
AR1配置(VRRP缺省优先级100)
int g0/0/0
ip add 192.168.10.1 24
vrrp vrid 10 virtual-ip 192.168.10.254 配置VRRP组10的虚拟IP地址
vrrp vrid 10 priority 130 配置AR1在VRRP组10中的优先级(越大越优先)
vrrp vrid 10 track interface GigabitEthernet0/0/1 reduced 100
检测上行接口,如果上行接口出现故障,自身在VRRP组10的优先级减少100(此时AR2就为被选举为VRRP主)
vrrp vrid 20 virtual-ip 192.168.10.200
AR2配置
int g0/0/0
ip add 192.168.10.2 24
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 20 virtual-ip 192.168.10.200
vrrp vrid 20 priority 130
vrrp vrid 20 track interface GigabitEthernet0/0/1 reduced 100
将PC1的网关设置为192.168.10.254,PC2的网关设置为192.168.10.200
BFD实验配置
BFD双向转发检测协议理论讲解_bfd协议端口号_静下心来敲木鱼的博客-CSDN博客https://blog.csdn.net/m0_49864110/article/details/127841451?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167370097216800180641264%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=167370097216800180641264&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-2-127841451-null-null.blog_rank_default&utm_term=bfd&spm=1018.2226.3001.4450
配置单跳检测
AR1配置
bfd
bfd ar1-2 bind peer-ip 10.0.12.2 interface GigabitEthernet0/0/0 配置bfd会话名为ar1-2
discriminator local 1 配置本端的标识符
discriminator remote 2 配置对端的标识符
标识符要与对端会话配置的标识符相应
commit
AR2配置
bfd
bfd ar2-1 bind peer-ip 10.0.12.1 interface GigabitEthernet0/0/0
discriminator local 2
discriminator remote 1
commit
配置多跳检测
AR1配置
bfd
bfd ar1-3 bind peer-ip 10.0.23.3
discriminator local 10
discriminator remote 20
detect-multiplier 4 配置BFD检测次数
min-tx-interval 2000 配置BFD发送间隔
min-rx-interval 2000 配置BFD接收间隔
wtr 1 BFD会话等待恢复时间
commit
AR3配置
bfd
bfd ar3-1 bind peer-ip 10.0.12.1
discriminator local 20
discriminator remote 10
commit
配置单臂回声
AR1配置(AR4不支持BFD会话)
bfd
bfd ar1-4 bind peer-ip 10.0.14.4 interface GigabitEthernet0/0/1 one-arm-echo
discriminator local 40
min-echo-rx-interval 100
commit
以上创建的BFD会话,可以与策略、路由协议等联动起来,实现快速收敛
BFD与路由协议联动配置
BFD与OSPF联动
只介绍一边的配置,对端配置相同
bfd
ospf 1
bfd all-interfaces enable 与所有的OSPF邻居(Full状态)建立BFD会话(邻居也需要配置)-即为所有有Full邻居状态的接口建立BFD会话
bfd all-interfaces min-rx-interval 2000 配置BFD会话参数
int g0/0/0
ospf bfd enable 只为指定的接口建立BFD会话
ospf bfd min-rx-interval 3000 配置BFD会话参数
接口上配置BFD for OSPF特性的优先级高于进程中配置BFD for OSPF特性的优先级
BFD与ISIS联动
ISIS与静态BFD联动(只介绍一边的配置,对端配置相同)
bfd
bfd ar1-4 bind peer-ip 10.0.14.4 interface GigabitEthernet0/0/1
discriminator local 20
discriminator remote 10
commit
int g0/0/1
isis bfd static
ISIS与动态BFD联动(只介绍一边的配置,对端配置相同)
同OSPF联动BFD
bfd
isis
bfd all-interfaces enable
int g0/0/0
ospf bfd enable
BFD与BGP联动
只介绍一边的配置,对端配置相同
bgp 100
peer 1.1.1.1 bfd enable
peer 1.1.1.1 bfd min-rx-interval 2000