静态路由与BFD多跳的双向检测

静态路由与BFD多跳的双向检测

北京去往深圳有两条线路可走,优先走线路1。BFD会话检测到线路1中的某一点故障,则立即切换线路2。
静态路由与BFD多跳的双向检测_第1张图片
所有设备ip地址配置省略。
路由配置如下:
line1-A路由:
ip route-static 1.1.1.0 24 192.168.1.1
ip route-static 2.2.2.0 24 192.168.2.2
ip route-static 192.168.4.0 24 192.168.2.2
line1-B路由:
ip route-static 1.1.1.0 24 192.168.2.1
ip route-static 2.2.2.0 24 192.168.3.2
ip route-static 192.168.1.0 24 192.168.2.1
ip route-static 192.168.4.0 24 192.168.3.2
line1-C路由:
ip route-static 1.1.1.0 24 192.168.3.1
ip route-static 2.2.2.0 24 192.168.4.2
ip route-static 192.168.1.0 24 192.168.3.1
line2-A路由:
ip route-static 1.1.1.0 24 172.16.1.1
ip route-static 2.2.2.0 24 172.16.2.2
line2-B路由:
ip route-static 1.1.1.0 24 172.16.2.1
ip route-static 2.2.2.0 24 172.16.3.2
line2-C路由:
ip route-static 1.1.1.0 24 172.16.3.1
ip route-static 2.2.2.0 24 172.16.4.2
北京设备路由:
ip route-static 2.2.2.0 24 172.16.1.2
ip route-static 192.168.4.0 24 192.168.1.2
深圳设备路由:
ip route-static 1.1.1.0 24 172.16.4.1
ip route-static 192.168.1.0 24 192.168.4.1
-----------------------------
完成以上路由的配置,1.1.1.1去2.2.2.2会走线路2。现在配置北京和深圳两点之间的bfd检测和线路1的路由,bfd多跳检测两端的ip地址是192.168.1.1和192.168.4.2。两点路由可达的基础上建立BFD会话。
北京设备配置:
[Beijing]bfd multi-hop min-transmit-interval 500     #发送的时间间隔
[Beijing]bfd multi-hop min-receive-interval 500     #接收的时间间隔
[Beijing]bfd multi-hop detect-multiplier 10     #检测的次数
[Beijing]ip route-static 2.2.2.0 24 192.168.4.2 bfd control-packet bfd-source 192.168.1.1 preference 50
深圳设备配置:
[Shenzhen]bfd multi-hop min-transmit-interval 500
[Shenzhen]bfd multi-hop min-receive-interval 500
[Shenzhen]bfd multi-hop detect-multiplier 10
[Shenzhen]ip route-static 2.2.2.0 24 192.168.1.1 bfd control-packet bfd-source 192.168.4.2 preference 50

查看BFD会话:
[Beijing]display bfd session
Total Session Num: 1 Up Session Num: 1 Init Mode: Active

IPv4 session working in control packet mode:

LD/RD SourceAddr DestAddr State Holdtime Interface
2049/2049 192.168.1.1 192.168.4.2 Up 4861ms N/A
----------------------------------------------------------------------------------------
[Beijing]display bfd session verbose
Total Session Num: 1 Up Session Num: 1 Init Mode: Active

IPv4 session working in control packet mode:
Local Discr: 2049 Remote Discr: 2049
Source IP: 192.168.1.1 Destination IP: 192.168.4.2
Session State: Up Interface: N/A
Min Tx Inter: 500ms Act Tx Inter: 500ms
Min Rx Inter: 500ms Detect Inter: 5000ms
Rx Count: 23447 Tx Count: 26396
Connect Type: Indirect Running Up for: 03:07:50
Hold Time: 4669ms Auth mode: None
Detect Mode: Async Slot: 0
Protocol: STATIC
Version: 1
Diag Info: No Diagnostic
------------------------------------------------------------
以上可知北京和深圳两点的线路1的BFD双向会话建立成功,只要两点之间的某一点故障,会导致BFD会话结束,从而切换线路2。

你可能感兴趣的:(H3C产品系列)