You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently there's some mangling done by (probably) Windows virtual switch/DNS resolver? Not all DNS queries that work with Windows work in WSL2. For what's not working usually helps if I just add that specific Connection-specific DNS Suffix as search SUFFIX and eventually any domains from connection DNS Search List to /etc/resolv.conf.
In situations where I can use e.g. ping host on Windows I need to use ping host.fully.qualified.domain.name in WSL2 which is sometimes annoying.
Describe the solution you'd like
I'd like if init (or even better; some Windows side thing when connectivity changes re-) generated /etc/resolv.conf so that all known DNS lookup suffixes are automatically added as search stanzas. Maybe this could be sub-option of whether or not to generate resolv.conf.
Describe alternatives you've considered
Currently I am using simple script that is triggered by Windows Scheduler; Event type "Microsoft-Windows-NetworkProfile/Operational" and "Event Id" 1000. Script utilizes lame Powershell query to get suffixes:
@phil-blain I saw both #701 and #7453 but somehow didn't read all the comments and thought it is about secondary suffixes (my DHCP server doesn't add them, serves just primary suffix).
Our development team does not always use FQDNs so, the resolv.conf autogeneration should possibly copy over the physical adapter DHCP provided domain search lists.
Alternatively, wsl.conf should provide means to configure search domains for DNS.
DNS is very important so having as many options available via wsl.conf would be awsome.
Is your feature request related to a problem? Please describe.
Currently there's some mangling done by (probably) Windows virtual switch/DNS resolver? Not all DNS queries that work with Windows work in WSL2. For what's not working usually helps if I just add that specific Connection-specific DNS Suffix as
search SUFFIX
and eventually any domains from connection DNS Search List to/etc/resolv.conf
.In situations where I can use e.g.
ping host
on Windows I need to useping host.fully.qualified.domain.name
in WSL2 which is sometimes annoying.Describe the solution you'd like
I'd like if
init
(or even better; some Windows side thing when connectivity changes re-) generated/etc/resolv.conf
so that all known DNS lookup suffixes are automatically added assearch
stanzas. Maybe this could be sub-option of whether or not to generateresolv.conf
.Describe alternatives you've considered
Currently I am using simple script that is triggered by Windows Scheduler; Event type "Microsoft-Windows-NetworkProfile/Operational" and "Event Id" 1000. Script utilizes lame Powershell query to get suffixes:
Additional context
I believe if WSL has access to network it should behave same (in terms of DNS resolver and other aspects) as host OS.
The text was updated successfully, but these errors were encountered: