You are not logged in.

#1 2021-08-22 13:43:10

leonwind
Member
Registered: 2021-08-22
Posts: 3
Website

DNS issues

zHey,
I have set up my system new again and have some problems with my DNS resolver.
I could not reach a lot of websites (stackoverflow, github, ...) and then added Google DNS address to my resolv.conf.
However, everytime I reboot I need to run

sudo dhcpcd

before I can access all the websites.
Before I run this, I am already connected to the internet but can't reach most of the websites.

If I run

reolvectl status

before I rerun dhcpcd again, there is already google's DNS server added but it is probably not applied yet(?).
I do not have a lot of knowledge about DNS and read the wiki already, but I cant figure it out. Any help is appreciated smile

[EDIT]:
resolvectl status output:

 resolvectl status
Global
           Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
    resolv.conf mode: foreign
  Current DNS Server: fd00::2e3a:fdff:fe8c:9a86
         DNS Servers: 8.8.8.8 8.8.4.4 192.168.178.1 fd00::2e3a:fdff:fe8c:9a86
Fallback DNS Servers: 1.1.1.1 9.9.9.10 8.8.8.8 2606:4700:4700::1111 2620:fe::10 2001:4860:4860::8888
          DNS Domain: fritz.box

Link 2 (enp0s31f6)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 4 (wlan0)
Current Scopes: LLMNR/IPv6
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

systemctl status systemd-resolved.service output:

systemd-resolved.service - Network Name Resolution
     Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2021-08-22 15:23:25 CEST; 24min ago
       Docs: man:systemd-resolved.service(8)
             man:org.freedesktop.resolve1(5)
             https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
             https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
   Main PID: 551 (systemd-resolve)
     Status: "Processing requests..."
      Tasks: 1 (limit: 19039)
     Memory: 5.5M
        CPU: 282ms
     CGroup: /system.slice/systemd-resolved.service
             └─551 /usr/lib/systemd/systemd-resolved

Aug 22 15:23:25 LEONRACER systemd[1]: Starting Network Name Resolution...
Aug 22 15:23:25 LEONRACER systemd-resolved[551]: Positive Trust Anchors:
Aug 22 15:23:25 LEONRACER systemd-resolved[551]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Aug 22 15:23:25 LEONRACER systemd-resolved[551]: Negative trust anchors: home.arpa 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-a>
Aug 22 15:23:25 LEONRACER systemd-resolved[551]: Using system hostname 'LEONRACER'.
Aug 22 15:23:25 LEONRACER systemd[1]: Started Network Name Resolution.
Aug 22 15:23:53 LEONRACER systemd-resolved[551]: Using degraded feature set UDP instead of UDP+EDNS0 for DNS server fd00::2e3a:fdff:fe8c:9a86.
Aug 22 15:38:47 LEONRACER systemd-resolved[551]: Grace period over, resuming full feature set (UDP+EDNS0) for DNS server fd00::2e3a:fdff:fe8c:9a86.
Aug 22 15:44:46 LEONRACER systemd-resolved[551]: Using degraded feature set UDP instead of UDP+EDNS0 for DNS server fd00::2e3a:fdff:fe8c:9a86.

Last edited by leonwind (2021-08-22 13:48:45)

Offline

#2 2021-08-22 14:41:17

Ammako
Member
Registered: 2021-07-16
Posts: 267

Re: DNS issues

leonwind wrote:

However, everytime I reboot I need to run

sudo dhcpcd

before I can access all the websites.

systemctl enable dhcpcd.service

?

Last edited by Ammako (2021-08-22 14:42:19)

Offline

#3 2021-08-22 14:48:15

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: DNS issues

Since resolved is already running, this will likely cause a race condition with <other network manager>

@leonwind

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
ip a; ip r # *before* you somehow start dhcpcd

Offline

#4 2021-08-22 16:13:49

leonwind
Member
Registered: 2021-08-22
Posts: 3
Website

Re: DNS issues

Ammako wrote:
systemctl enable dhcpcd.service

?

dhcpcd is enabled and working, I can access Google for example after booting.

@Seth

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
dbus-org.freedesktop.resolve1.service    | system
dhcpcd.service                           | multi-user.target.wants
dirmngr.socket                           | sockets.target.wants
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
iwd.service                              | multi-user.target.wants
p11-kit-server.socket                    | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
systemd-resolved.service                 | multi-user.target.wants
tlp.service                              | multi-user.target.wants
ip a; ip r
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 54:e1:ad:d0:de:6b brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 94:b8:6d:96:03:89 brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.133/24 brd 192.168.178.255 scope global dynamic noprefixroute wlan0
       valid_lft 863899sec preferred_lft 755899sec
    inet6 2001:16b8:1eae:2a00:3d8e:6e13:6269:7b92/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 7095sec preferred_lft 3495sec
    inet6 fe80::52a6:e010:8465:3d3/64 scope link 
       valid_lft forever preferred_lft forever
default via 192.168.178.1 dev wlan0 proto dhcp src 192.168.178.133 metric 3004 
192.168.178.0/24 dev wlan0 proto dhcp scope link src 192.168.178.133 metric 3004 

Last edited by leonwind (2021-08-22 16:18:17)

Offline

#5 2021-08-22 16:25:30

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: DNS issues

So you've iwd, dhcpcd and systemd-resolved already enabled.
You also have a carrier, a lease and a route, before running dhcpcd(?) - running dhcpcd again should™ do nothing.

I assume you also have no issues pinging IPs right after the boot?
What if you simply disable systemd-resolved?

Offline

#6 2021-08-22 16:50:57

leonwind
Member
Registered: 2021-08-22
Posts: 3
Website

Re: DNS issues

I have no problem pinging google for example, but I can't ping GitHub or Stackoverflow for example, any websites which I also can't reach from my browser.

If I disable it nothing really changes. I can still google stuff but can't reach GitHub or Stackoverflow.

Offline

#7 2021-08-22 16:56:01

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: DNS issues

When it doesn't work

dig github.com
dig @8.8.8.8 github.com

And when it does

dig github.com

Offline

Board footer

Powered by FluxBB