Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the possibility to setup an NTP server using a hostname or IP address rather than have a hard coded NTP provided by DHCP #845

Open
pisuke opened this issue Apr 13, 2021 · 7 comments
Assignees

Comments

@pisuke
Copy link
Collaborator

pisuke commented Apr 13, 2021

No description provided.

@grafnu
Copy link
Collaborator

grafnu commented Apr 13, 2021

NB: This would be very similar functionality to what has been recently been done for 802.1x, which either uses the default internal radius server, or can be configured to use an external radius server (as configured by IP address somewhere).

@noursaidi
Copy link
Collaborator

I think this is referring to device configuration of which NTP server to use rather than a test module. We don't strictly need a local DAQ NTP server, as the tests only check that (i) protocol is NTPv4 and (ii) the time between the NTP client and server is small enough that the client is considered to be synchronised. The second test currently also checks that the device is only communicating with the local DAQ NTP server as a pass condition, which is the functionality up for debate.

The local DAQ NTP server runs on a random IP address with each run, so cannot be configured with this. I think the best solution is assigning a hostname to the NTP server (e.g daqntp.local?) in Dnsmasq. Then update the documentation so that the test operator configures the device to use this hostname as the NTP server.

The benefit is that this also demonstrates that the NTP server on the device can be configured which is a desired behaviour. Alternatively, to keep tests testing one thing only, could become an INFO test and/or the NTP tests could allow communication with any NTP servers. However the the test logic will need to be revamped to track communication with different servers which may be in an NTP pool.

@pbatta
Copy link
Collaborator

pbatta commented Apr 29, 2021 via email

@noursaidi
Copy link
Collaborator

My apologies @pbatta completely missed the notification.

I suggest this test uses the hostname only. I understand the expectation is now that NTP through DHCP is not required? If we leave the DHCP support in there, I suggest we add add a test item which identifies if the device was configured using DHCP or via hostname. This would be a simple test, as it could just look for a DNS request for the hostname

@grafnu
Copy link
Collaborator

grafnu commented May 10, 2021 via email

@noursaidi
Copy link
Collaborator

Thanks @grafnu, all understood and clear now.

I think we can have both as separate test line items. This possibilities would be:

NTP/DNS NTP/DHCP
Pass Skip DNS Configuration parameter in module config added and configured with correct static NTP server
Fail Skip Device configured with correct static NTP server but configuration parameter in module config not added; or wrong NTP server used
Skip Pass Device uses NTP server from DHCP
Skip Fail Device did not use NTP server from DHCP
Skip Skip No NTP packets detected

The overall NTP category will pass if the above pass condition is met.

Then confirm whether a device passed NTP/DNS or NTP/DHCP, we can either:

  1. Look for a DNS request
  2. Have two IP addresses, one via DHCP and one via DNS, and look for respective IP address

@grafnu is there a preference? I think (2) might be more reliable, as there is a chance the DNS request could come in-between startup.pcap completing and monitor.pcap starting, but might require a framework change

@grafnu
Copy link
Collaborator

grafnu commented May 10, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants