Ticket #6081 (closed defect: fixed)
Update DNS server list on DHCPRELEASE/RENEW and DHCPINFORM.
|Reported by:||SecretCode||Owned by:|
|Version:||VirtualBox 3.1.2||Keywords:||dns nat|
Related forum thread: NAT guest does not get correct DNS when host uses dial-up (View topic) • virtualbox.org
This applies to guests using NAT and (as default) not using the DNS proxy feature.
When the host changes its DNS servers, e.g. in the case of a notebook computer moving to a different location, or any computer where the main ADSL internet connection fails and another connection e.g. 3G is used as backup, guests are unable to retrieve the new DNS servers. It's acceptable that they have to renew the DHCP lease, but when they do so, they still get the old DNS servers. This is clearly an incorrect behaviour on the part of virtualbox.
(Guests can access sites via IP address. This only affects DNS resolution.)
The attached file shows the DHCP + DNS settings on the (windows) host and the guest before changing upstream connection, and again after changing upstream connection and running ipconfig /renew in the windows guest. Results are identical with an Ubuntu host.
Related bugs: #4680 (If network settings are changed on host in lifetime of guest, guest can't access network) - VirtualBox describes a relevant use case, but was marked as a duplicate of #3847 (re-initiate NAT on Network switch) - VirtualBox - the latter ticket is marked fixed by the option to use the DNS proxy feature, but that is only a workaround - the faulty behaviour when not using DNS proxy still needs to be fixed.
- Summary changed from NAT guest does not get correct DNS servers when host changes DNS servers to Update DNS server list on DHCPRELEASE/RENEW and DHCPINFORM.