Subject: IPv6 NTP cool, but breaks v4
To: None <current-users@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: current-users
Date: 01/15/2004 09:49:46
I have a -current box, and in ntp.conf I have one hostname as a
server.  That hostname resolves to one each A and AAAA records, and is
reachable over either.  The server is running 1.6.2_RC2 or so, and
stock ntpd.  Thus it listens only on v4.

The -current box is trying to use the v6 addr, and losing since there
are no replies:


client gdt 1 ~ > ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 server			         16 u    - 1024    0    0.000    0.000 4000.00
client gdt 2 ~ > ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 3ffe:xxxx:0:xxx .INIT.          16 u    - 1024    0    0.000    0.000 4000.00


client gdt 3 ~ > ntptrace server
ntpq: read: Connection refused

client gdt 4 ~ > ntptrace [client-ipv4-addr]
server: stratum 3, offset -0.039213, synch distance 0.161156
next-server: stratum 2, offset 0.002244, synch distance 0.036570
next-next-server: stratum 1, offset 0.000537, synch distance 0.003655

So it seems that it uses the v6 addr, rather than the usual behavior
of trying the v6 and moving on down the list (to v4 eventually) when
that fails.

This is hard with ntp, since it is not the usual try-to-connect-once
program.  Arguably an NTP association should have the concept of
multiple addresses, and it should try them all, finding the best one,
or something.

I know I can work around it by using a v4 addr in the config file (or
upgrading the other box to -current, but that just pushes the problem
upstream).

Any other ideas?

-- 
        Greg Troxel <gdt@ir.bbn.com>