2

When this Ubuntu Hardy server comes up it is not always guaranteed that the dns settings are correctly, if the network cable was not connected during boot.

I would prefer a simple fast and fixed dns setup.

I do not have the knowledge of the packages, this is what somehow installed by itself (we always try to go simple and standard ways without changing much that comes out of the box):

$ dpkg -l|grep dns
ii  dnsutils                              1:9.4.2.dfsg.P2-2ubuntu0.5            Clients provided with BIND
ii  libavahi-compat-libdnssd1             0.6.22-2ubuntu4.1                     Avahi Apple Bonjour compatibility library
ii  libdns36                              1:9.4.2.dfsg.P2-2ubuntu0.5            DNS Shared Library used by BIND
ii  libnss-mdns                           0.10-3ubuntu2                         NSS module for Multicast DNS name resolution

This is the network config that I selected during install:

$ cat /etc/network/interfaces 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
 address 10.1.1.2
 netmask 255.255.255.0
 network 10.1.1.0
 broadcast 10.1.1.255
 gateway 10.1.1.1
 # dns-* options are implemented by the resolvconf package, if installed
 dns-nameservers 10.1.1.1
 dns-search localdomain

This somehow changes, but I don't want it to change:

$ cat /etc/resolv.conf 
search localdomain
nameserver 10.1.1.1

What would be the straightforward solution for a fixed dns setting here?

I assume I just have to uninstall a package and do some settings manually?

Please explain the steps for this running machine and also for a fresh Hardy install.

(It would be nice to get the same information for the latest LTS but I could also ask a different question for it)

user12096
  • 917
  • 5
  • 23
  • 39

1 Answers1

1

This line here would appear to be the culprit:

# dns-* options are implemented by the resolvconf package, if installed

See http://packages.ubuntu.com/dapper/resolvconf:

Resolvconf is a framework for keeping track of the system's information about currently available nameservers. It sets itself up as the intermediary between programs that supply nameserver information and programs that use nameserver information.

Not that I run Ubuntu, but I'd suggest that removing that packages, and just putting your own settings in /etc/resolv.conf should do the job nicely.

Alnitak
  • 20,901
  • 3
  • 48
  • 81
  • so this did work, after all? – Alnitak Jun 28 '10 at 19:43
  • I think this is the right solution. In fact I have several machines, some of them had the package, some not, I am not quite sure which really had the problem, so I will wait and see what happens with my new knowledge :) – user12096 Jun 29 '10 at 09:38