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.
-
Configure the owner for VRRP operation and a VR instance.
-
On the router intended as the owner for a particular network or subnet, enter the global configuration context and enable VRRP:
-
Enter the desired VLAN context and configure a VR instance:
vrrp ipv6 vrid 1-255
(for IPv6)This step places the CLI in the context of the specified VR.
-
Configure the router's real IP address for the current VLAN interface as the VIP for the VR instance.
-
Inspect the configuration for the owner VR:
Leave the owner's advertisement interval at its default (1 second).
-
-
Configure a backup for the same VR instance as for the owner in step Step 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:
-
Configure (and enter) the same VR instance as was configured for the owner in step Step 1:
-
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:
-
Configure the VIP for the current VR. Use the same address as you used for the owner router's instance of the VR.
-
Inspect the configuration for the owner VR:
show vrrp vlan
vid
vridvrid-#
configshow vrrp ipv6 vlan
(for IPv6)vid
vridvrid-#
configLeave the advertisement interval for backup routers at the default (1 second).
-
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.
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
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.