Bekijk de volledige versie : NTP (NetTime) Server & Client - Wie?
== NTP (NetTime) Server & Client - Wie? ==
Hi.
Der WL500gx soll als NTP-Server dienen,
d.h. andere Geräte im LAN wie mein WinXP-PC sollen Datum + Uhrzeit vom WL500g per NTP holen können.
Firmware: Oleg's FW 1.9.2.7-7g
Außerdem IPKG aktiviert und ein paar pakete installiert.
- Was muss ich im WL500g ändern?
- Wie kann ich nachschauen, ob der NTP-Service richtig läuft?
=== Bisher herausgefunden ===
Auf dem ASUS per telnet eingeloggt:
$>ps|grep ntp
121 admin 340 S ntp
2384 admin 380 S grep ntp
$>ntpclient -h 127.0.0.1
recvfrom: Connection refused
Also ntp daemon läuft, aber noch nichteinmal er selbst kann darauf zugreifen.
Vom WinXP-PC versucht die NetTime zu bekommen: Ebenfalls keine Verbindung.
Hat jemand einen Vorschlag, wie ich weitersuche?
vielen Dank,
kddh
Ich habe den Grund gefunden: ntp ist nicht der Daemon ntpd. :)
Man muss also einen ntpd installieren.
Der OpenNTPd ist besonders gut geeignet, da nur 58kb gross.
Und so geht's:
1. openntpd herunterladen:
http://www.iro.umontreal.ca/~monnier/wl500g/ (http://www.iro.umontreal.ca/~monnier/wl500g/)
und nach /opt/bin kopieren (oder wo ihr wollt)
2. Ordner /usr/local/etc/ erstellen:
mkdir /usr/local/etc/
Konfigdatei /usr/local/etc/ntpd.conf erstellen:
dst=/usr/local/etc/ntpd.conf
echo >$dst ### config file for OpenNTPd
echo >>$dst ### default name + location: /usr/local/etc/ntpd.conf
echo >>$dst # NTP-Server
echo >>$dst server ptbtime1.ptb.de
echo >>$dst server ptbtime2.ptb.de
echo >>$dst # IP des Interfaces, von dem Anfragen beantwortet werden
echo >>$dst listen on 192.168.2.1
Hinweis: " listen on * " ging bei mir nicht, und ich habe lange gebraucht, um das herauszufinden...
Aufruf mit Konfigfile "/usr/local/etc/ntpd.conf"
openntpd
Wenn es Probleme gibt, startet ihn mit "-d"
openntpd -d
Wenn das Konfigfile woanders liegt, könnt ihr es benennen:
openntpd -f /usr/local/etc/ntpd.conf
Soweit funktioniert das bei mir!
Vielen Dank!
Ich würde aber lieber auf den ntpd wechseln, da der in den offiziellen repositories ist und gepflegt wird!
Leider schaffe ich da die konfiguration nicht!
Sogar nach nur "ipkg install ntp && /opt/etc/init.d/S77ntp" läuft der server nicht :(
Warum nutzt Du nicht den integrierten ntp?
Oder willst Du einen NTP Server aufsetzen?
wengi
Genau!
Ich will einen NTP-Server für das lokale Netzwerk aufsetzen!
Ich habe den ntpd bei mir noch nicht installiert.
Also machen wir das jetzt trocken.
Wie sieht denn Deine ntp.conf aus?
Hast Du Dir das hier mal angesehen: http://www.itbert.de/howtos/howtos-de-ntpd-server/
wengi
ntpd 4.2.4p3@1.1502 Fri Jan 25 02:45:34 UTC 2008 (1)
addto_syslog: logging to file /var/spool/ntp/ntp.log
addto_syslog: logging to file /var/spool/ntp/ntp.log
addto_syslog: precision = 96.000 usec
addto_syslog: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
addto_syslog: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
addto_syslog: setsockopt IPV6_V6ONLY on fails on address ::: Protocol not available
addto_syslog: unable to bind to wildcard socket address :: - another process may be running - EXITING
Das kommt als Fehler! :confused:
Es läuft garantiert kein anderes ntp Programm!
[root@router root]$ ps -A
PID TTY TIME CMD
1 ? 00:00:01 init
2 ? 00:00:00 keventd
3 ? 00:00:00 ksoftirqd_CPU0
4 ? 00:00:00 kswapd
5 ? 00:00:00 bdflush
6 ? 00:00:00 kupdated
7 ? 00:00:00 mtdblockd
46 ? 00:00:00 httpd
50 ? 00:00:00 syslogd
51 ? 00:00:00 klogd
53 ? 00:00:00 snmpd
58 ? 00:00:01 nas
61 ? 00:00:00 khubd
70 ? 00:00:00 p910nd
75 ? 00:00:00 pppoe-relay
76 ? 00:00:00 usb-storage-0
77 ? 00:00:00 scsi_eh_0
97 ? 00:00:00 infosvr
100 ? 00:00:00 radvd
107 ? 00:00:00 dropbear
126 ? 00:00:00 udhcpc
140 ? 00:00:00 kjournald
152 ? 00:00:00 dnsmasq
162 ? 00:00:00 cron
170 ? 00:00:02 dropbear
171 pts/0 00:00:00 sh
181 ? 00:00:00 upnp
228 pts/0 00:00:00 ps
alexadmin
12-08-2008, 06:16
Das kommt als Fehler! :confused:
addto_syslog: setsockopt IPV6_V6ONLY on fails on address ::: Protocol not available
addto_syslog: unable to bind to wildcard socket address :: - another process may be running - EXITING
Es läuft garantiert kein anderes ntp Programm!
I have the same problem. Was any decision found for this problem?
I have the same problem. Was any decision found for this problem?I don't know of any :(
alexadmin
14-08-2008, 19:00
I don't know of any :(
I have got the useful advice to try ntpd from the same page where openntpd listed (It was in the posts above http://www.iro.umontreal.ca/~monnier/wl500g/ntpd). It works fine on my config. Good luck!