Community discussions

MikroTik App
 
User avatar
bgp4
just joined
Topic Author
Posts: 22
Joined: Thu Nov 07, 2019 3:48 am
Location: Singapore

NTP client can't resolve ipv6 domain name correctly

Thu Oct 28, 2021 8:22 am

7.1RC5.
[admin@ROS] > sys ntp client pri
enabled: yes
mode: unicast
servers: ntp.6now.cf
freq-drift: 0 PPM
status: waiting
/ip dns cache print, only SOA record there.
 
User avatar
bgp4
just joined
Topic Author
Posts: 22
Joined: Thu Nov 07, 2019 3:48 am
Location: Singapore

Re: NTP client can't resolve ipv6 domain name correctly

Fri Nov 12, 2021 3:19 am

debug info:
09:18:05 ntp,debug Start resolving name: ntp.6now.cf
09:18:05 ntp,debug Couldn't resolve host name: ntp.6now.cf (dns name exists, but no appropriate record) Try again after 60 seconds.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11593
Joined: Thu Mar 03, 2016 10:23 pm

Re: NTP client can't resolve ipv6 domain name correctly

Fri Nov 12, 2021 12:23 pm

Seems to be problem with 6now.cf ... my linux (full-featured) DNS server returns same:
$ dig ntp.6now.cf

; <<>> DiG 9.11.5-P4-5.1+deb10u5-Debian <<>> ntp.6now.cf
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43028
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: f6838f3c230eddd9bf7d0b88618e3fd5d40d6d46ff75aceb (good)
;; QUESTION SECTION:
;ntp.6now.cf.                   IN      A

;; AUTHORITY SECTION:
6now.cf.                10800   IN      SOA     ns1.he.net. hostmaster.he.net. 2021111002 86400 7200 3600000 172800

;; Query time: 1251 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Nov 12 11:20:05 CET 2021
;; MSG SIZE  rcvd: 125

Query-ing NS responsible gives same result:
$ dig ntp.6now.cf @ns1.he.net

; <<>> DiG 9.11.5-P4-5.1+deb10u5-Debian <<>> ntp.6now.cf @ns1.he.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4683
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;ntp.6now.cf.                   IN      A

;; AUTHORITY SECTION:
6now.cf.                86400   IN      SOA     ns1.he.net. hostmaster.he.net. 2021111002 86400 7200 3600000 172800

;; Query time: 33 msec
;; SERVER: 2001:470:100::2#53(2001:470:100::2)
;; WHEN: Fri Nov 12 11:22:40 CET 2021
;; MSG SIZE  rcvd: 97

Which means that basically ntp.6now.cf doesn't exist in public internet. So not a problem of NTP client in ROS.
 
User avatar
bgp4
just joined
Topic Author
Posts: 22
Joined: Thu Nov 07, 2019 3:48 am
Location: Singapore

Re: NTP client can't resolve ipv6 domain name correctly

Mon Nov 15, 2021 4:27 am

Plus "-t" after dig , "dig -t aaaa ntp.6now.cf" , you can find 13 AAAA records.
So i think it doesn't send AAAA query by default in ROSv7.1RC6, like the dig command.
On my device with ROSv6.49, ntp.6now.cf works ok :?
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1059
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: NTP client can't resolve ipv6 domain name correctly

Mon Nov 15, 2021 7:43 am

@mkx: use the ANY query to get both ipv4/6, ie
$ dig ntp.6now.cf ANY

; <<>> DiG 9.10.6 <<>> ntp.6now.cf ANY
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46616
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;ntp.6now.cf.			IN	ANY

;; ANSWER SECTION:
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:2:1::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:2:2::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:3:1::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:3:2::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:4:1::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:4:2::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:5:1::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:5:2::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:6:1::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:6:2::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:7:1::1
ntp.6now.cf.		86400	IN	AAAA	2a01:3f7:7:2::1

;; Query time: 99 msec
;; SERVER: 192.168.100.2#53(192.168.100.2)
;; WHEN: Mon Nov 15 06:40:23 CET 2021
;; MSG SIZE  rcvd: 404

Remark from SO - However, this won't work reliably if you're querying a caching server. When a caching server responds to an ANY query, it returns whatever records happen to be in cache at the time. If the name has both A and AAAA records, but the server has only looked up the A records recently, the AAAA records won't be in the cache, so it won't return them.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11593
Joined: Thu Mar 03, 2016 10:23 pm

Re: NTP client can't resolve ipv6 domain name correctly

Mon Nov 15, 2021 8:07 am

Thanks for pointing out the -t AAA dig option, I wasn't aware of it. So indeed ntp client in v7 is buggy.
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1059
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: NTP client can't resolve ipv6 domain name correctly

Mon Nov 15, 2021 8:42 am

Yeah, this should be reported as a bug to support@mikrotik.com.

Who is online

Users browsing this forum: dioeyandika and 23 guests