WSL DNS resolution is really slow
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
Environment
Windows build number: Microsoft Windows [Version 10.0.19042.685]
Distribution version: Ubuntu 20.04 and Kali 2020.2
Whether the issue is on WSL 2 and/or WSL 1: WSL 2 in Ubuntu and WSL 1 in Kali
Steps to reproduce
Just ping google.com in Ubuntu or sudo ping google.com in Kali
Expected behavior
A normal ping operation.
Actual behavior
I'm actually getting the ping after 20 seconds or so, however, if I ping using an ip (8.8.8.8 for example), results are instantaneous. I have to say I tried to reboot WSL and my host, downgrade to WSL 1, setting custom DNS updating /etc/resolv.conf (previously updating /etc/wsl.conf too), and setting manually DNS in the virtual WSL switch. None of them worked and it is kind of desperating because easy tasks like installing packages with apt or similar become really time consuming.
I'm having this behaviour in both, Kali 2020.2 WSL 1 and Ubuntu 20.04 WSL 2.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing the delay with ping google.com in Ubuntu WSL 2 and Kali WSL 1, comparing it with ping 8.8.8.8; done means hostname resolution is responsive without breaking the reported environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100