Vrrpv6
Examples for High Availability (VRRP) using IPv6
Test using alarm to notify VRRP state change
Description
This example illustrates how to notify the VRRP state with the alarm. Sets an alarm to trigger actions or alerts when there is a state change in the VRRP 4 group (e.g., when a backup router becomes master).
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address '20::1/64' set interfaces ethernet eth0 vrrp vrrp-group 1 advisor vrrp_adv set interfaces ethernet eth0 vrrp vrrp-group 1 alarm vrrp_al set interfaces ethernet eth0 vrrp vrrp-group 1 preempt set interfaces ethernet eth0 vrrp vrrp-group 1 priority 200 set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '10::1' set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '20::3' set protocols static route6 '::/0' next-hop '20::2' set system advisor vrrp_adv test 'not r_al' set system alarm r_al set system alarm vrrp_al set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address '20::2/64' set interfaces ethernet eth0 vrrp vrrp-group 1 priority 100 set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '10::1' set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '20::3' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Run the command system vrrp show on DUT0 and check whether the output contains the following tokens:
MASTERShow output
-------------------------------------------------------------------------------- Interface Group State RFC Compliant Addr Owner Last Transition Sync Group -------------------------------------------------------------------------------- eth0 1 MASTER yes no 0:00:01 none
Step 4: Run the command system vrrp show on DUT1 and check whether the output contains the following tokens:
BACKUPShow output
-------------------------------------------------------------------------------- Interface Group State RFC Compliant Addr Owner Last Transition Sync Group -------------------------------------------------------------------------------- eth0 1 BACKUP yes no 0:00:03 none
Note
No state changes in vrrp-group 1, so alarm state is false.
Step 5: Run the command system alarm vrrp_al show on DUT0 and check whether the output contains the following tokens:
falseShow output
-------------------------------------------------------------------------------------------------------------- Alarm Status Toggled Prev-toggled Toggle-count Time up (%) -------------------------------------------------------------------------------------------------------------- vrrp_al false 2026-07-24 16:11:23.626558+00:00 2026-07-24 16:11:20.615442+00:00 2 65.27
Step 6: Modify the following configuration lines in DUT0 :
set interfaces ethernet eth0 vrrp vrrp-group 1 priority 50
Step 7: Run the command system vrrp show on DUT0 and check whether the output contains the following tokens:
BACKUPShow output
-------------------------------------------------------------------------------- Interface Group State RFC Compliant Addr Owner Last Transition Sync Group -------------------------------------------------------------------------------- eth0 1 BACKUP yes no 0:00:00 none
Step 8: Run the command system vrrp show on DUT1 and check whether the output contains the following tokens:
MASTERShow output
-------------------------------------------------------------------------------- Interface Group State RFC Compliant Addr Owner Last Transition Sync Group -------------------------------------------------------------------------------- eth0 1 MASTER yes no 0:00:01 none
Note
State has changed in vrrp-group 1, so alarm state is true.
Step 9: Run the command system alarm vrrp_al show on DUT0 and check whether the output contains the following tokens:
trueShow output
-------------------------------------------------------------------------------------------------------------- Alarm Status Toggled Prev-toggled Toggle-count Time up (%) -------------------------------------------------------------------------------------------------------------- vrrp_al true 2026-07-24 16:11:26.364750+00:00 2026-07-24 16:11:23.626558+00:00 3 51.84
Test using advisor to change VRRP state
Description
This example illustrates how to change the VRRP state with the advisor. If the status of the specified advisor becomes FALSE, a backup router can take over and become master.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address '20::1/64' set interfaces ethernet eth0 vrrp vrrp-group 1 advisor vrrp_adv set interfaces ethernet eth0 vrrp vrrp-group 1 alarm vrrp_al set interfaces ethernet eth0 vrrp vrrp-group 1 preempt set interfaces ethernet eth0 vrrp vrrp-group 1 priority 200 set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '10::1' set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '20::3' set protocols route-monitor prefix '::/0' alarm r_al set protocols static route6 '::/0' next-hop '20::2' set system advisor vrrp_adv test 'not r_al' set system alarm r_al set system alarm vrrp_al set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address '20::2/64' set interfaces ethernet eth0 vrrp vrrp-group 1 priority 100 set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '10::1' set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '20::3' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Run the command system vrrp show on DUT0 and check whether the output contains the following tokens:
MASTERShow output
-------------------------------------------------------------------------------- Interface Group State RFC Compliant Addr Owner Last Transition Sync Group -------------------------------------------------------------------------------- eth0 1 MASTER yes no 0:00:00 none
Step 4: Run the command system vrrp show on DUT1 and check whether the output contains the following tokens:
BACKUPShow output
-------------------------------------------------------------------------------- Interface Group State RFC Compliant Addr Owner Last Transition Sync Group -------------------------------------------------------------------------------- eth0 1 BACKUP yes no 0:00:00 none
Note
Alarm “r_al” is set to false beacause it is triggered if the route ::/0 is missing, so the advisor “not r_al” is set to true because it is the opposite of “r_al”.
Step 5: Run the command system alarm r_al show on DUT0 and check whether the output contains the following tokens:
falseShow output
------------------------------------------------------------------------------------------------------------ Alarm Status Toggled Prev-toggled Toggle-count Time up (%) ------------------------------------------------------------------------------------------------------------ r_al false 2026-07-24 16:11:41.191341+00:00 2026-07-24 16:11:36.191730+00:00 2 57.51
Step 6: Run the command system advisor vrrp_adv show on DUT0 and check whether the output contains the following tokens:
trueShow output
--------------------------------------------------------------------------------------------------------------- Advisor Status Toggled Prev-toggled Toggle-count Time up (%) --------------------------------------------------------------------------------------------------------------- vrrp_adv true 2026-07-24 16:11:41.195679+00:00 2026-07-24 16:11:36.570663+00:00 2 47.14
Step 7: Modify the following configuration lines in DUT0 :
delete protocols static
Note
The route ::/0 is missing alarm “r_al” is triggered and the advisor “not r_al” is set to false, which means that the backup router can take over and become master.
Step 8: Run the command system advisor vrrp_adv show on DUT0 and check whether the output contains the following tokens:
falseShow output
--------------------------------------------------------------------------------------------------------------- Advisor Status Toggled Prev-toggled Toggle-count Time up (%) --------------------------------------------------------------------------------------------------------------- vrrp_adv false 2026-07-24 16:11:46.197654+00:00 2026-07-24 16:11:41.195679+00:00 3 47.47
Step 9: Run the command system vrrp show on DUT0 and check whether the output contains the following tokens:
FAULTShow output
------------------------------------------------------------------------------- Interface Group State RFC Compliant Addr Owner Last Transition Sync Group ------------------------------------------------------------------------------- eth0 1 FAULT yes no 0:00:01 none
Step 10: Run the command system vrrp show on DUT1 and check whether the output contains the following tokens:
MASTERShow output
-------------------------------------------------------------------------------- Interface Group State RFC Compliant Addr Owner Last Transition Sync Group -------------------------------------------------------------------------------- eth0 1 MASTER yes no 0:00:01 none
Test VRRP source-address
Description
Captures VRRP packets and verifies the source address is correct.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address '20::1/64' set interfaces ethernet eth0 vrrp vrrp-group 1 advisor vrrp_adv set interfaces ethernet eth0 vrrp vrrp-group 1 alarm vrrp_al set interfaces ethernet eth0 vrrp vrrp-group 1 preempt set interfaces ethernet eth0 vrrp vrrp-group 1 priority 200 set interfaces ethernet eth0 vrrp vrrp-group 1 source-address '20::1' set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '10::1' set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '20::3' set protocols static route6 '::/0' next-hop '20::2' set system advisor vrrp_adv test 'not r_al' set system alarm r_al set system alarm vrrp_al set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
Source address is 20::1.
Step 2: Run the command system vrrp show on DUT0 and check whether the output contains the following tokens:
MASTERShow output
-------------------------------------------------------------------------------- Interface Group State RFC Compliant Addr Owner Last Transition Sync Group -------------------------------------------------------------------------------- eth0 1 MASTER yes no 0:00:01 none
Step 3: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address '20::2/64' set interfaces ethernet eth0 vrrp vrrp-group 1 priority 100 set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '10::1' set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '20::3' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
Capture packets and show one:
Note
Source and destination addresses. ff02::12 is the IPv6 multicast address used by VRRPv3 for sending hello messages.
Show output
6 2026-07-24 16:12:05.830744737 20::1 → ff02::12 VRRP 94 Announcement (v3)
Test advertise-interval
Description
Extracts timestamps from VRRP packets and calculates intervals between them.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address '20::1/64' set interfaces ethernet eth0 vrrp vrrp-group 1 advertise-interval 2 set interfaces ethernet eth0 vrrp vrrp-group 1 priority 200 set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '10::1' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Run the command system vrrp show on DUT0 and check whether the output contains the following tokens:
MASTERShow output
-------------------------------------------------------------------------------- Interface Group State RFC Compliant Addr Owner Last Transition Sync Group -------------------------------------------------------------------------------- eth0 1 MASTER yes no 0:00:00 none
Step 3: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address '20::2/64' set interfaces ethernet eth0 vrrp vrrp-group 1 priority 100 set interfaces ethernet eth0 vrrp vrrp-group 1 virtual-address '10::1' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'