Handling hostnames with DHCP : 10.04 vs. 11.04

Nicolas Kovacs info at microlinux.fr
Thu May 12 04:45:29 UTC 2011


Hi,

I have a LAN consisting exlusively of 10.04 machines: a 10.04 server and 
various X/K/Ubuntu 10.04 clients. Hostnames are managed centrally by the DHCP 
server, and the configuration looks like this on the server:

# dhcpd.conf
authoritative;
default-lease-time 86400;
max-lease-time 86400;
option broadcast-address 192.168.2.255;
option subnet-mask 255.255.255.0;
option routers 192.168.2.1;
option domain-name-servers 192.168.2.1;
option domain-name "presbytere.montpezat";

subnet 192.168.2.0 netmask 255.255.255.0 {
  range 192.168.2.100 192.168.2.200;
}

host babasse {
  hardware ethernet 00:0d:61:ae:6b:8f;
  fixed-address 192.168.2.2;
  option host-name "babasse";
}

host bernadette {
  hardware ethernet 00:0d:61:a6:e7:1e;
  fixed-address 192.168.2.3;
  option host-name "bernadette";
}

host raymonde {
  hardware ethernet 00:20:ed:b8:e8:ec;
  fixed-address 192.168.2.4;
  option host-name "raymonde";
}

host lifebook {
  hardware ethernet 00:0b:5d:46:f2:10;
  fixed-address 192.168.2.5;
  option host-name "lifebook";
}

On the client side, I removed the Network Manager:

# apt-get autoremove --purge network-manager network-manager-pptp

I reverted to the "classic" configuration:

# /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

I removed the hardcoded hostname:

# rm /etc/hostname

And /etc/hosts is this simple one-liner:

127.0.0.1 localhost.localdomain localhost

This has been working fine for me. 

Now I upgraded (understand: made backups and made a fresh install) one of my 
desktops to Kubuntu 11.04 (which rocks, BTW). About the only thing that 
doesn't work is the hostname configuration. When I configure my 11.04 client 
as above, I get:

$ hostname --fqdn
localhost.localdomain


Any idea what happened here between releases?

Cheers from the sunny South of France,

Niki




More information about the ubuntu-users mailing list