Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure VRRP to Link with Track Example

Network Requirements

  • Enable VRRP between Device1 and Device2; Device1 and Device2 share one virtual IP address, realizing the backup of the default gateway of the user host.
  • Device1 monitors the status of the interface VLAN3 via Track. When the uplink port VLAN3 of Device1 is down, VRRP can feel and switch the status, making Backup become new Master for forwarding data.

Network Topology

Networking of VRRP linking with Track

Figure 5-5 Networking of VRRP linking with Track

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 110.

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 110
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.1 
  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.1/24 
    State : Master 
    Normal priority : 110 
    Currnet priority : 110 
    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 VRRP to link with Track.

#On Device1, configure VRRP to link with Track and monitor the uplink interface VLAN3; configure the priority decrement as 20.

Device1(config)#interface vlan 2
Device1(config-if-vlan2)#vrrp 1 track vlan3 20
Device1(config-if-vlan2)#exit

# View the VRRP status of Device1.

Device1#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 , installed into HW 
    Depend prefix:10.1.1.1/24 
    State : Master 
    Normal priority : 110 
    Currnet priority : 110 
    Priority reduced : 0 
    Preempt-mode : YES 
    Advertise-interval : 1 
    Authentication Mode : None 
      Track interface : vlan3 
      Reduce : 20 
      Reduce state : NO 

When the uplink interface VLAN3 of Device1 is down, the VRRP priority is reduced by 20. Here, the priority of Device2 is high, so the status changes.

#View the VRRP status of Device1.

Device1#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 : 110 
    Currnet priority : 90 
    Priority reduced : 20 
    Preempt-mode : YES 
    Advertise-interval : 1 
    Authentication Mode : None 
      Track interface : vlan3 
      Reduce : 20 
      Reduce state : YES

#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 , 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 

note


  • If the association of VRRP and Track needs to reach the fast switching, we can configure switchover low-pri-master on Backup.