Skip to main content
Improve casing, spelling (and style a little bit)
Source Link

althoughAlthough the question is 2y old, the topic surely is not.

accordingAccording to    RFC3484RFC-3484: Default Address Selection for IPv6

the the OS automatically selects the best IP address, which is either IPv6 or IPv4. if

If /etc/gai.conf is unchanged and your DNS works fine, thanthen Linux (and anymany other OS) will prefer IPv6 address(es), otherwise it will choose IPv4, to connect to e.g. time.google.com.

youYou can check that by

getent ahosts time.google.com

everyusing getent ahosts time.google.com. Every software should try all ipIP addresses of that list in that order, beginning at the top. where

Where did your linuxLinux get the timeservers from? ifIf it is DHCP than, then your OS perhaps cannot choose, because it got IPv4 IP adressesaddresses, not FQDNs?! the ntp. The NTP client may show reverse DNS hosts to IP addresses, not the real configured ntpNTP server "names".

/edit: I tried with ntpd 4.2.8p15 and ntpd 4.2.6p5 on opensuse15openSUSE 15.2 and centos7. bothCentOS 7: Both ntpd do not obey rfc6742RFC 6742 (3484). However chronyd does btw.

/edit2: chronyd (3.4) seems to need a looooong time until v4 addresses will be used, if ntpNTP servers are not reachable via v6. (but what do I know,IPv6; maybe try for yourself, dont rely on strangers from the internet ;)

HTH.

although the question is 2y old, the topic surely is not.

according to  RFC3484 Default Address Selection for IPv6

the OS automatically selects the best IP address, which is either IPv6 or IPv4. if /etc/gai.conf is unchanged and your DNS works fine, than Linux (and any other OS) will prefer IPv6 address(es), otherwise it will choose IPv4, to connect to e.g. time.google.com.

you can check that by

getent ahosts time.google.com

every software should try all ip addresses of that list in that order, beginning at the top. where did your linux get the timeservers from? if it is DHCP than your OS perhaps cannot choose because it got IPv4 IP adresses, not FQDNs?! the ntp client may show reverse DNS hosts to IP addresses, not the real configured ntp server "names".

/edit: I tried with ntpd 4.2.8p15 and ntpd 4.2.6p5 on opensuse15.2 and centos7. both ntpd do not obey rfc6742(3484). chronyd does btw.

/edit2: chronyd (3.4) seems to need a looooong time until v4 addresses will be used, if ntp servers are not reachable via v6. (but what do I know, try for yourself, dont rely on strangers from the internet ;)

HTH

Although the question is 2y old, the topic surely is not.

According to  RFC-3484: Default Address Selection for IPv6 the OS automatically selects the best IP address, which is either IPv6 or IPv4.

If /etc/gai.conf is unchanged and your DNS works fine, then Linux (and many other OS) will prefer IPv6 address(es), otherwise it will choose IPv4, to connect to e.g. time.google.com.

You can check that using getent ahosts time.google.com. Every software should try all IP addresses of that list in that order, beginning at the top.

Where did your Linux get the timeservers from? If it is DHCP, then your OS cannot choose, because it got IPv4 IP addresses, not FQDNs. The NTP client may show reverse DNS hosts to IP addresses, not the real configured NTP server "names".

/edit: I tried with ntpd 4.2.8p15 and ntpd 4.2.6p5 on openSUSE 15.2 and CentOS 7: Both ntpd do not obey RFC 6742 (3484). However chronyd does.

/edit2: chronyd (3.4) seems to need a looooong time until v4 addresses will be used, if NTP servers are not reachable via IPv6; maybe try yourself.

replaced https://tools.ietf.org/html/rfc with https://www.rfc-editor.org/rfc/rfc
Source Link

although the question is 2y old, the topic surely is not.

according to RFC3484 Default Address Selection for IPv6RFC3484 Default Address Selection for IPv6

the OS automatically selects the best IP address, which is either IPv6 or IPv4. if /etc/gai.conf is unchanged and your DNS works fine, than Linux (and any other OS) will prefer IPv6 address(es), otherwise it will choose IPv4, to connect to e.g. time.google.com.

you can check that by

getent ahosts time.google.com

every software should try all ip addresses of that list in that order, beginning at the top. where did your linux get the timeservers from? if it is DHCP than your OS perhaps cannot choose because it got IPv4 IP adresses, not FQDNs?! the ntp client may show reverse DNS hosts to IP addresses, not the real configured ntp server "names".

/edit: I tried with ntpd 4.2.8p15 and ntpd 4.2.6p5 on opensuse15.2 and centos7. both ntpd do not obey rfc6742(3484). chronyd does btw.

/edit2: chronyd (3.4) seems to need a looooong time until v4 addresses will be used, if ntp servers are not reachable via v6. (but what do I know, try for yourself, dont rely on strangers from the internet ;)

HTH

although the question is 2y old, the topic surely is not.

according to RFC3484 Default Address Selection for IPv6

the OS automatically selects the best IP address, which is either IPv6 or IPv4. if /etc/gai.conf is unchanged and your DNS works fine, than Linux (and any other OS) will prefer IPv6 address(es), otherwise it will choose IPv4, to connect to e.g. time.google.com.

