0

I had the following enviroment configuration:

http://i.imgur.com/9chRJT8.png

Ubuntu VM /etc/network/interfaces:

auto eth0
iface eth0 inet static
 address 192.168.10.11
 netmask 255.255.255.0
 gateway 192.168.10.1
 dns-nameservers 192.168.10.12

Ubuntu VM /etc/resolv.conf:

nameserver 192.168.10.12

I changed it to another configuration (i want to get dns server address from dhcp (router)):

Ubuntu VM /etc/network/interfaces:

auto eth0
iface eth0 inet dhcp

[my Ubuntu VM ip address from dhcp = 192.168.10.8]

Ubuntu VM /etc/resolv.conf:

nameserver 192.168.10.8 <-- ??? 

[why dns server and my dhcp client have the same address?]

Router dhcp configuration:

Start IP Address: 192.168.10.2
End IP Address: 192.168.10.100
Primary DNS Server: 208.67.222.222 <-- it's a proper dns server
Secondary DNS Server: 0.0.0.0
Gateway: 192.168.10.1

Thank you in advance!

0

Because Ubuntu uses dnsmasq as a local caching dns server to reduce redundant requests going to the real name server and speed up name resolution. Normally /etc/resolv.conf just points to 127.0.0.1, but it looks like you removed the loopback interface ( lo ) from your /etc/network/interfaces auto line so I'm guessing your DHCP assigned IP address is the only valid address it could use. You should probably put the loopback interface back on the auto line of your interfaces file.

  • "but it looks like you removed the loopback interface ( lo ) from your /etc/network/interfaces auto line " - no i didnt. (auto lo \n iface lo inet loopback is in /etc/resolv.conf) – Krzychu Apr 9 '16 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.