Skip to content
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

Some limitations of the built-in DNS service #524

Open
jandubois opened this issue Jan 5, 2022 · 4 comments
Open

Some limitations of the built-in DNS service #524

jandubois opened this issue Jan 5, 2022 · 4 comments
Labels
enhancement New feature or request priority/low

Comments

@jandubois
Copy link
Member

I spent some time testing various DNS scenarios while looking into rancher-sandbox/rancher-desktop#1181 and noticed the following issues:

  • on systemd instances mDNS lookup would not work. The request never goes to our own server, but is presumptively handled directly by systemd-resolved. Since it can only broadcast on the slirp interface, it can't find any devices on the host network.

  • *.local names that are provided by DNS and have no corresponding mDNS response are reported too late, so get a DNS timeout. It looks like our DNS server is waiting for the mDNS query to time out before returning the DNS name (or from /etc/hosts).

While looking for a workaround, I tried (on Alpine, to avoid systemd) various entries in /etc/hosts. Specifying a .local name as an alias works, and both names can be resolved in the guest:

1.2.3.4 foo.internal foo.local

If the .local name is the canonical name, then neither name returns a result before an error occurs:

1.2.3.4 foo.local foo.internal

On the host system, the .local names from /etc/hosts are resolved without any delay, so why is this different?

@jandubois jandubois added enhancement New feature or request priority/low labels Jan 5, 2022
@jandubois
Copy link
Member Author

Assigning low priority because using .local with unicast DNS is discouraged.

Providing mDNS lookup to systemd-based instances may be regular priority though.

@jandubois
Copy link
Member Author

cc/ @dee-kryvenko

@jandubois
Copy link
Member Author

Furthermore, it looks like with systemd-resolved, the host resolver is still configured as a backup even when useHostResolver is false.

@christhomas
Copy link

I'm also facing some issues with dns right now because I have a dnsmasq container I'm trying to run and I'm wondering if there is ever a scenario where you'd want a VM to use it's own private dns resolver opposed to your machines dns setup. Wouldn't that mean there are two dns resolvers, one on my machine and one inside the VM? Is there a scenario where my machine would not have dns configured and access to the internet but the VM would?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority/low
Projects
None yet
Development

No branches or pull requests

2 participants