配置 RIP 与单臂静态 BFD 联动特性示例(IPv4)

组网需求

在小型网络中有 4 台路由器通过 RIP 协议实现网络互通。其中业务流量经过主链路 RouterA→ RouterB→RouterD 进行传输。

要求提高从 RouterA 到 RouterB 数据转发的可靠性,当主链路发生故障时,业务流量会快速切换到另一条路径进行传输。

1、拓扑图

image

2、配置思路采用如下配置思路配置 RIP 与单臂静态 BFD 联动:

1. 在各接口上配置 IP 地址,使网络可达。

2. 在各路由器上使能 RIP,基本实现网络互连。

3. 在 RouterA 上配置 RIP 与单臂静态 BFD 联动,通过 BFD 快速检测链路的状态,从而提高 RIP 的收敛速度,实现链路的快速切换。

路由器接口地址配置省略。

2.在各路由器上使能 RIP,基本实现网络互连。

A

[A]rip
[A-rip-1]version 2
[A-rip-1]network 2.0.0.0
[A-rip-1]network 3.0.0.0
[A-rip-1]quit
[A]

B

[B]rip
[B-rip-1]version 2
[B-rip-1]network 2.0.0.0
[B-rip-1]network 4.0.0.0
[B-rip-1]network 172.16.0.0
[B-rip-1]quit

C

[C]rip
[C-rip-1]version 2
[C-rip-1]network 3.0.0.0
[C-rip-1]network 4.0.0.0
[C-rip-1]quit

D

[D]rip
[D-rip-1]version 2
[D-rip-1]network 172.16.0.0
[D-rip-1]quit

查看路由器A的路由表

(去往172.16.1.0网段的下一跳是2.2.2.2,出接口是GigabitEthernet 0/0/1)

[A]dis ip routing-table protocol rip
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : RIP
         Destinations : 2        Routes : 3

RIP routing table status : <Active>
         Destinations : 2        Routes : 3

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        4.4.4.0/24  RIP     100  1           D   2.2.2.2         GigabitEthernet
0/0/1
                    RIP     100  1           D   3.3.3.2         GigabitEthernet
0/0/2
     172.16.1.0/24  RIP     100  1           D   2.2.2.2         GigabitEthernet
0/0/1

RIP routing table status : <Inactive>
         Destinations : 0        Routes : 0

[A]

3. 在 RouterA 上配置 RIP 与单臂静态 BFD 联动,通过 BFD 快速检测链路的状态,从而提高 RIP 的收敛速度,实现链路的快速切换。

配置路由器A 单臂BFD特性

[A]bfd
[A-bfd]quit
[A]bfd 1 bind peer-ip 2.2.2.2 interface GigabitEthernet 0/0/1 one-arm-echo
[A-bfd-session-1]discriminator local 1
[A-bfd-session-1]min-echo-rx-interval 200
[A-bfd-session-1]commit
[A-bfd-session-1]quit

使能接口 GigabitEthernet0/0/1静态 BFD 功能

[A]int g0/0/1
[A-GigabitEthernet0/0/1]rip bfd static
[A-GigabitEthernet0/0/1]quit

查看BFD会话

[A]dis bfd session all
--------------------------------------------------------------------------------
Local Remote     PeerIpAddr      State     Type        InterfaceName
--------------------------------------------------------------------------------

1     -          2.2.2.2         Up        S_IP_IF     GigabitEthernet0/0/1
--------------------------------------------------------------------------------
     Total UP/DOWN Session Number : 1/0
[A]

4、测试BFD 联动快速收敛

模拟故障,在路由器上关闭G0/0/1接口。

BFD会话关闭

[A]dis bfd session all
--------------------------------------------------------------------------------
Local Remote     PeerIpAddr      State     Type        InterfaceName
--------------------------------------------------------------------------------

1     -          2.2.2.2         Down      S_IP_IF     GigabitEthernet0/0/1
--------------------------------------------------------------------------------
     Total UP/DOWN Session Number : 0/1
[A]

查看路由器A的路由表

[A]dis ip routing-table protocol rip
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : RIP
         Destinations : 2        Routes : 2

RIP routing table status : <Active>
         Destinations : 2        Routes : 2

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        4.4.4.0/24  RIP     100  1           D   3.3.3.2         GigabitEthernet
0/0/2
     172.16.1.0/24  RIP     100  2           D   3.3.3.2         GigabitEthernet
0/0/2

RIP routing table status : <Inactive>
         Destinations : 0        Routes : 0

[A]

由路由表可以看出,在主链路发生故障之后备份链路 A→C→B 被启用,去往 172.16.1.0/24 的路由下一跳地址是 3.3.3.2,出接口为 GigabitEthernet0/0/2。

(实现链路故障后,rip路由快速收敛切换)


读书和健身总有一个在路上

posted @ 2020-09-14 16:48  Renqy  阅读(580)  评论(0编辑  收藏  举报