VirtualBox

Opened 8 years ago

Last modified 8 years ago

#15030 new defect

DHCP server on natnetwork doesn't return DNS servers

Reported by: tommyvn Owned by:
Component: network/NAT Version: VirtualBox 5.0.12
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

If I start up a guest VM on old school nat networking I see an option 6 come thru with the DHCP response from the virtualbox DHCP server.

If I do the same on a natnetwork'd guest all but one of the same options arrive in the DHCP response, including 15 for a DNS domain name, but option 6 is consistently missing and obviously this means the DNS server is never configured inside the guest. If I set it manually in the guest to the IP I configured under "VBoxManage dhcpserver add" everything works as expected so networking is certainly working.

This is easily observed with a linux guest by installing and running dhcpdump while running "dhclient -d"

Change History (3)

comment:1 by tommyvn, 8 years ago

Setting the guest DNS to the IP I configured thru VBoxManage dhcpserver might be a red herring. It appears that this is only true if that IP is the same as the gateway IP, which also seems to land on the host and hit the hosts dnsmasq instance directly. If I set the DHCP IP to .3 instead of .1 the DNS requests to .3 fail but .1 continue to work.

comment:2 by Valery Ushakov, 8 years ago

Please, can you be more specific, providing the exact commands/address assignments and the corresponding observed effects?

Note that with "NAT Network" attachment the gateway at .1 also acts as a DNS proxy. The .2 address is a mapping for the host's 127.0.0.1 loopback, so if you have e.g. dnsmasq listening there, the guest will be talking to it directly. By default .3 is the DHCP server and it does not listens on udp port 53 (domain) - this is different from old "NAT" attachment where DNS proxy (or host-resolver) listen on .3:53.

comment:3 by Valery Ushakov, 8 years ago

Component: networknetwork/NAT
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use