3

Is it possible to force ntpd to have a fixed time offset, e.g. 10 minutes, to another server?

To be able to test that our devices do nicely sync with a single ntp source, we would like enable/disable the server with offset as a source and see the device adapt its time accordingly.

1 Answer 1

1

You can create your own time standard on an isolated network that you control. This is a little kludgy. In order for this to work you must have all of your machines configured to only synch with the time servers you control. I have provided four possibilities. I think your best bet is the first or second depending on how strict your time constraints.

Remember for all of the following options you need to ensure that the server does not have a leap file and that none of the computers ask the outside world for the time.

  1. ntpd reference implementation with Undiciplined Local Clock (Recommended/Easiest):

    If you want to have an ntp server serve a time different from UTC this is pretty easy. Set the hardware/kernel clock to whatever faketime you need. Then configure ntpd to use the Undisciplined Local Clock driver (127.127.1.x) and no external clocks. The ntp server will happily chug along and serve the local clock. The one problem is that since you are using the local clock driver the time will not be stable and will drift milliseconds one way or the other because that quartz crystal is no rubidium reference. If you need the faketime and stability; you need to use the option #2.

  2. ntpd reference implementation w/ ULC and PPS source (Recommended/Stability):

    Use the ULC described above and add a PPS source. Once you add the PPS source you will need to add the prefer keyword for the ULC entry in ntp.conf. This will mean that the server's clock is kept stable because the PPS source ticks off each second for you.

  3. ntpd reference implementation with External Clock Discipline and the Local Clock Driver (Complicated):

    This is still a solution that relies on using the ntpd reference implementation but I am not very familiar with it. All I can do is give you the link to more details: http://www.eecis.udel.edu/~mills/ntp/html/extern.html

  4. Jans - third party ntp testing tool (easier than #3 but unknown entity)

    I have no experience with this product but I know of it from the ntp mailing list. It will allow you to server faketime but it does none of the clock discipline like the reference implementation. More info: http://www.vanheusden.com/time/jans/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .