Uci 's ntpclient.@ntpclient[0].interface


  I am porting the code from open embedded environment to an openwrt environment without

busybox avalible ( Our company has made decision that we will not install and use busybox in openwrt

   The open embedded linux has the following implementation on ntp invoking network time server:

                   ntpdate networkTimeServer1 networkTimeServer2 ...3.....4

   Currently, I have to use "ntpd networkServer" to replace the above mentioned "ntpdate.....".

  We like to use uci's ntpclient.@ntpclient[0] to replace above mentioned implementation,
  but I don't totally understand the ntpclient.@ntpclient[0].interface and have the following
  2 questions:

  1.) Can I configure the above mentioned networkTimeServer1 (2, 3 or 4) as the interface
        host name or ip address ( Because a host/sevrver/router uses one of its network interfaces as its
        IP address)?

  2.) If question one is OK, can I put 4 networkTimeServer addresses on the same interfaces
        because I would like to implement "ntpdate networkTimeServer1, 2, 3 and 4.

  If the answers are OK, then I can use ntpclient.@netpclient to implement the 
  "ntpdate ......". Certainly, I need to restart the ntpd to invoke /etc/config/netpclient
  configuration file.

  Thanks in advance for a possible answer, correction or guideline on this!

Best regards,

  • Why is your post formatted like that???
  • You are aware that Busybox implements NTP, correct?
  • You are also aware that busybox implements the network bridging in OpenWrt, right?
  • Why are you using the incorrect syntax to configure NTP?

See: https://openwrt.org/docs/guide-user/advanced/ntp_configuration

Yes, with a running NTP server.

Yes, NTP allows you to add multiple NTP servers in its config.

I'm not sure why you keep referring to configuring an NTP server on an Interface. NTP is not a "per Interface" protocol (though I'm sure you can bind the service to a particular IP), it's per instance of the running service.

  • In addition, I've always used the NTP conf file when using the non-Busybox NTP server.

Lastly...in case you were not aware...I was under the impression that Busybox implemented NTP, as well as:

  • network bridging

You don't actually mention if you installed/compiled another NTP server into the image.