You are not logged in.

#1 2021-12-18 07:37:00

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

[SOLVED] DNS name resolution speed up

I've seen that systemd-resolved should speed up name resolution for my IP connection, caching domains names. I've understand correctly?

This is my current resolv.conf:

# Generated by dhcpcd from wlan0.dhcp
# /etc/resolv.conf.head can replace this line
domain homenet.telecomitalia.it
nameserver 192.168.1.1
# /etc/resolv.conf.tail can replace this line

I'm reading https://wiki.archlinux.org/title/Systemd-resolved, but there are a lot of options to understand. My needs are very simple: caching for a certain while (24 hours?) name resolution. For now, that service is inactive.

Is this the correct way? How can I do?

Last edited by Franco_64 (2021-12-18 10:15:06)

Offline

#2 2021-12-18 08:55:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,154

Re: [SOLVED] DNS name resolution speed up

resolved rus on localhost:53 and you need to enable that service and make /etc/resolv.conf a link to the stub and if you want to use dhcpcd, prevent it from writing the resolv.conf, https://wiki.archlinux.org/title/Dhcpcd … esolv.conf

nameserver 192.168.1.1

This looks like some consumer router is your DNS server, sure it doesn't cache anyway?

What are the outputs of

dig heise.de
dig heise.de

(Yes, twice - maybe on some delay. The query time is measured and printed - if the subsequent call is much faster or instant, your router caches DNS anyway)

Offline

#3 2021-12-18 09:12:20

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,360

Re: [SOLVED] DNS name resolution speed up

Another alternative, which I have run on all my machines for several years is unbound ( https://wiki.archlinux.org/title/unbound ).  It is modern fast and efficient. It does need reading so that the configs are set up correctly but once working it works well.


Mike C

Offline

#4 2021-12-18 09:17:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,154

Re: [SOLVED] DNS name resolution speed up

There's actually a whole bunch, https://wiki.archlinux.org/title/Domain … NS_servers predating lennarts NIH feelings tongue

Offline

#5 2021-12-18 09:36:58

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Re: [SOLVED] DNS name resolution speed up

This is the output of dig heise.de:

; <<>> DiG 9.16.23 <<>> heise.de
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28426
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1220
; COOKIE: 44a9177d59067de237e036bc61bda9ffa2d1459bb28d8c79 (good)
;; QUESTION SECTION:
;heise.de.			IN	A

;; ANSWER SECTION:
heise.de.		38355	IN	A	193.99.144.80

;; Query time: 40 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Sat Dec 18 10:29:27 CET 2021
;; MSG SIZE  rcvd: 81

First query gave 73 ms, other queries shorten till 13 ms, but time of many queries is very variable in range 43-13 ms.

Offline

#6 2021-12-18 09:40:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,154

Re: [SOLVED] DNS name resolution speed up

This one actually says "Query time: 40 msec" but if your local DNS server was caching, those numbers typically drop close to 0

Offline

#7 2021-12-18 09:49:37

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Re: [SOLVED] DNS name resolution speed up

seth wrote:

This one actually says "Query time: 40 msec" but if your local DNS server was caching, those numbers typically drop close to 0

So I proceed... I'll update this thread with results of my efforts... maybe it could be useful for someone.

Offline

#8 2021-12-18 10:14:30

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Re: [SOLVED] DNS name resolution speed up

SOLVED! So simple... This is the result of dig heise.de at second run:

; <<>> DiG 9.16.23 <<>> heise.de
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24829
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;heise.de.			IN	A

;; ANSWER SECTION:
heise.de.		7191	IN	A	193.99.144.80

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sat Dec 18 11:11:11 CET 2021
;; MSG SIZE  rcvd: 53

0 ms!!!

Offline

Board footer

Powered by FluxBB