From owner-freebsd-questions@FreeBSD.ORG Sun Mar 21 11:44:34 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD7EE16A4CE for ; Sun, 21 Mar 2004 11:44:34 -0800 (PST) Received: from webmail.tiscali.de (relay1.tiscali.de [62.26.116.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DFD943D2F for ; Sun, 21 Mar 2004 11:44:34 -0800 (PST) (envelope-from sa.deutscher@tiscali.de) Received: from localhost (217.235.14.109) by webmail.tiscali.de (6.7.019) id 40472DBC00627B60 for freebsd-questions@freebsd.org; Sun, 21 Mar 2004 20:44:32 +0100 Received: by localhost (IBM OS/2 SENDMAIL VERSION 2.0/2.0) id UAA005.72; Sun, 21 Mar 2004 20:58:24 -0500 Date: Sun, 21 Mar 2004 20:58:23 +0000 From: "Stefan A. Deutscher" To: freebsd-questions@freebsd.org Message-ID: <20040321205823.C64884@tiscali.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.94.15i X-Operating-System: OS/2 2.45 X-Machine-Uptime: localhost: uptime is 11 days, 23:06 hours and 25 seconds Subject: [Q] Another ntdp question: server? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: sad@mailaps.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2004 19:44:34 -0000 Howdy, having sort of clarified the location of the drift file I have come across another ntpd thingy I cannot quite interpret: # tail /var/log/messages | cut -c 7- 18:28:41 dvorak ntpd[1192]: ntpd 4.1.1b-a Thu Jun 5 00:47:30 GMT 2003 (1) 18:28:41 dvorak ntpd[1192]: kernel time discipline status 2040 18:28:41 dvorak ntpd[1192]: getnetnum: "ntp1.ptb.de" invalid host number, line ignored 18:28:41 dvorak ntpd[1192]: getnetnum: "ntp2.ptb.de" invalid host number, line ignored 18:32:03 dvorak ntpd[1192]: time set -0.242122 s 18:34:41 dvorak ntpd[1192]: ntpd exiting on signal 3 18:35:26 dvorak ntpd[1261]: ntpd 4.1.1b-a Thu Jun 5 00:47:30 GMT 2003 (1) 18:35:26 dvorak ntpd[1261]: kernel time discipline status 2040 18:35:26 dvorak ntpd[1261]: getnetnum: "ntp1.ptb.de" invalid host number, line ignored 18:35:26 dvorak ntpd[1261]: getnetnum: "ntp2.ptb.de" invalid host number, line ignored 18:48:24 dvorak ntpd[1261]: time set -0.079761 s So, what I do not quite understand is why (a) it ignores the time server name, (b) still sets the time (c) never again complains about the host until quit and restarted Oddly enough, the time server is found via a nslookup, and it works when given to ntpd (or ntpdate, for that matter) on the command line. # nslookup ntp1.ptb.de Server: cache1.tiscali.de Address: 195.185.185.195 Non-authoritative answer: Name: ntp1.ptb.de Address: 192.53.103.103 'man ntp.conf' seems to indicate that IP address or machine name are allowed, and that there is some flag to enable name resolution (which I did not find): [ ... snip ... ] server address [key key | autokey] [burst] [iburst] [version version] [prefer] [minpoll minpoll] [maxpoll maxpoll] [ ... snip ... ] These four commands specify the time server name or address to be used and the mode in which to operate. The address can be either a DNS name or an IP address in dotted-quad notation. [ ... snip ... ] However, when the configuration file contains host names, or when a server or client is configured remotely, host names are resolved using the DNS and a separate name resolution process. In order to protect against bogus name server messages, name resolution messages are authenticated using an internally generated key which is normally invisible to the user. However, if cryptographic support is disabled, the name resolution process will fail. This can be avoided either by specifying IP addresses instead of host names, which is generally inadvisable, or by enabling the flag for name resolution and disabled it once the name resolution process is complete. As a side effect, when sending SIGQUIT or SIGTERM ntpd does not remove the PID file created with the -p option (as in /usr/sbin/ntpd -p /var/run/ntpd.pid) -- would that be a bug or a feature I don't understand? Thanks in advance for any light on these issues & Cheers, Stefan