3

I have successfully managed to setup an RPi3 as a WLAN router, such that other clients can connect to it. In case the master is connected via Ethernet and has Access to the internet, that connection is shared with all others.

Additionally I have setup ntp on all the clients and configured it so, that they use the Master/Gateway as there time server.

So now everything works, if there is internet access all clients get there time from the master and get in sync.

BUT If I remove the internet connection, no connection to a time server can be established and ntpq -p yields

remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 10.0.0.1        .INIT.          16 u    -   64    0    0.000    0.000   0.000

on a client and

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 0.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.001
 1.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.001
 2.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.001
 3.debian.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.001

on the master.

So that tells me: No delay, so no sync.

In that setup, it is not important that the time in the network is correct, it is important that all Devices have the same time

Is it possible to configure NTP such that the time of the »Master« will be taken as the network time in case no connection to a time server can be established, otherwise the correct time should be taken.

Thanks in Ahead!

3
  • It seems ntdp has a built-in solution for that : the orphan mode
    – pim
    Oct 11, 2017 at 10:47
  • That looks very good. Do I have to add this config line to each of the node in the setup, or is it enough to have it on the server?
    – philipp
    Oct 11, 2017 at 11:45
  • Unfortunately I haven't tested it. If I had, I would have written an answer! once your setup is tested feel free to reply to your own question.
    – pim
    Oct 11, 2017 at 12:32

1 Answer 1

1

Thanks to the comment of @pim I could find the right setup, which in fact is really simple. Everything is explained in Detail here. All I had to do was adding:

tos orphan 5

to /etc/ntp.conf on the master node.

All slave/child nodes have this line in /etc/ntp.conf:

server <ip of master>

and all other pools and server deleted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.