CÔNG TY TNHH CÔNG NGHỆ VIỆT THÁI DƯƠNG
Logo CNTTShop.vn

NTT03, Line 1, Thống Nhất Complex, Thanh Xuân, Hà Nội.
Danh mục sản phẩm

Configure VRRP to Link with BFD

Network Requirements

  • Enable VRRP between Device1 and Device2.
  • The VRRP status switching time of Device1 and Device2 needs at least 3s and the service interruption time is long. It is necessary to configure the VRRP and BFD association on Device1 and Device2, realizing the ms-level switching.

Network Topology

Networking of VRRP linking with BFD

Figure 5-6 Networking of VRRP linking with BFD

Configuration Steps

Step 1: Configure VLAN and add the port to the corresponding VLAN.(Omitted)

Step 2: Configure the IP address of the interface.(Omitted)

Step 3: Create the VRRP group.

#Configure the VRRP group 1 on Device1; the virtual IP address is 10.1.1.3 and the priority is 105.

Device1#configure terminal
Device1(config)#interface vlan 2
Device1(config-if-vlan2)#vrrp 1 ip 10.1.1.3
Device1(config-if-vlan2)#vrrp 1 priority 105
Device1(config-if-vlan2)#exit

#Configure the VRRP group 1 on Device2; the virtual IP address is 10.1.1.3.

Device2#configure terminal
Device2(config)#interface vlan 2
Device2(config-if-vlan2)#vrrp 1 ip 10.1.1.3
Device2(config-if-vlan2)#exit

#View the VRRP status of Device1.

Device1#show vrrp
Interface vlan2 (Flags 0x1) 
  Pri-addr : 10.1.1.2 
  Vrf : 0 
  Virtual router : 1 
    Virtual IP address : 10.1.1.3 
    Virtual MAC address : 00-00-5e-00-01-01 , installed into HW 
    Depend prefix:10.1.1.2/24 
    State : Master 
    Normal priority : 105 
    Currnet priority : 105 
    Priority reduced : 0 
    Preempt-mode : YES 
    Advertise-interval : 1 
    Authentication Mode : None

#View the VRRP status of Device2.

Device2#show vrrp  
Interface vlan2 (Flags 0x1) 
  Pri-addr : 10.1.1.2 
  Vrf : 0 
  Virtual router : 1 
    Virtual IP address : 10.1.1.3 
    Virtual MAC address : 00-00-5e-00-01-01 
    Depend prefix:10.1.1.2/24 
    State : Backup 
    Master addr : 10.1.1.1 
    Normal priority : 100 
    Currnet priority : 100 
    Priority reduced : 0 
    Preempt-mode : YES 
    Advertise-interval : 1 
    Authentication Mode : None 

Step 4: Configure Track to link with BFD.

#Configure Track to link with BFD on Device1.

Device1(config)#track 1
Device1(config-track)#bfd interface vlan2 remote-ip 10.1.1.2 local-ip 10.1.1.1
Device1(config-track)#exit

#Configure Track to link with BFD on Device2.

Device2#configure terminal
Device2(config)#track 1
Device2(config-track)#bfd interface vlan2 remote-ip 10.1.1.1 local-ip 10.1.1.2
Device2(config-track)#exit

#View the BFD status on Device1.

Device1#show bfd session  
OurAddr     NeighAddr    LD/RD   State  Holddown   interface       
10.1.1.1    10.1.1.2     6/7     UP     5000       vlan2 

#View the BFD status on Device2.

Device2#show bfd session  
OurAddr     NeighAddr    LD/RD   State  Holddown   interface       
10.1.1.2    10.1.1.1     7/6     UP     5000       vlan2 

Step 5: Configure VRRP to link with Track.

#Configure VRRP to link with Track on Device2 and configure switchover.

Device2(config)#interface vlan 2
Device2(config-if-vlan2)#vrrp 1 track 1 switchover
Device2(config-track)#exit

Step 6: Check the result.

#View the VRRP status on Device2.

Device2#show vrrp  
 Interface vlan2 (Flags 0x1) 
  Pri-addr : 10.1.1.1 
  Vrf : 0 
  Virtual router : 1 
    Virtual IP address : 10.1.1.3 
    Virtual MAC address : 00-00-5e-00-01-01 
    Depend prefix:10.1.1.1/24 
    State : Backup 
    Master addr : 10.1.1.2 
    Normal priority : 100 
    Currnet priority : 100 
    Priority reduced : 0 
    Preempt-mode : YES 
    Advertise-interval : 1 
    Authentication Mode : None 
      Track object : 1 
      Switchover state : NO 

When Device1 line fails, BFD session is down and Track also becomes down. Device2 feels at once and switches to Master forwarding data.

#View the BFD and VRRP status on Device2.

Device2#show bfd session  
OurAddr     NeighAddr    LD/RD   State   Holddown   interface       
10.1.1.2    10.1.1.1     7/0     DOWN    5000       vlan2
Device2#show vrrp  
Interface vlan2 (Flags 0x1) 
  Pri-addr : 10.1.1.2 
  Vrf : 0 
  Virtual router : 1 
    Virtual IP address : 10.1.1.3 
    Virtual MAC address : 00-00-5e-00-01-01 , installed into HW 
    Depend prefix:10.1.1.2/24 
    State : Master 
    Normal priority : 100 
    Currnet priority : 100 
    Priority reduced : 0 
    Preempt-mode : YES 
    Advertise-interval : 1 
    Authentication Mode : None 
      Track object : 1 
      Switchover state : YES 

note


  • When VRRP links with Track, Switchover needs to be configured on Backup. Once finding Track down, switch to Master at once.