resolv.conf doesn't populate with the ip specified in /etc/network/interfaces using dns-nameservers

Asked by DrKay

Hello-

I am running a 64-bit Ubuntu 12.04 desktop system with LTSP packages installed and two NICs to operate as an LTSP server for my office. I am trying to use /etc/network/interfaces configuration file to configure networking instead of the network manager. I try disabling the network manager by placing "managed=false" in /etc/NetworkManager/NetworkManager.conf file.

The problem is that the system seems to be unable to add the dns server ip address to resolve.conf. It only has the loopback address in it, and will not respect the "dns-nameservers" ip that I place in /etc/network/interfaces.

My /etc/network/interfaces file looks like this:

# The loopback network interface

auto lo
iface lo inet loopback

# Primary Network Interface (for internet)
 auto eth0
 iface eth0 inet static
  address 192.168.100.120
  netmask 255.255.255.0
  network 192.168.100.0
  broadcast 192.168.100.255
  gateway 192.168.100.1
  dns-nameservers 192.168.100.1
  gatewaydev=eth0
  up route add default gw 192.168.100.1 dev eth0

# Secondary network interface (for the LTSP Clients)
 auto eth1
 iface eth1 inet static
 address 192.168.99.110
 netmask 255.255.255.0
 network 192.168.99.0
 broadcast 192.168.99.255
 dns-nameservers 192.168.100.1
 gatewaydev=eth0

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
DrKay (dr-jameskay) said :
#1

My resolv.conf file looks like this:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Add it in /etc/resolvconf/resolvconf.d/head

reboot to test

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#3

As @actionparsnip said, you have to add it to "head" file. This file does not exist and you must create it.

    gksudo gedit /etc/resolvconf/resolvconf.d/head

Regards
 NikTh

Can you help with this problem?

Provide an answer of your own, or ask DrKay for more information if necessary.

To post a message you must log in.