Extremely slow domain name resolution
So Im trying to install arch off a usb and Ill ping 8.8.8.8 and itll be all fine, but as soon as I start pinging google.com it takes at least a solid minute before responding.
Important to note that the ping just failed before I set /etc/resolve.conf to have nameserver 8.8.8.8
What causes the slow dns lookups?
About this post
- Posted
- Archived
- Score
- 2 · 75% up
- Kind
- Text
- ID
- hahnba
8 comments
Have you tried your ISP's nameservers? It could be your ISP monkeying with things. Not sure exactly how to prove it, but if you get better results using their nameservers that is some evidence they are interfering.
I understand you might not want to use their nameservers for a reason, but they might be making life miserable for you because of it.
If you really wanted to see what's going on, you could run
tcpdumportsharkwith the following PCAP filter:udp port 53. Not sure what to use if you're using DNS over HTTPS, you didn't specify so I assume you're not.Another thought, your router could be interfering as well, assuming it has a caching DNS server built into it. Have you tried updating its nameservers, and put your router's IP address in /etc/resolv.conf? I suppose it would highly depend on your router as well.
Not my router so I cant tinker much :(
Tried setting it to my isps but nothing new. Also tried the tcpdump but nothing happens except it saying that its listening
What options of tcpdump did you try? I'd try this:
And then make your DNS lookup requests. You may see interference from your gateway. It does sound like your host's router is at fault, I'd ask the administrator if there's anything that can be done.
Interestingly enough, I had the same issue today. More or less, for me, /etc/resolv.conf had invalid entries that was either resulting in extreme lag or no connection whatsoever. I just replaced the contents with 1.1.1.1 and that seemed to clear things up. Once I got NetworkManager running that also decreased ping time. The file gets replaced on each restart though, so you might still have the issue when you get on a DE. I use ExpressVPN and it overrides the resolv.conf file on boot, so that is my workaround.
I tried 1.1.1.1 but no speed increase it seems ugh
Deleted before we saved it.
It depends. The way your network is setup and the archiso networking is setup; probably there is a wrong DNS entry and you are waiting to timeout of the previous one. Put `options timeout:1` in resolv.conf to reduce the time it takes to give up (by default it's 30 seconds)
how long does a dig @ take?