Configuring an IPv4 VRRP group

About IPv4 VRRP group

A VRRP group can operate correctly after you create it and assign a minimum of one virtual IP address to it. You can configure multiple virtual IP addresses for the VRRP group on an interface that connects to multiple subnets for router backup on different subnets.

If you disable an IPv4 VRRP group, the VRRP group enters Initialize state, and the existing configuration on the VRRP group remains unchanged. You can modify the configuration of the VRRP group. The modification takes effect when you enable the VRRP group again.

Restrictions and guidelines

Item

Remarks

VLAN interface

Do not create a VRRP group on the VLAN interface of a super VLAN because network performance might be adversely affected. For information about the super VLAN feature, see Layer 2—LAN Switching Configuration Guide.

Maximum number of VRRP groups and virtual IP addresses

In VRRP load balancing mode, the device supports a maximum of MaxVRNum/N VRRP groups. MaxVRNum refers to the maximum number of VRRP groups supported by the device in VRRP standard mode. N refers to the number of devices in the VRRP group.

Virtual IP address

When VRRP is operating in standard mode, the virtual IP address of a VRRP group can be either of the following addresses:

  • Unused IP address on the subnet where the VRRP group resides.

  • IP address of an interface on a router in the VRRP group.

In load balancing mode, the virtual IP address of a VRRP group can be any unassigned IP address of the subnet where the VRRP group resides. It cannot be the IP address of any interfaces in the VRRP group. No IP address owner can exist in a VRRP group.

An IPv4 VRRP group without virtual IP addresses configured can exist on a device provided that other settings (for example, priority and preemption mode) are available. Such a VRRP group stays in inactive state and does not function.

For hosts in the subnet to access external networks, as a best practice, configure the following addresses in the same subnet:

  • Virtual IP address of an IPv4 VRRP group.

  • Downlink interface IP addresses of the VRRP group members.

IP address owner

On an IP address owner, as a best practice, do not use the network command to enable OSPF on the interface owning the virtual IP address of the VRRP group. For more information about the network command, see Layer 3—IP Routing Command Reference.

Removal of the VRRP group on the IP address owner causes IP address collision. To avoid the collision, change the IP address of the interface on the IP address owner before you remove the VRRP group from the interface.

The running priority of an IP address owner is always 255, and you do not need to configure it. An IP address owner always operates in preemptive mode.

If you configure the vrrp vrid track priority reduced or vrrp vrid track switchover command on an IP address owner, the configuration does not take effect until the router becomes a non-IP address owner.

VRRP association with a track entry

When the track entry changes from Negative to Positive or Notready, the router automatically restores its priority or the failed master router becomes the master again.

Creating a VRRP group and assigning a virtual IP address

  1. Enter system view.

    system-view

  2. Enter interface view.

    interface interface-type interface-number

  3. Create a VRRP group and assign a virtual IP address.

    vrrp vrid virtual-router-id virtual-ip virtual-address

Configuring an IPv4 VRRP group

  1. Enter system view.

    system-view

  2. Enter interface view.

    interface interface-type interface-number

  3. Set the priority of the router in the VRRP group.

    vrrp vrid virtual-router-id priority priority-value

    The default setting is 100.

  4. Enable the preemptive mode for the router in a VRRP group and set the preemption delay time.

    vrrp vrid virtual-router-id preempt-mode [ delay delay-value ]

    By default, the router in a VRRP group operates in preemptive mode and the preemption delay time is 0 centiseconds, which means an immediate preemption.

  5. Associate a VRRP group with a track entry.

    vrrp vrid virtual-router-id track track-entry-number { forwarder-switchover member-ip ip-address | priority reduced [ priority-reduced ] | switchover | weight reduced [ weight-reduced ] }

    By default, a VRRP group is not associated with any track entries.

Disabling an IPv4 VRRP group

  1. Enter system view.

    system-view

  2. Enter interface view.

    interface interface-type interface-number

  3. Disable a VRRP group.

    vrrp vrid virtual-router-id shutdown