BFD Realizes VRRP Fast Switchover

1. Project background

In order to meet the user's high reliability requirements for the network, the original network adopted the router dual-machine hot backup method and configured vrrp. However, the switching speed between the active router R1 and the standby router R2 in vrrp is not fast enough. The administrator hopes that VRRP and BFD can be linked to achieve fast switching. At the same time, in order to prevent the network interruption caused by the failure of the uplink of the active router R1, BFD technology monitoring is required. uplink.

2. Project tasks

(1) Configure the interface IP address and routing protocol of each device to make the network reachable.

(2) Configure a vrrp backup group on routers R1 and R2, where R1 has a priority of 120 and a preemption time of 5s as the primary router; R2 has a default priority of 100 and a preemption time of 0 and is a backup router.

(3) Configure dynamic BFD sessions on routers R1 and R2 to monitor the link between router R1 and router R2.

(4) Configure the linkage between vrrp and BFD on router R2.

(5) Configure dynamic BFD sessions on routers R1 and R3 to monitor the link between routers R1 and R3.

(6) Configure VRRP and BFD linkage on router R1. When the uplink fails, trigger the VRRP backup group to perform active/standby switchover.

3. Project implementation

R1

Configure interfaces and routing protocols

<Huawei>undo t m
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]int gig0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.1.1.1 24
[R1-GigabitEthernet0/0/0]q
[R1]int gig0/0/1
[R1-GigabitEthernet0/0/1]ip add 10.1.2.1 24
[R1-GigabitEthernet0/0/1]q
[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]q
[R1-ospf-1]q
[R1]dis ip routing-table  //显示路由表

Configure a VRRP backup group

[R1]int gig0/0/0
[R1-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 10.1.1.254 [
R1-GigabitEthernet0/0/0]vrrp vrid 1 priority 120
[R1-GigabitEthernet0/0/0] vrrp vrid 1 preempt-mode timer delay 5
[R1-GigabitEthernet0/0/0]q

Configure BFD session
[R1]bfd 
[R1-bfd]bfd atob bind peer-ip 10.1.1.2 source-ip 10.1.1.1 auto [
R1-bfd-session-atob]commit
[R1-bfd-session-atob]q
[R1 ]bfd atoc bind peer-ip 10.1.2.2 source-ip 10.1.2.1 auto
[R1-bfd-session-atoc]commit
[R1-bfd-session-atoc]q
[R1]dis bfd session all //View BFD session status

Configure VRRP and BFD linkage
[R1-GigabitEthernet0/0/0]vrrp vrid 1 track bfd-session session-name atoc reduced
 25
[R1]dis vrrp br //Display the backup group

R2

Configure interfaces and routing protocols

<Huawei>undo t m
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int gig0/0/0
[R2-GigabitEthernet0/0/0]ip add 10.1.1.2 24
[R2-GigabitEthernet0/0/0]int gig0/0/1
[R2-GigabitEthernet0/0/1]ip add 10.1.3.1 24
[R2-GigabitEthernet0/0/1]q
[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.1.3.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]q
[R2-ospf-1]q  
[R2]dis ip routing-table  //显示路由表

Configure a VRRP backup group

[R2]int gig0/0/0
[R2-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 10.1.1.254
[R2-GigabitEthernet0/0/0]vrrp vrid 1 priority 100
[R2-GigabitEthernet0/0/0]vrrp vrid 1 preempt-mode timer delay 0
[R2-GigabitEthernet0/0/0]q

Configure a BFD session

[R2]bfd
[R2-bfd]bfd btoa bind peer-ip 10.1.1.1 source-ip 10.1.1.2 auto
[R2-bfd-session-btoa]commit
[R2-bfd-session-btoa]q
[R2]dis bfd
session all Configure VRRP and BFD  linkage
to achieve fast switching



R3

配置接口以及路由协议
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo in e
Info: Information center is disabled.
[Huawei]sysname R3
[R3]int loopback 1
[R3-LoopBack1]ip add 10.1.4.1 24
[R3-LoopBack1]q
[R3]int gig0/0/0
[R3-GigabitEthernet0/0/0]ip add 10.1.2.2 24
[R3-GigabitEthernet0/0/0]int gig0/0/1
[R3-GigabitEthernet0/0/1]ip add 10.1.3.2 24
[R3-GigabitEthernet0/0/1]q
[R3]ospf 1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 10.1.3.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 10.1.4.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]q

Configure a BFD session

[R3]bfd 
[R3-bfd]bfd ctoa bind peer-ip 10.1.2.1 source-ip 10.1.2.2 auto
[R3-bfd-session-ctoa]commit
[R3-bfd-session-ctoa]q

Guess you like

Origin blog.csdn.net/qq_51988717/article/details/127058485
bfd