[ntp:questions] Is my ntp server ok?

Ruth Ivimey-Cook ruth at ivimey.org
Tue Jan 18 14:27:04 UTC 2005


Hi folks,

I think I must admit defeat in sorting out whether my ntp server is 
working properly. It is a gateway server for a small network, with a 
NATing router between it and the internet:

  internal net}--[ntp/gateway]--[nat router]==={internet

The gateway is running Linux - specifically Fedora Core 1, ntpd 4.1.2.
I have tried to set it up, but it doesn't seem to synchronise well with 
other servers. I am assuming this output from ntpq is bad:

[root at gatemaster root]# ntpq
ntpq> lassoc
ind assID status  conf reach auth condition  last_event cnt
===========================================================
  1 44516  9014   yes   yes  none    reject   reachable  1
  2 44517  8000   yes   yes  none    reject
  3 44518  8000   yes   yes  none    reject
  4 44519  8000   yes   yes  none    reject
  5 44520  8000   yes   yes  none    reject
  6 44521  8000   yes   yes  none    reject
  7 44522  8000   yes   yes  none    reject
ntpq> peers
     remote           refid      st t when poll reach   delay   offset  
jitter
========================================================================
======
*LOCAL(0)        LOCAL(0)        10 l   28   64  377    0.000    0.000   
0.015
 adsl-212-20-244 0.0.0.0         16 u    -  128    0    0.000    0.000 
4000.00
 mail.linicks.ne 0.0.0.0         16 u    -  128    0    0.000    0.000 
4000.00
 ntp0.cis.strath 0.0.0.0         16 u    -  128    0    0.000    0.000 
4000.00
 ntp1.sandvika.n 0.0.0.0         16 u    -  128    0    0.000    0.000 
4000.00
 veracity.mcc.ac 0.0.0.0         16 u    -  128    0    0.000    0.000 
4000.00
 ns.exnet.com    0.0.0.0         16 u    -  128    0    0.000    0.000 
4000.00

But perhaps this is more encouraging? But why so few entries?

ntpdc> peers
     remote           local      st poll reach  delay   offset    disp
=======================================================================
^NTP.MCAST.NET   0.0.0.5         16   64    0 0.00000  0.000000 16.0000
+thyme.exnet.com 195.137.27.138   2  512  122 0.00128 -0.001660 8.00305
*time.nist.gov   195.137.27.138   1 1024  377 0.14537 -0.003909 0.00084
+bear.zoo.bt.co. 195.137.27.138   2 1024  377 0.02264  0.005506 0.00203
=MSF_ARCRON(0)   0.0.0.5          1   64    0 0.00000  0.000000 16.0000


I have attached the config file and debug output from the logs.

Hoping you can help.

Ruth

-------------------------------------------------------------------
 ntp.conf
-------------------------------------------------------------------

# Prohibit general access to this service.
restrict default ignore

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1 


# -- CLIENT NETWORK -------
# 
restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
restrict 192.168.0.0 mask 255.255.255.0 notrust nomodify notrap

# --- OUR TIMESERVERS ----- 
# 
# restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap 
noquery
# server mytrustedtimeserverip

# --- NTP MULTICASTCLIENT ---
#multicastclient			# listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 notrust nomodify notrap
# restrict 192.168.0.1 mask 255.255.255.0 notrust nomodify notrap

# --- GENERAL CONFIGURATION ---
#
# Undisciplined Local Clock. This is a fake driver intended for backup
server	127.127.1.0	# local clock
fudge	127.127.1.0 stratum 10	

server uk.pool.ntp.org
server uk.pool.ntp.org
server ntp.cis.strath.ac.uk
server ntp1.sandvika.net
server ntp2b.mcc.ac.uk
server ntp.exnet.com

#
# Drift file.  
driftfile /var/lib/ntp/drift

#
# Authentication delay. 
authenticate no

#
# Keys file.
#keys		/etc/ntp/keys


-------------------------------------------------------------------
 log:
-------------------------------------------------------------------

Jan 18 14:05:20 ntpd[30631]: ntpd 4.1.2 at 1.892 Wed Oct 29 06:06:59 EST 
2003 (1)
Jan 18 14:05:20 ntpd[30631]: precision = 17 usec
Jan 18 14:05:20 ntpd[30631]: kernel time discipline status 0040
Jan 18 14:05:20 ntpd[30631]: frequency initialized -8.717 from 
/var/lib/ntp/drift
Jan 18 14:05:20 ntpd: ntpd 4.1.2 at 1.892 Wed Oct 29 06:06:59 EST 2003 (1)
Jan 18 14:05:20 ntpd: create_sockets(123)
Jan 18 14:05:20 ntpd: interface <lo> OK
Jan 18 14:05:20 ntpd: interface <eth0> OK
Jan 18 14:05:20 ntpd: interface <eth1> OK
Jan 18 14:05:20 ntpd: bind() fd 4, family 2, port 123, addr 0.0.0.0, 
flags=1
Jan 18 14:05:20 ntpd: flags for fd 4: 04002
Jan 18 14:05:20 ntpd: bind() fd 5, family 2, port 123, addr 127.0.0.1, 
flags=0
Jan 18 14:05:20 ntpd: flags for fd 5: 04002
Jan 18 14:05:20 ntpd: bind() fd 6, family 2, port 123, addr 192.168.0.1, 
flags=1
Jan 18 14:05:20 ntpd: flags for fd 6: 04002
Jan 18 14:05:20 ntpd: bind() fd 7, family 2, port 123, addr 192.168.1.2, 
flags=1
Jan 18 14:05:20 ntpd_initres[30632]: NTP_INTRES running
Jan 18 14:05:20 ntpd: flags for fd 7: 04002
Jan 18 14:05:20 ntpd_initres[30632]: intres: <uk.pool.ntp.org> 3 4 6 10 
0 0 0 *
Jan 18 14:05:20 ntpd: create_sockets: ninterfaces=4
Jan 18 14:05:20 ntpd_initres[30632]: intres: <uk.pool.ntp.org> 3 4 6 10 
0 0 0 *
Jan 18 14:05:20 ntpd: interface 0:  fd=4,  bfd=0,  name=wildcard,  
flags=0x1
Jan 18 14:05:20 ntpd_initres[30632]: intres: <ntp.cis.strath.ac.uk> 3 4 
6 10 0 0 0 *
Jan 18 14:05:20 ntpd:               sin=0.0.0.0  bcast=0.0.0.0,  mask=
255.255.255.255
Jan 18 14:05:20 ntpd: interface 1:  fd=5,  bfd=0,  name=lo,  flags=0x4
Jan 18 14:05:20 ntpd:               sin=127.0.0.1  mask=255.0.0.0
Jan 18 14:05:20 ntpd_initres[30632]: intres: <ntp1.sandvika.net> 3 4 6 
10 0 0 0 *
Jan 18 14:05:20 ntpd: interface 2:  fd=6,  bfd=0,  name=eth0,  flags=0x1
Jan 18 14:05:20 ntpd_initres[30632]: intres: <ntp2b.mcc.ac.uk> 3 4 6 10 
0 0 0 *
Jan 18 14:05:20 ntpd:               sin=192.168.0.1  bcast=
192.168.0.255,  mask=255.255.255.0
Jan 18 14:05:20 ntpd_initres[30632]: intres: <ntp.exnet.com> 3 4 6 10 0 
0 0 *
Jan 18 14:05:20 ntpd: interface 3:  fd=7,  bfd=0,  name=eth1,  flags=0x1
Jan 18 14:05:20 ntpd:               sin=192.168.1.2  bcast=
192.168.1.255,  mask=255.255.255.0
Jan 18 14:05:20 ntpd: init_io: maxactivefd 7
Jan 18 14:05:20 ntpd: getnetnum given 127.0.0.1, got 127.0.0.1 
(7f000001)
Jan 18 14:05:20 ntpd: getnetnum given 192.168.1.0, got 192.168.1.0 
(c0a80100)
Jan 18 14:05:20 ntpd: getnetnum given 255.255.255.0, got 255.255.255.0 
(ffffff00)
Jan 18 14:05:20 ntpd: getnetnum given 192.168.0.0, got 192.168.0.0 
(c0a80000)
Jan 18 14:05:20 ntpd: getnetnum given 255.255.255.0, got 255.255.255.0 
(ffffff00)
Jan 18 14:05:20 ntpd: getnetnum given 127.127.1.0, got 127.127.1.0 
(7f7f0100)
Jan 18 14:05:20 ntpd: peer_clear: at 0 assoc ID 0
Jan 18 14:05:20 ntpd: newpeer: 127.0.0.1->127.127.1.0 mode 3 vers 4 poll 
6 6 flags 21 1 ttl 0 key 00000000
Jan 18 14:05:20 ntpd: getnetnum given 127.127.1.0, got 127.127.1.0 
(7f7f0100)
Jan 18 14:05:20 ntpd: resolving uk.pool.ntp.org
Jan 18 14:05:20 ntpd: config: uk.pool.ntp.org 3 4 6 10 0 0 0 *
Jan 18 14:05:20 ntpd: resolving uk.pool.ntp.org
Jan 18 14:05:21 ntpd: config: uk.pool.ntp.org 3 4 6 10 0 0 0 *
Jan 18 14:05:21 ntpd: resolving ntp.cis.strath.ac.uk
Jan 18 14:05:21 ntpd: config: ntp.cis.strath.ac.uk 3 4 6 10 0 0 0 *
Jan 18 14:05:21 ntpd: resolving ntp1.sandvika.net
Jan 18 14:05:21 ntpd: config: ntp1.sandvika.net 3 4 6 10 0 0 0 *
Jan 18 14:05:21 ntpd: resolving ntp2b.mcc.ac.uk
Jan 18 14:05:21 ntpd: config: ntp2b.mcc.ac.uk 3 4 6 10 0 0 0 *
Jan 18 14:05:21 ntpd: resolving ntp.exnet.com
Jan 18 14:05:21 ntpd: config: ntp.exnet.com 3 4 6 10 0 0 0 *
Jan 18 14:05:21 ntpd: authtrust: keyid 0000ffff life 1
Jan 18 14:05:21 ntpd: report_event: system event 'event_restart' (0x01) 
status 'sync_alarm, sync_unspec, 1 event, event_u
nspec' (0xc010)
Jan 18 14:05:21 ntpd: auth_agekeys: at 1 keys 1 expired 0
Jan 18 14:05:22 ntpd_initres[30632]: doconfigure: <uk.pool.ntp.org> has 
peeraddr 0
Jan 18 14:05:22 ntpd_initres[30632]: findhostaddr: Resolving 
<uk.pool.ntp.org>
Jan 18 14:05:23 ntpd_initres[30632]: findhostaddr: name resolved.
Jan 18 14:05:23 ntpd: input_handler: if=1 fd=5 length 160 from 7f000001 
127.0.0.1
Jan 18 14:05:23 ntpd_initres[30632]: doconfigure: <uk.pool.ntp.org> has 
peeraddr 0
Jan 18 14:05:23 ntpd_initres[30632]: findhostaddr: Resolving 
<uk.pool.ntp.org>
Jan 18 14:05:23 ntpd: receive: at 2 127.0.0.1<-127.0.0.1 restrict 00
Jan 18 14:05:23 ntpd: process_private: impl 2 req 10
Jan 18 14:05:23 ntpd: peer_clear: at 2 assoc ID 0
Jan 18 14:05:23 ntpd: newpeer: 192.168.1.2->212.20.244.147 mode 3 vers 4 
poll 6 10 flags 1 1 ttl 0 key 00000000
Jan 18 14:05:23 ntpd: sendpkt(fd=5 dst=127.0.0.1, src=127.0.0.1, ttl=-1, 
len=8)
Jan 18 14:05:23 ntpd_initres[30632]: findhostaddr: name resolved.
Jan 18 14:05:23 ntpd_initres[30632]: doconfigure: <ntp.cis.strath.ac.uk> 
has peeraddr 0
Jan 18 14:05:23 ntpd_initres[30632]: findhostaddr: Resolving 
<ntp.cis.strath.ac.uk>
Jan 18 14:05:23 ntpd_initres[30632]: findhostaddr: name resolved.
Jan 18 14:05:23 ntpd_initres[30632]: doconfigure: <ntp1.sandvika.net> 
has peeraddr 0
Jan 18 14:05:23 ntpd_initres[30632]: findhostaddr: Resolving 
<ntp1.sandvika.net>
Jan 18 14:05:23 ntpd_initres[30632]: findhostaddr: name resolved.
Jan 18 14:05:23 ntpd_initres[30632]: doconfigure: <ntp2b.mcc.ac.uk> has 
peeraddr 0
Jan 18 14:05:23 ntpd: input_handler: if=1 fd=5 length 160 from 7f000001 
127.0.0.1
Jan 18 14:05:23 ntpd_initres[30632]: findhostaddr: Resolving 
<ntp2b.mcc.ac.uk>
Jan 18 14:05:23 ntpd: receive: at 2 127.0.0.1<-127.0.0.1 restrict 00
Jan 18 14:05:23 ntpd: process_private: impl 2 req 10
Jan 18 14:05:23 ntpd: peer_clear: at 2 assoc ID 0
Jan 18 14:05:23 ntpd: newpeer: 192.168.1.2->217.204.244.146 mode 3 vers 
4 poll 6 10 flags 1 1 ttl 0 key 00000000
Jan 18 14:05:23 ntpd: sendpkt(fd=5 dst=127.0.0.1, src=127.0.0.1, ttl=-1, 
len=8)
Jan 18 14:05:23 ntpd: input_handler: if=1 fd=5 length 160 from 7f000001 
127.0.0.1
Jan 18 14:05:23 ntpd: receive: at 2 127.0.0.1<-127.0.0.1 restrict 00
Jan 18 14:05:23 ntpd: process_private: impl 2 req 10
Jan 18 14:05:23 ntpd: peer_clear: at 2 assoc ID 0
Jan 18 14:05:23 ntpd: newpeer: 192.168.1.2->130.159.196.118 mode 3 vers 
4 poll 6 10 flags 1 1 ttl 0 key 00000000
Jan 18 14:05:23 ntpd: sendpkt(fd=5 dst=127.0.0.1, src=127.0.0.1, ttl=-1, 
len=8)
Jan 18 14:05:23 ntpd: input_handler: if=1 fd=5 length 160 from 7f000001 
127.0.0.1
Jan 18 14:05:23 ntpd: receive: at 2 127.0.0.1<-127.0.0.1 restrict 00
Jan 18 14:05:23 ntpd: process_private: impl 2 req 10
Jan 18 14:05:23 ntpd: peer_clear: at 2 assoc ID 0
Jan 18 14:05:23 ntpd: newpeer: 192.168.1.2->194.164.127.5 mode 3 vers 4 
poll 6 10 flags 1 1 ttl 0 key 00000000
Jan 18 14:05:23 ntpd: sendpkt(fd=5 dst=127.0.0.1, src=127.0.0.1, ttl=-1, 
len=8)
Jan 18 14:05:23 ntpd: poll_update: at 3 217.204.244.146 flags 0001 poll 
6 burst 0 last 3 next 66
Jan 18 14:05:23 ntpd: ^IMCAST^I*****sendpkt(fd=7 dst=217.204.244.146, 
src=192.168.1.2, ttl=0, len=48)
Jan 18 14:05:23 ntpd: transmit: at 3 192.168.1.2->217.204.244.146 mode 3
Jan 18 14:05:23 ntpd: input_handler: if=3 fd=7 length 48 from d9ccf492 
217.204.244.146
Jan 18 14:05:23 ntpd: receive: at 3 192.168.1.2<-217.204.244.146 
restrict 01
Jan 18 14:05:29 ntpd_initres[30632]: findhostaddr: name resolved.
Jan 18 14:05:29 ntpd: input_handler: if=1 fd=5 length 160 from 7f000001 
127.0.0.1
Jan 18 14:05:29 ntpd: receive: at 8 127.0.0.1<-127.0.0.1 restrict 00
Jan 18 14:05:29 ntpd: process_private: impl 2 req 10
Jan 18 14:05:29 ntpd: peer_clear: at 8 assoc ID 0
Jan 18 14:05:29 ntpd: newpeer: 192.168.1.2->130.88.200.98 mode 3 vers 4 
poll 6 10 flags 1 1 ttl 0 key 00000000
Jan 18 14:05:29 ntpd: sendpkt(fd=5 dst=127.0.0.1, src=127.0.0.1, ttl=-1, 
len=8)
Jan 18 14:05:29 ntpd_initres[30632]: doconfigure: <ntp.exnet.com> has 
peeraddr 0
Jan 18 14:05:29 ntpd_initres[30632]: findhostaddr: Resolving 
<ntp.exnet.com>
Jan 18 14:05:29 ntpd_initres[30632]: findhostaddr: name resolved.
Jan 18 14:05:29 ntpd: input_handler: if=1 fd=5 length 160 from 7f000001 
127.0.0.1
Jan 18 14:05:29 ntpd: receive: at 8 127.0.0.1<-127.0.0.1 restrict 00
Jan 18 14:05:29 ntpd: process_private: impl 2 req 10
Jan 18 14:05:29 ntpd: peer_clear: at 8 assoc ID 0
Jan 18 14:05:29 ntpd: newpeer: 192.168.1.2->195.137.27.138 mode 3 vers 4 
poll 6 10 flags 1 1 ttl 0 key 00000000
Jan 18 14:05:29 ntpd: sendpkt(fd=5 dst=127.0.0.1, src=127.0.0.1, ttl=-1, 
len=8)
Jan 18 14:05:30 ntpd: poll_update: at 10 130.159.196.118 flags 0001 poll 
6 burst 0 last 10 next 76
Jan 18 14:05:30 ntpd: ^IMCAST^I*****sendpkt(fd=7 dst=130.159.196.118, 
src=192.168.1.2, ttl=0, len=48)
Jan 18 14:05:30 ntpd: transmit: at 10 192.168.1.2->130.159.196.118 mode 
3



More information about the questions mailing list