Steps for provisioning VRRP operation

Basic configuration process

This process assumes the following for VRRP operation:

  • VLANs on the selected routers are already configured and IP-enabled.

  • IP routing (IPv4) or IPv6 unicast-routing (IPv6) is enabled.

  • The network topology allows multiple paths for routed traffic between edge devices.

  1. Configure the owner for VRRP operation and a VR instance.

    1. On the router intended as the owner for a particular network or subnet, enter the global configuration context and enable VRRP:

      router vrrp ipv4 enableor router vrrp ipv6 enable

    2. Enter the desired VLAN context and configure a VR instance:

      vlan vid

      vrrp vrid 1 - 255 (for IPv4)

      vrrp ipv6 vrid 1-255 (for IPv6)

      This step places the CLI in the context of the specified VR.

    3. Configure the router's real IP address for the current VLAN interface as the VIP for the VR instance.

      virtual-ip-address ipaddr

    4. Activate the owner VR instance:

      enable

    5. Inspect the configuration for the owner VR:

      show vrrp vlan vid vrid vrid-# config (IPv4)

      show vrrp ipv6 vlan vid vrid vrid-# config (IPv6)

    Leave the owner's advertisement interval at its default (1 second).

  2. Configure a backup for the same VR instance as for the owner in step Step 1.

    1. On another router with an interface in the same network or subnet as is the owner configured in step Step 1, enter the global configuration context and enable VRRP:

      router vrrp ipv4 enableor router vrrp ipv6 enable

    2. Configure (and enter) the same VR instance as was configured for the owner in step Step 1:

      vlan vid

      vrrp vrid 1 - 255 (for IPv4)

      vrrp ipv6 vrid 1-255 (for IPv6)

    3. Optional: If there is only one backup router, or if you want the priority among backups to be determined by the lowest IP address among the backups, leave the VR instance priority for the current backup router at the default of 100. (Applies only to the "real" IP addresses that are part of this VR—there may be other addresses on the routers that are lower—but only the interfaces participating in the VR are part of this determination.) If you want to control backup router priority by creating a numeric hierarchy among the backup routers in the VR, set the priority on each accordingly:

      priority 1 - 254

    4. Configure the VIP for the current VR. Use the same address as you used for the owner router's instance of the VR.

      virtual-ip-address ipaddr

    5. Activate the backup VR instance:

      enable

    6. Inspect the configuration for the owner VR:

      show vrrp vlan vid vrid vrid-# config

      show vrrp ipv6 vlan vid vrid vrid-# config (for IPv6)

      Leave the advertisement interval for backup routers at the default (1 second).

  3. Repeat step 2 for each backup router on the same VR.

Example configuration

In VR 1, below, R1 is the owner and the current master router, and R2 is the (only) backup in the VR. If R1 becomes unavailable, VR 1 fails over to R2.

Example of a basic VRRP configuration

Example of a basic VRRP configuration

  VLAN 10 IP VR 1 IP Status
Router 1 10.10.10.1 10.10.10.1 owner
Router 2 10.10.10.23 10.10.10.1 backup

VRRP configuration for Router 1 (R1) in Example of a basic VRRP configuration

HP Switch(config)# router vrrp
HP Switch(config)# vlan 10
HP Switch(vlan-10)# vrrp vrid 1
HP Switch(vlan-10-vrid-1)# owner
HP Switch(vlan-10-vrid-1)# virtual-ip-address 10.10.10.1
HP Switch(vlan-10-vrid-1)# enable

HP Switch(vlan-10-vrid-1)# show vrrp vlan 10 vrid 1 config

 VRRP Virtual Router Configuration Information

  VLAN ID : 10
  Virtual Router ID : 1

  Administrative Status [Disabled] : Enabled
  Mode [Uninitialized] : owner
  Priority [100] :255
  Advertisement Interval [1] : 1
  Preempt Mode [True] : True
  Preempt Delay time [0] : 0
  Respond to Virtual IP Ping Requests [Yes] : Yes
  Version [2] : 2
  Null authentication compatibility [False] : False
  Primary IP Address : Lowest

  IP Address
  ----------------
  10.10.10.1

VRRP configuration for Router 2 (R2) in Example of a basic VRRP configuration

HP Switch(config)# router vrrp
HP Switch(config)# vlan 10
HP Switch(vlan-10)# vrrp vrid 1
HP Switch(vlan-10-vrid-1)# backup
HP Switch(vlan-10-vrid-1)# virtual-ip-address 10.10.10.1
HP Switch(vlan-10-vrid-1)# enable

HP Switch(vlan-10-vrid-1)# show vrrp vlan 10 vrid 1 config

 VRRP Virtual Router Configuration Information

  VLAN ID : 10
  Virtual Router ID : 1

  Administrative Status [Disabled] : Enabled
  Mode [Uninitialized] : backup
  Priority [100] :100
  Advertisement Interval [1] : 1
  Preempt Mode [True] : True
  Preempt Delay time [0] : 0
  Respond to Virtual IP Ping Requests [Yes] : Yes
  Version [2] : 2
  Null authentication compatibility [False] : False
  Primary IP Address : Lowest

  IP Address
  ----------------
  10.10.10.1

Associating more than one VIP with a VR

If a VLAN is configured with more than 32 subnets and it is necessary to apply VRRP to all of these subnets, it is necessary to associate more than one VIP with a VR.

Because a VLAN on the routers supports up to 32 VRs, applying VRRP to a higher number of subnets in the VLAN requires multiple VIPs in one or more VRs.

If the owner of a VR is associated with multiple VIPs, the backup routers belonging to the same VR must also be associated with the same set of VIPs. If the VIPs on the owner are not also on the backups, a misconfiguration exists. VRRP advertisement packets sent by the VR master will be dropped by the VR backups because of a mismatch among VIPs.