In this example, a VRRP6 group is configured to work in master/backup mode, improving network reliability.
Hosts are connected to a network through gateway devices. To improve network reliability, configure a VRRP6 group on the gateway devices.
Interfaces 1 through 4 in this example represent GE 0/1/0, GE 0/1/8, GE 0/1/16, and GE 0/1/24, respectively.
Assign an IPv6 address to each interface on each device and configure OSPFv3 to ensure network reachability.
Create a VRRP6 group on DeviceA and DeviceB. Configure different priorities for DeviceA and DeviceB to ensure that DeviceA functions as the master device and DeviceB functions as the backup device.
IPv6 address of each interface on each device (for configuration details, see Configuration Files in this section)
ID of a VRRP6 group: 1; virtual IPv6 address: 2001:db8::100
DeviceA's priority: 120; DeviceB's priority: 100
DeviceA's preemption delay: 20 seconds
# Assign an IPv6 address to GE 0/1/0 on DeviceA. Create VRRP6 group 1 on GE 0/1/0, and set the priority of DeviceA to 120 so that DeviceA functions as the master device.
<HUAWEI> system-view [~HUAWEI] sysname DeviceA [*HUAWEI] commit [~DeviceA] interface gigabitethernet 0/1/0 [~DeviceA-GigabitEthernet0/1/0] undo shutdown [*DeviceA-GigabitEthernet0/1/0] ipv6 enable [*DeviceA-GigabitEthernet0/1/0] ipv6 address 2001:db8::1 64 [*DeviceA-GigabitEthernet0/1/0] vrrp6 vrid 1 virtual-ip fe80::1 link-local [*DeviceA-GigabitEthernet0/1/0] vrrp6 vrid 1 virtual-ip 2001:db8::100 [*DeviceA-GigabitEthernet0/1/0] vrrp6 vrid 1 priority 120 [*DeviceA-GigabitEthernet0/1/0] vrrp6 vrid 1 preempt-mode timer delay 20 [*DeviceA-GigabitEthernet0/1/0] vrrp6 recover-delay 20 [*DeviceA-GigabitEthernet0/1/0] commit [~DeviceA-GigabitEthernet0/1/0] quit [~DeviceA] quit
# Assign an IPv6 address to GE 0/1/0 on DeviceB. Create VRRP6 group 1 on GE 0/1/0, and retain the default priority for DeviceB so that DeviceB functions the backup device.
<HUAWEI> system-view [~HUAWEI] sysname DeviceB [*HUAWEI] commit [~DeviceB] interface gigabitethernet 0/1/0 [~DeviceB-GigabitEthernet0/1/0] undo shutdown [*DeviceB-GigabitEthernet0/1/0] ipv6 enable [*DeviceB-GigabitEthernet0/1/0] ipv6 address 2001:db8::2 64 [*DeviceB-GigabitEthernet0/1/0] vrrp6 vrid 1 virtual-ip fe80::1 link-local [*DeviceB-GigabitEthernet0/1/0] vrrp6 vrid 1 virtual-ip 2001:db8::100 [*DeviceB-GigabitEthernet0/1/0] commit [~DeviceB-GigabitEthernet0/1/0] quit [~DeviceB] quit
After completing the configurations, ping HostB from HostA. The ping is successful. Run the display vrrp6 verbose command on DeviceA. The command output shows that DeviceA's status is Master.
<DeviceA> display vrrp6 interface gigabitethernet0/1/0 verbose GigabitEthernet0/1/0 | Virtual Router 1 State : Master Virtual IP : FE80::1 2001:DB8::100 Master IP : 2001:DB8::1 Local IP : 2001:DB8::1 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20s Remain : -- Hold Multiplier : 4 TimerRun : 100cs TimerConfig : 100cs Virtual MAC : 00e0-fc12-7890 Check hop limit : YES Config Type : Normal Create Time : 2013-07-27 07:37:45 Last Change Time : 2013-07-27 07:47:38
Run the display vrrp6 verbose command on DeviceB. The command output shows that DeviceB's status is Backup.
<DeviceB> display vrrp6 interface gigabitethernet0/1/0 verbose GigabitEthernet0/1/0 | Virtual Router 1 State : Backup Virtual IP : FE80::1 2001:DB8::100 Master IP : 2001:DB8::1 Local IP : 2001:DB8::2 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 120 Preempt : YES Delay Time : 0s Remain : -- Hold Multiplier : 4 TimerRun : 100cs TimerConfig : 100cs Virtual MAC : 00e0-fc12-7890 Check hop limit : YES Config Type : Normal Create Time : 2013-07-27 07:50:28 Last Change Time : 2013-07-27 07:58:13
Run the shutdown command on DeviceA's GE 0/1/0 to simulate a DeviceA fault.
Run the display vrrp6 verbose command on DeviceA. The command output shows that DeviceA's status is Initialize.
<DeviceA> display vrrp6 interface gigabitethernet0/1/0 verbose GigabitEthernet0/1/0 | Virtual Router 1 State : Initialize Virtual IP : FE80::1 2001:DB8::100 Master IP : :: Local IP : 2001:DB8::1 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 0 Preempt : YES Delay Time : 20s Remain : -- Hold Multiplier : 4 TimerRun : 100cs TimerConfig : 100cs Virtual MAC : 00e0-fc12-7890 Check hop limit : YES Config Type : Normal Create Time : 2013-07-27 07:37:45 Last Change Time : 2013-07-27 07:59:38
Run the display vrrp6 verbose command on DeviceB. The command output shows that DeviceB's status is Master.
<DeviceB> display vrrp6 interface gigabitethernet0/1/0 verbose GigabitEthernet0/1/0 | Virtual Router 1 State : Master Virtual IP : FE80::1 2001:DB8::100 Master IP : 2001:DB8::2 Local IP : 2001:DB8::2 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 100 Preempt : YES Delay Time : 0s Remain : -- Hold Multiplier : 4 TimerRun : 100cs TimerConfig : 100cs Virtual MAC : 00e0-fc12-7890 Check hop limit : YES Config Type : Normal Create Time : 2013-07-27 07:50:28 Last Change Time : 2013-07-27 07:59:38
Run the undo shutdown command on DeviceA's GE 0/1/0. After GE 0/1/0 goes up, wait 20s and run the display vrrp6 verbose command on DeviceA. The command output shows that DeviceA's status is Master.
<DeviceA> display vrrp6 interface gigabitethernet0/1/0 verbose GigabitEthernet0/1/0 | Virtual Router 1 State : Master Virtual IP : FE80::1 2001:DB8::100 Master IP : 2001:DB8::1 Local IP : 2001:DB8::1 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20s Remain : -- Hold Multiplier : 4 TimerRun : 100cs TimerConfig : 100cs Virtual MAC : 00e0-fc12-7890 Check hop limit : YES Config Type : Normal Create Time : 2013-07-27 07:37:45 Last Change Time : 2013-07-27 08:04:47
DeviceA configuration file
# sysname DeviceA # ospfv3 1 router-id 1.1.1.1 # interface GigabitEthernet0/1/0 undo shutdown ipv6 enable ipv6 address 2001:DB8::1/64 vrrp6 vrid 1 virtual-ip fe80::1 link-local vrrp6 vrid 1 virtual-ip 2001:DB8::100 vrrp6 vrid 1 priority 120 vrrp6 vrid 1 preempt-mode timer delay 20 vrrp6 recover-delay 20 ospfv3 1 area 0.0.0.0 # interface GigabitEthernet0/1/8 undo shutdown ipv6 enable ipv6 address 2001:DB8:1::1/64 ospfv3 1 area 0.0.0.0 # return
DeviceB configuration file
# sysname DeviceB # ospfv3 1 router-id 2.2.2.2 # interface GigabitEthernet0/1/0 undo shutdown ipv6 enable ipv6 address 2001:DB8::2/64 vrrp6 vrid 1 virtual-ip fe80::1 link-local vrrp6 vrid 1 virtual-ip 2001:DB8::100 ospfv3 1 area 0.0.0.0 # interface GigabitEthernet0/1/8 undo shutdown ipv6 enable ipv6 address 2001:DB8:2::1/64 ospfv3 1 area 0.0.0.0 # return
DeviceC configuration file
# sysname DeviceC # ospfv3 1 router-id 3.3.3.3 # interface GigabitEthernet0/1/16 undo shutdown ipv6 enable ipv6 address 2001:DB8:3::2/64 ospfv3 1 area 0.0.0.0 # interface GigabitEthernet0/1/8 undo shutdown ipv6 enable ipv6 address 2001:DB8:1::2/64 ospfv3 1 area 0.0.0.0 # interface GigabitEthernet0/1/24 undo shutdown ipv6 enable ipv6 address 2001:DB8:2::2/64 ospfv3 1 area 0.0.0.0 # return