Page 1 of 1

NAT Network DNS not offering DNS information.

Posted: 19. May 2016, 18:22
by DrCh4ndra
Creating a default NATed VM works as expected out of the box, but a manually created one doesn't.

Creating a NAT network and attaching it to an ubuntu VM, causes host dhcpd stop sending DNS ip, and VM is left without resolver.
I can ping external hosts by up and use dig against the VM gateway to resolve names.

I have captured the dchp/bootp packets and attached to the ticket. Actually I am not allowed. I have opened the capture in wireshark and it is clear the option 6, dns server is not being passed in the dhcp answer.

Host:
$ apt-cache show virtualbox-5.0
Package: virtualbox-5.0
Version: 5.0.20-106931~Ubuntu~trusty
Architecture: amd64

$ VBoxManage list natnetworks

NetworkName: NatNetwork1
IP: 10.0.123.1
Network: 10.0.123.0/24
IPv6 Enabled: Yes
IPv6 Prefix: fe80::/64
DHCP Enabled: Yes
Enabled: Yes
loopback mappings (ipv4)
127.0.0.1=2

VM:
# netstat -rnv
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.0.123.1 0.0.0.0 UG 0 0 0 enp0s3
10.0.123.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s3
192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s8
# dig google . com @10.0.123.1

;; QUESTION SECTION:
;google . com. IN A

;; ANSWER SECTION:
google . com . 102 IN A 64.233.190.102
[...] (spaces added by me to because of: "You must be a member for 1 days and have 1 posts before you can post urls.")

Re: NAT Network DNS not offering DNS information.

Posted: 19. May 2016, 18:26
by DrCh4ndra
I have uploaded the cap file here (remove spaces)

drive . google . com / file / d / 0B1Nf-MV52fN9VGtQeldlQlc2dDQ