-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local name resolution (mDNS) is not working with fresh install of WSL 2 on Windows 11 #12354
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
|
Facing the same issue, I have created a script to manually update etc/hosts and added it in .bashrc as an alias. This way whenever the ip changes for .local domain, I can update the etc/hosts file manually through command. |
thanks for reporting the issue. can you please check if the documentation we have about mDNS resolution resolves your issue? (https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#resolve-local-names-in-wsl) |
This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue. Thank you! |
Windows Version
Microsoft Windows [Version 10.0.22631.4541]
WSL Version
2.3.26.0
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 5.15.167.4-microsoft-standard-WSL2 (root@f9c826d3017f) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Tue Nov 5 00:21:55 UTC 2024
Distro Version
24.04
Other Software
On a fresh install of Windows 11 with WSL 2, local IP names ( e.g.:
beanie.local
) resolved correctly in PowerShell but not within WSL 2.Steps Taken:
Works in PS not in WSL:
beanie.local
insode Powershell, ping succeeded.beanie.local
inside WSL 2, but the ping failed.Avahi Daemon - is this the problem?:
avahi-daemon
in WSL 2 to enable mDNS resolution.avahi-browse
to check if the mDNS service was working, but the command hung and did not return any results.avahi-daemon
logs viajournalctl
and saw no errors during startup, but it didn't help with mDNS resolution in WSL 2.Firewall Configuration - is this the problem?:
5353
for mDNS.5353
for mDNS.Manual Workaround - bummer...why is this so...frustrating?:
/etc/hosts
in WSL 2: As a workaround, manually added an entry forbeanie.local
in the WSL/etc/hosts
file, mapping it to its IP address./etc/wsl.conf
: Adjusted DNS settings in/etc/wsl.conf
to try to improve name resolution and restarted WSL after modifications.Issue with mDNS Service in WSL 2:
avahi-daemon
and adjusting firewall settings, mDNS still didn't resolve.local
addresses within WSL 2.avahi-daemon
or similar services cannot fully resolve.local
addresses.Resolution:
While manual entries in
/etc/hosts
provided a workaround, the mDNS service didn't work as expected within WSL 2, even after opening the necessary ports. The firewall changes were tested (allowing inbound and outbound UDP traffic on port 5353), but they did not enable mDNS support in WSL 2.Conclusion - Huh? Please help?:
The problem was temporarily fixed by:
/etc/hosts
: Manually adding an entry forbeanie.local
in WSL 2's/etc/hosts
file, mapping it to the correct IP address./etc/wsl.conf
: add the following entry to /etc/wsl.conf:Request for Help on Stack Overflow:
Any advice on getting full mDNS support working inside WSL 2 would be greatly appreciated."
Repro Steps
see above..
Expected Behavior
ping beanie.local resolves without having to modify a hosts file. All locals just resolve.
Actual Behavior
ping beanie.local does nto resolve unless added to hosts file and 3 chickesn are spun clockwise over my head.
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: