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 Single-backup Group

Network Requirements

  • On Device1 and Device2, create one single VRRP backup group so that Device1 and Device2 share one virtual IP address, realizing the backup for the default gateway of the user host and reducing the interruption time of the network.

Network Topology

Networking of configuring VRRP single backup group

Figure 5-3 Networking of configuring VRRP single backup group

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.

#On Device1, configure VRRP group 1, the virtual IP address is 10.1.1.3, and configure the priority as 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

#On Device2, configure VRRP group1 and 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

Step 4: Check the result.

#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 

We can see that the VRRP status of Device1 is Master and the VRRP status of Device2 is Backup. Device1 and Device2 share one virtual IP address. The host communicates with the network via the address. When Device1 fails, Device2 switches to Master at once for forwarding data.

note


  • The election principle of the VRRP status is by priority. The one with large priority is Master. If the priorities are the same, compare according to the IP address of the interface. The one with large IP address is Master.
  • By default, VRRP works in the preemption mode. The default priority is 100.