Ntp Interface
This scenario restricts where the NTP daemon listens via
set system ntp listen local-address|local-interface|local-vrf.
Test NTP Listen Local-Address
Description
DUT0 binds NTP to a specific local address. DUT1 must still synchronize against it.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.100.0.50/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system ntp listen local-address 10.100.0.50 set system ntp master prefer set system ntp master stratum 3
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.100.0.60/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Ping IP address 10.100.0.50 from DUT1:
admin@DUT1$ ping 10.100.0.50 count 1 size 56 timeout 1Show output
PING 10.100.0.50 (10.100.0.50) 56(84) bytes of data. 64 bytes from 10.100.0.50: icmp_seq=1 ttl=64 time=0.339 ms --- 10.100.0.50 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.339/0.339/0.339/0.000 ms
Step 4: Run command set date ntp 10.100.0.50 at DUT1 and check if output contains the following tokens:
Date was successfully updatedShow output
Date was successfully updated!
Test NTP Listen Local-Interface
Description
DUT0 binds NTP to a specific interface. DUT1 must still synchronize against it.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.100.0.50/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system ntp listen local-interface eth0 set system ntp master prefer set system ntp master stratum 3
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.100.0.60/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Ping IP address 10.100.0.50 from DUT1:
admin@DUT1$ ping 10.100.0.50 count 1 size 56 timeout 1Show output
PING 10.100.0.50 (10.100.0.50) 56(84) bytes of data. 64 bytes from 10.100.0.50: icmp_seq=1 ttl=64 time=0.681 ms --- 10.100.0.50 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.681/0.681/0.681/0.000 ms
Step 4: Run command set date ntp 10.100.0.50 at DUT1 and check if output contains the following tokens:
Date was successfully updatedShow output
Date was successfully updated!
Test NTP Listen Local-VRF
Description
DUT0 binds NTP to interfaces in a VRF. DUT1 must still synchronize against it.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.100.0.50/24 set interfaces ethernet eth0 vrf ntp-vrf set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system ntp listen local-vrf ntp-vrf set system ntp master prefer set system ntp master stratum 3 set system vrf ntp-vrf
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.100.0.60/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Ping IP address 10.100.0.50 from DUT1:
admin@DUT1$ ping 10.100.0.50 count 1 size 56 timeout 1Show output
PING 10.100.0.50 (10.100.0.50) 56(84) bytes of data. 64 bytes from 10.100.0.50: icmp_seq=1 ttl=64 time=0.704 ms --- 10.100.0.50 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.704/0.704/0.704/0.000 ms
Step 4: Run command set date ntp 10.100.0.50 at DUT1 and check if output contains the following tokens:
Date was successfully updatedShow output
Date was successfully updated!
Test NTP No Listen Restriction
Description
Without listen, NTP binds everywhere.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.100.0.50/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system ntp master prefer set system ntp master stratum 3
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.100.0.60/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Ping IP address 10.100.0.50 from DUT1:
admin@DUT1$ ping 10.100.0.50 count 1 size 56 timeout 1Show output
PING 10.100.0.50 (10.100.0.50) 56(84) bytes of data. 64 bytes from 10.100.0.50: icmp_seq=1 ttl=64 time=0.904 ms --- 10.100.0.50 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.904/0.904/0.904/0.000 ms
Step 4: Run command set date ntp 10.100.0.50 at DUT1 and check if output contains the following tokens:
Date was successfully updatedShow output
Date was successfully updated!