I have one server: 192.168.0.40 and 4 clients: 192.168.0.61-192.168.0.64. The clients are Raspberry Pis and so have no real time clock. Therefore the time is always wrong.
I have followed instructions here to make ntp.conf files:
server:
restrict default nomodify notrap noquery
restrict 127.0.0.1
# -- CLIENT NETWORK -------
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
# --- OUR TIMESERVERS -----
server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
server 127.127.1.0
# --- NTP MULTICASTCLIENT ---
# --- GENERAL CONFIGURATION ---
# Undisciplined Local Clock.
fudge 127.127.1.0 stratum 9
# Drift file.
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
# Keys file.
keys /etc/ntp/keys
client:
restrict default nomodify notrap noquery
restrict 127.0.0.1
# -- CLIENT NETWORK -------
# --- OUR TIMESERVERS -----
# 192.168.1.2 is the address for my timeserver,
# use the address of your own, instead:
server 192.168.0.40 iburst
server 127.127.1.0
# --- NTP MULTICASTCLIENT ---
# --- GENERAL CONFIGURATION ---
# Undisciplined Local Clock.
fudge 127.127.1.0 stratum 12
# Drift file.
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
# Keys file.
keys /etc/ntp/keys
However, the time on the clients is still wrong (unchanged from before). When I try connecting specifically to the server, the client cannot find it. They are 100% on the same subnet and the IP addresses are right as I can ssh no problem.
The result of ntpq -c lpeer is:
localhost: timed out, nothing received
***Request timed out
Edit:
sudo ntpdate -u 192.168.0.40 :
12 Dec 07:45:09 ntpdate[12815]: no server suitable for synchronization found
Edit 2:
The clients are on a subnet on the ethernet, and the server is connected on wifi. The system works when wifi is disabled. Is there a way around this?
ntpdate 192.168.0.40
to force a sync? – muru Feb 09 '15 at 14:15