Multiple VRRP groups configuration example
To implement load sharing between the VRRP groups, manually configure the default gateway 1::10 for some hosts and 1::20 for the other hosts on the subnet 1::/64.
Network requirements
As shown in Figure 27, Router A and Router B form two VRRP groups to implement load sharing and mutual backup. VRRP group 1 uses the virtual IP address 1::10/64 to provide gateway service for some hosts on the subnet 1::/64. VRRP group 2 uses the virtual IP address 1::20/64 to provide gateway service for the other hosts on the subnet.
Figure 27: Network diagram
Configuration procedure
Configure Router A:
# Specify an IPv6 address for Router A.
<RouterA> system-view [RouterA] interface gigabitethernet 1/0/1 [RouterA-GigabitEthernet1/0/1] ipv6 address fe80::1 link-local [RouterA-GigabitEthernet1/0/1] ipv6 address 1::1 64
# Create VRRP group 1, and set its virtual IPv6 addresses to FE80::10 to 1::10.
[RouterA-GigabitEthernet1/0/1] vrrp ipv6 vrid 1 virtual-ip fe80::10 link-local [RouterA-GigabitEthernet1/0/1] vrrp ipv6 vrid 1 virtual-ip 1::10
# Assign a higher priority to Router A than Router B in VRRP group 1, so Router A can become the master in the group.
[RouterA-GigabitEthernet1/0/1] vrrp ipv6 vrid 1 priority 110
# Create VRRP group 2, and set its virtual IPv6 addresses to FE80::20 and 1::20.
[RouterA-GigabitEthernet1/0/1] vrrp ipv6 vrid 2 virtual-ip fe80::20 link-local [RouterA-GigabitEthernet1/0/1] vrrp ipv6 vrid 2 virtual-ip 1::20
Configure Router B:
# Specify an IPv6 address for Router B.
<RouterB> system-view [RouterB] interface gigabitethernet 1/0/1 [RouterB-GigabitEthernet1/0/1] ipv6 address fe80::2 link-local [RouterB-GigabitEthernet1/0/1] ipv6 address 1::2 64
# Create VRRP group 1, and set its virtual IPv6 addresses to FE80::10 and 1::10.
[RouterB-GigabitEthernet1/0/1] vrrp ipv6 vrid 1 virtual-ip fe80::10 link-local [RouterB-GigabitEthernet1/0/1] vrrp ipv6 vrid 1 virtual-ip 1::10
# Create VRRP group 2, and set its virtual IPv6 addresses to FE80::20 and 1::20.
[RouterB-GigabitEthernet1/0/1] vrrp ipv6 vrid 2 virtual-ip fe80::20 link-local [RouterB-GigabitEthernet1/0/1] vrrp ipv6 vrid 2 virtual-ip 1::20
# Assign Router B a higher priority than Router A in VRRP group 2, so Router B can become the master in the group.
[RouterB-GigabitEthernet1/0/1] vrrp ipv6 vrid 2 priority 110
Verifying the configuration
# Display detailed information about the VRRP groups on Router A.
[RouterA-GigabitEthernet1/0/1] display vrrp ipv6 verbose IPv6 Virtual Router Information: Running Mode : Standard Total number of virtual routers : 2 Interface GigabitEthernet1/0/1 VRID : 1 Adver Timer : 100 Admin Status : Up State : Master Config Pri : 110 Running Pri : 110 Preempt Mode : Yes Delay Time : 0 Auth Type : None Virtual IP : FE80::10 1::10 Virtual MAC : 0000-5e00-0201 Master IP : FE80::1 Interface GigabitEthernet1/0/1 VRID : 2 Adver Timer : 100 Admin Status : Up State : Backup Config Pri : 100 Running Pri : 100 Preempt Mode : Yes Delay Time : 0 Become Master : 410ms left Auth Type : None Virtual IP : FE80::20 1::20 Master IP : FE80::2
# Display detailed information about the VRRP groups on Router B.
[RouterB-GigabitEthernet1/0/1] display vrrp ipv6 verbose IPv6 Virtual Router Information: Running Mode : Standard Total number of virtual routers : 2 Interface GigabitEthernet1/0/1 VRID : 1 Adver Timer : 100 Admin Status : Up State : Backup Config Pri : 100 Running Pri : 100 Preempt Mode : Yes Delay Time : 0 Become Master : 407ms left Auth Type : None Virtual IP : FE80::10 1::10 Master IP : FE80::1 Interface GigabitEthernet1/0/1 VRID : 2 Adver Timer : 100 Admin Status : Up State : Master Config Pri : 110 Running Pri : 110 Preempt Mode : Yes Delay Time : 0 Auth Type : None Virtual IP : FE80::20 1::20 Virtual MAC : 0000-5e00-0202 Master IP : FE80::2
The output shows the following information:
Router A is operating as the master in VRRP group 1 to forward Internet traffic for hosts that use the default gateway 1::10/64.
Router B is operating as the master in VRRP group 2 to forward Internet traffic for hosts that use the default gateway 1::20/64.