GithubHelp home page GithubHelp logo

Include the possibility to setup an NTP server using a hostname or IP address rather than have a hard coded NTP provided by DHCP about daq HOT 7 OPEN

pisuke avatar pisuke commented on August 11, 2024
Include the possibility to setup an NTP server using a hostname or IP address rather than have a hard coded NTP provided by DHCP

from daq.

Comments (7)

grafnu avatar grafnu commented on August 11, 2024

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).

from daq.

noursaidi avatar noursaidi commented on August 11, 2024

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.

from daq.

pbatta avatar pbatta commented on August 11, 2024

from daq.

noursaidi avatar noursaidi commented on August 11, 2024

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

from daq.

grafnu avatar grafnu commented on August 11, 2024

from daq.

noursaidi avatar noursaidi commented on August 11, 2024

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

from daq.

grafnu avatar grafnu commented on August 11, 2024

from daq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.