Ntp Dhcpv6
Test suite to check NTP server discovery via DHCPv6 and dynamic NTP server change when DHCPv6 option is updated.
Test NTP Server Via DHCPv6
Description
Test to check the NTP server is announced by DHCPv6 and that changing the NTP server option triggers a dynamic reconfiguration of the NTP client.
Scenario
Step 1: Run the command set date 2019-01-01 10:00:00 on DUT1.
Step 2: Run the command show date on DUT1 and check whether the output contains the following tokens:
Tue 01 Jan 2019Show output
Tue 01 Jan 2019 10:00:00 +00:00
Step 3: Run the command set date 2019-06-15 10:00:00 on DUT2.
Step 4: Run the command show date on DUT2 and check whether the output contains the following tokens:
Sat 15 Jun 2019Show output
Sat 15 Jun 2019 10:00:00 +00:00
Step 5: Run the command set date 2019-02-01 12:00:00 on DUT0.
Step 6: Run the command show date on DUT0 and check whether the output contains the following tokens:
Fri 01 Feb 2019Show output
Fri 01 Feb 2019 12:00:00 +00:00
Step 7: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address '10::1/64' set interfaces ethernet eth0 ipv6 router-advert interval 2 set interfaces ethernet eth1 address '20::1/64' set service dhcpv6-server options code 56 data ip-address '10::1' set service dhcpv6-server options code 56 name ntp-servers set service dhcpv6-server shared-network dhcpv6server subnet '20::/64' address-range start '20::50' stop '20::50' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system ntp master prefer set system ntp master stratum 3
Step 8: Set the following configuration in DUT2 :
set interfaces ethernet eth0 address '10::2/64' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system ntp master prefer set system ntp master stratum 3
Step 9: Run the command system ntp status on DUT0 and check whether the output contains the following tokens:
NTP is not runningShow output
NTP is not running
Step 10: Set the following configuration in DUT0 :
set interfaces ethernet eth0 ipv6 address autoconf set interfaces ethernet eth0 ipv6 disable-forwarding set interfaces ethernet eth1 address dhcpv6 set interfaces ethernet eth1 dhcpv6 client parameters-only set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system ntp server dhcpv6 interface eth1
Step 11: Run the command show monitor-db system dhcpv6 interface eth1 on DUT0 and check whether the output contains the following tokens:
ntp-serversShow output
ntp-servers: 10::1 reason: RENEW6
Step 12: Run the command system ntp status on DUT0 and check whether the output contains the following tokens:
10::1Show output
remote refid st t when poll reach delay offset jitter =============================================================================== 10::1 127.127.1.0 4 u 1 64 1 0.2216 -2685599699 0.0695
Step 13: Run the command show date on DUT0 and check whether the output contains the following tokens:
Tue 01 Jan 2019Show output
Tue 01 Jan 2019 10:00:27 +00:00
Step 14: Modify the following configuration lines in DUT1 :
delete service dhcpv6-server options code 56 data ip-address '10::1' set service dhcpv6-server options code 56 data ip-address '10::2'
Step 15: Run the command service dhcpv6-client renew interface eth1 on DUT0.
Step 16: Run the command show monitor-db system dhcpv6 interface eth1 on DUT0 and check whether the output contains the following tokens:
ntp-servers: 10::2Show output
ntp-servers: 10::2 reason: RENEW6
Step 17: Run the command system ntp status on DUT0 and check whether the output contains the following tokens:
10::2Show output
remote refid st t when poll reach delay offset jitter =============================================================================== 10::2 127.127.1.0 4 u 1 64 1 0.2140 14255999849 0.2391
Step 18: Run the command show date on DUT0 and check whether the output contains the following tokens:
Sat 15 Jun 2019Show output
Sat 15 Jun 2019 10:00:48 +00:00