BFD
BFD的检测机制:两个系统建立BFD会话,并沿它们之间的路径周期性发送BFD控制报文,如果一方在既定的时间内没有收到BFD控制报文,则认为路径上发生了故障。BFD的检测模式有异步模式和查询模式两种。
异步模式和查询模式的本质区别:检测的位置不同,异步模式下本端按一定的发送周期发送BFD控制报文,检测位置为远端,远端检测本端是否周期性发送BFD控制报文;查询模式下本端检测自身发送的BFD控制报文是否得到了回应。
BFD检测时间
BFD缺省时间参数
BFD报文发送间隔默认1000毫秒,接受间隔默认1000毫秒,本地检测倍数3次。
BFD会话等待恢复时间0秒,会话延迟Up时间0秒。
检测超时倍数,用于检测方计算检测超时时间。
查询模式:采用本地检测倍数。
异步模式:采用对端检测倍数。
作业
1.静态路由与BFD联动
r1配置
[r1]bfd \\使能bfd
[r1]bfd 1to2 bind peer-ip 12.0.0.2 interface g0/0/0 \\创建bfd取名为1to2,远端ip为12.0.0.2,出接口为g0/0/0
[r1-bfd-session-1to2]discriminator local 1 \\本地标识符为1
[r1-bfd-session-1to2]discriminator remote 2 \\远端标识符为1
[r1-bfd-session-1to2]commit \\提交
[r1]ip route-static 0.0.0.0 0 12.0.0.2 track bfd-session 1to2 \\配置静态路由并与bfd1to2绑定
r2配置
[r2]bfd
[r2]bfd 2to1 bind peer-ip 12.0.0.1 interface g0/0/0
[r2-bfd-session-2to1]discriminator local 2
[r2-bfd-session-2to1]discriminator remote 1
[r2-bfd-session-2to1]commit
没有配置静态路由与BFD联动时关闭r2g0/0/0依然有静态路由
配置静态路由与BFD联动后关闭r2g0/0/0没有静态路由
2.单臂回声 ,R2为不支持BFD的设备时
[r1]bfd
[r1]bfd 1to2 bind peer-ip 12.0.0.2 interface g0/0/0 one-arm-echo \\创建bfd取名为1to2,远端ip为12.0.0.2,出接口为g0/0/0,开启单臂回声
[r1-bfd-session-1to2]discriminator local 1
[r1-bfd-session-1to2]commit
3.ospf和bfd联动
[r1-ospf-10]bfd all-interfaces enable \\使能bfd功能
[r1-ospf-10]bfd all-interfaces min-rx-interval 100 min-tx-interval 100 \\设置bfd最小接收间隔为100ms,最小发送间隔为100ms
[r2-ospf-10]bfd all-interfaces enable
[r2-ospf-10]bfd all-interfaces min-rx-interval 100 min-tx-interval 100
[r3-ospf-10]bfd all-interfaces enable
[r3-ospf-10]bfd all-interfaces min-rx-interval 100 min-tx-interval 100
配置ospf和bfd联动前需要等待40秒才会重新计算路由
配置ospf和bfd联动后只需要等待300毫秒就能重新计算路由
QQ:3378266435,微信:qyt3378266435
|