dhclient doesn't send host name to server = dynamic DNS fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dhcp (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
The DHCP client (dhclient) on Ubuntu Hoary doesn't send the host name to the
server when it aquires a new lease. If the server also does dynamic DNS (ie. it
adds the IPs given to DHCP clients and the associated host names to a DNS
server), this means that the host name of the Ubuntu machine is not added to the
DNS.
The specific situation for me is that I have dnsmasq running on my home server.
Dnsmasq provides DNS (cache) services and DHCP services and has dynamic DNS. If
a client sends its host name when it requests an IP, dnsmasq adds the host name
and the IP given to that host to its DNS table, and so the client host name can
immediately be resolved via DNS. That's a very convenient feature :-) but due to
the problem described in this bug report it doesn't work with an Ubuntu (Hoary)
client.
Please excuse that I don't add the whole configuration of my server to this bug
report... Basically it's a default installation of dnsmasq on Debian Sarge, if
you want to reproduce the problem. The client (named "veridian") is a standard
installation of Ubuntu Hoary 5.04 on a laptop; the only network interface (eth0)
is a PCMCIA network card. IP allocation itself works fine.
POSSIBLE SOLUTION:
To make the client send its host name, add the "send host-name" option to the
file /etc/dhcp3/
send host-name "veridian";
I also asked the dnsmasq dev about this; here's the reply:
[...]
> Hello,
>
> is there a recommended way to make dhclient (ISC's dhcp client) send the
> hostname when requesting a DHCP lease (so that the hostname can be
> resolved with DNS)? Is "send-address" the right option for this, or is
> there a better way?
send host-name "<name>" is the way to do it. The sample dhclient script from ISC
seems to set this to the value of `hostname`. I have no easy way to tell if
Ubunutu does the same. If it doesn't it might be worth filing a bug.
>
> I ask because with Ubuntu Hoary as client the hostname is not resolvable
> on the LAN, and I'd like to know the correct way to fix this.
>
[...]
I use the "send host-name" solution on my laptop now, and it works fine.
Thanks,
Oliver Gerlich
This bug has been marked as a duplicate of bug 10239.