wckl hat geschrieben: 15.08.2023 13:09:48
An
mat6937
Nur Wifi, Ethernet ist abgezogen:
Code: Alles auswählen
host heise.de 80.10.246.132
;; connection timed out; no servers could be reached
Ja, aber das meine ich nicht.
Z. B. meine Test-/etc/resolv.conf hat den Inhalt:
Code: Alles auswählen
options ndots:0 timeout:3 attempts:3 edns0
options single-request-reopen rotate
search fritz.box
nameserver 80.10.246.132
nameserver 81.253.149.2
nameserver 192.168.178.1
und wenn ich DNS über die mache, sieht es so aus:
Code: Alles auswählen
:~$ host -v -t a koeln.de
Trying "koeln.de"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43194
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;koeln.de. IN A
;; ANSWER SECTION:
koeln.de. 177 IN A 81.173.246.122
Received 42 bytes from 192.168.178.1#53 in 153 ms
... und in der Ausgabe von tcpdump kann man sehen warum es auch klappt:
Code: Alles auswählen
:~# tcpdump -vvveni wlan1 dst port 53
tcpdump: listening on wlan1, link-type EN10MB (Ethernet), capture size 262144 bytes
16:07:01.822663 ##:##:##:17:62:b4 > xx:xx:xx:d3:0a:d6, ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 10238, offset 0, flags [none], proto UDP (17), length 54)
192.168.178.22.37759 > 80.10.246.132.53: [udp sum ok] 43194+ A? koeln.de. (26)
16:07:02.822860 ##:##:##:17:62:b4 > xx:xx:xx:d3:0a:d6, ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 61639, offset 0, flags [none], proto UDP (17), length 54)
192.168.178.22.49946 > 81.253.149.2.53: [udp sum ok] 43194+ A? koeln.de. (26)
16:07:03.823018 ##:##:##:17:62:b4 > xx:xx:xx:d3:0a:d6, ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 53866, offset 0, flags [none], proto UDP (17), length 54)
192.168.178.22.37391 > 192.168.178.1.53: [udp sum ok] 43194+ A? koeln.de. (26)
^C
3 packets captured
3 packets received by filter
0 packets dropped by kernel
Das meinte ich mit optimieren. Geht bei dir auf via resolvconf und systemd-resolved.
Was nutzen dir 3 DNS-Server in der resolv.conf (oder anderswo), wenn dein System so konfiguriert ist, dass nur einer bzw. der 1. dieser DNS-Server angefragt wird und die anderen zwei DNS-Server ignoriert werden?