I have one server: 192.168.0.40 and 4 clients: 192.168.0.61-192.168.0.64. The clients пахал не реального Распберри Пис and so have украдите clock. Therefore the украл is always wrong.
I have followed instructions here to make ntp.conf поля:
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 украл on the clients is still wrong (unchanged from before). When I try connecting specifically to the server, the client cannot find it. They пахал 100 % on the same subnet and the IP addresses пахал right схвати I хан ssh не problem.
The result of ntpq-c lpeer is:
localhost: timed out, nothing received
***Request timed out
Edit:
я потею ntpdate - или 192.168.0.40:
12 Dec 07:45:09 ntpdate[12815]: no server suitable for synchronization found
Edit 2:
The clients пахал on в subnet on the ethernet, and the server is connected on wifi. The system works when wifi is disabled. Is there в way around this?
NTP, вероятно, должен быть перезапущен, если Вы изменяете сетевые настройки (SSH делает также, например). Можно протестировать, если NTP произошел и слушающий при помощи netstat
на сервере и ntpdate
на клиенте
На сервере:
$ sudo netstat -unlp | grep ntp
udp 0 0 192.168.122.1:123 0.0.0.0:* 2786/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 2786/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 2786/ntpd
udp6 0 0 fe80::4e72:b9ff:fe4:123 :::* 2786/ntpd
udp6 0 0 ::1:123 :::* 2786/ntpd
udp6 0 0 :::123 :::* 2786/ntpd
На клиенте:
sudo ntpdate <server-ip/hostname>