Laptop: Thinkpad W520, running Manjaro KDE. Connected on wifi 2.4GHz
This has started to happen quite suddenly. My service provider upgraded me to an optic fiber router. Windows PCs and my own dual-boot laptop on Windows (ugh) ping google.com etc quite fine, but when I type ping www.google.com in a Manjaro terminal it hangs for about 20 seconds and then pings normally. The browser upon opening the first time takes a similar time to connect to google.com, subsequent accesses are quick. Name resolution lookup issue for sure, since pinging google’s IP address works fine. Where should I look for name resolution issues?
Additionally - I find that even before connecting to wifi upon bootup I get a notification saying “this machine appears to be connected to a network but is unable to reach the internet.” This may provide an important clue. I would not get such a notification earlier if I was not logged into any network.
Hi:
I tried this and it did not solve the lookup delay problem…Should I revert to openresolv or is it better to continue down this path and fix something else now?
Best - Ram
Thanks…I just realized the link had gone to my home folder. I tried creating the symlink again but the ping still takes forever. The new resolv.conf reads as follows. Maybe it should have a real DNS in it? Let me try.
nameserver 127.0.0.53
options edns0 trust-ad
search Home
Let me again recall the fact that my modem is almost certainly not the culprit because names resolve instantly from other computers on the network, including my own laptop when I’m booted into the other stupid OS. The problem has got to be within Manjaro settings.
Meanwhile I tried setting the nameserver to 8.8.8.8 but lookups still take forever
Installing bind as I type (taking forever since each lookup by the software manager takes forever!)
pinging 192.168.9.1 (my modem/router) gets an instant reply.
What also can come to my mind is that DNS server is resolving in IPv6 but IPv6 is not working on your network and after the timeout it continues in IPv4.
When bind-tools was put into the package bind - I discovered the drill command - it works like the bind-util dig and it comes default on Arch based distributions.
What is especially interesting here is the last couple of lines with the response time from name service and 9msec is definately good.
The times you get from dig or drill can’t compared with lookup times form most other applications.
The problem is that drill will directly ask the DNS Server listed in /etc/resolv.conf . Normal programs that use glib (which most programs do) will not do that. It will go thru the NSS (Name Service Switch). If systemd-resolved is used it will never go thru /etc/resolv.conf . If systemd-resolved is not active, it will used by the glibc resolver and passed back thru the liabary.
However, to determine the resolve time, it is better to use a tool, that uses the same path. For example curl.
The output will be the time it took to get the namelookup in seconds. You might want to use a domain that is never used before or you might get a cache hit.
Tried both. Here are the outputs. I find that since I made the switch to systemd-resolved, the iping times have actually increased considerably and now it’s almost as if I cannot access the Internet. Lookup times “seem to be” a bit better when I am using my phone’s hotspot (as I am doing now to access this forum). It’s quite unbearable. Can I just reinstall Network manager or something ?
Now here is what is very funny - I booted into a Manjaro live USB - and I have the exact same problem - ping takes approx 20 seconds to respond. Websites take that long to connect to. Again - this problem on the same laptop booted into Windoze does not occur. I am quite lost here.