you can check that by

getent ahosts time.google.com

every software should try all ip addresses of that list in that order, beginning at the top. where did your linux get the timeservers from? if it is DHCP than your OS perhaps cannot choose because it got IPv4 IP adresses, not FQDNs?! the ntp client may show reverse DNS hosts to IP addresses, not the real configured ntp server "names".

/edit: I tried with ntpd 4.2.8p15 and ntpd 4.2.6p5 on opensuse15.2 and centos7. both ntpd do not obey rfc6742(3484). chronyd does btw.

/edit2: chronyd (3.4) seems to need a looooong time until v4 addresses will be used, if ntp servers are not reachable via v6. (but what do I know, try for yourself, dont rely on strangers from the internet ;)

HTH

although the question is 2y old, the topic surely is not.

according to RFC3484 Default Address Selection for IPv6

the OS automatically selects the best IP address, which is either IPv6 or IPv4. if /etc/gai.conf is unchanged and your DNS works fine, than Linux (and any other OS) will prefer IPv6 address(es), otherwise it will choose IPv4, to connect to e.g. time.google.com.

you can check that by

getent ahosts time.google.com

every software should try all ip addresses of that list in that order, beginning at the top. where did your linux get the timeservers from? if it is DHCP than your OS perhaps cannot choose because it got IPv4 IP adresses, not FQDNs?! the ntp client may show reverse DNS hosts to IP addresses, not the real configured ntp server "names".

/edit: I tried with ntpd 4.2.8p15 and ntpd 4.2.6p5 on opensuse15.2 and centos7. both ntpd do not obey rfc6742(3484). chronyd does btw.

/edit2: chronyd (3.4) seems to need a looooong time until v4 addresses will be used, if ntp servers are not reachable via v6. (but what do I know, try for yourself, dont rely on strangers from the internet ;)

HTH

chronyd 3.4
Source Link

although the question is 2y old, the topic surely is not.

according to RFC3484 Default Address Selection for IPv6

the OS automatically selects the best IP address, which is either IPv6 or IPv4. if /etc/gai.conf is unchanged and your DNS works fine, than Linux (and any other OS) will prefer IPv6 address(es), otherwise it will choose IPv4, to connect to e.g. time.google.com.

you can check that by

getent ahosts time.google.com

every software should try all ip addresses of that list in that order, beginning at the top. where did your linux get the timeservers from? if it is DHCP than your OS perhaps cannot choose because it got IPv4 IP adresses, not FQDNs?! the ntp client may show reverse DNS hosts to IP addresses, not the real configured ntp server "names".

/edit: I tried with ntpd 4.2.8p15 and ntpd 4.2.6p5 on opensuse15.2 and centos7. both ntpd do not obey rfc6742(3484). chronyd does btw.   

/edit2: chronyd does not try v4 after v6 (3.4) seems to need a looooong time until v4 addresses will be used, if ntp servers are not reachable via v6. my fault! (dhcp provided v4 addressbut what do I know, try for yourself, dont rely on strangers from the internet ;)

HTH

although the question is 2y old, the topic surely is not.

according to RFC3484 Default Address Selection for IPv6

the OS automatically selects the best IP address, which is either IPv6 or IPv4. if /etc/gai.conf is unchanged and your DNS works fine, than Linux (and any other OS) will prefer IPv6 address(es), otherwise it will choose IPv4, to connect to e.g. time.google.com.

you can check that by

getent ahosts time.google.com

every software should try all ip addresses of that list in that order, beginning at the top. where did your linux get the timeservers from? if it is DHCP than your OS perhaps cannot choose because it got IPv4 IP adresses, not FQDNs?! the ntp client may show reverse DNS hosts to IP addresses, not the real configured ntp server "names".

/edit: I tried with ntpd 4.2.8p15 and ntpd 4.2.6p5 on opensuse15.2 and centos7. both ntpd do not obey rfc6742(3484). chronyd does btw.  /edit2: chronyd does not try v4 after v6 .. my fault! (dhcp provided v4 address)

HTH

although the question is 2y old, the topic surely is not.

according to RFC3484 Default Address Selection for IPv6

the OS automatically selects the best IP address, which is either IPv6 or IPv4. if /etc/gai.conf is unchanged and your DNS works fine, than Linux (and any other OS) will prefer IPv6 address(es), otherwise it will choose IPv4, to connect to e.g. time.google.com.

you can check that by

getent ahosts time.google.com

every software should try all ip addresses of that list in that order, beginning at the top. where did your linux get the timeservers from? if it is DHCP than your OS perhaps cannot choose because it got IPv4 IP adresses, not FQDNs?! the ntp client may show reverse DNS hosts to IP addresses, not the real configured ntp server "names".

/edit: I tried with ntpd 4.2.8p15 and ntpd 4.2.6p5 on opensuse15.2 and centos7. both ntpd do not obey rfc6742(3484). chronyd does btw. 

/edit2: chronyd (3.4) seems to need a looooong time until v4 addresses will be used, if ntp servers are not reachable via v6. (but what do I know, try for yourself, dont rely on strangers from the internet ;)

HTH

chrony
Source Link
Loading
added test results
Source Link
Loading
Source Link
Loading