trouble with DHCP hostname

So I managed a wired DHCP configuration with Opensuse 11 and got it to work and assign a dynamic IP, however, the domain is correct but the hostname associated with this IP is not what I supplied for the name of the machine. I set the <hostname to send> to “AUTO” so that it looks in /etc/HOSTNAME but what I get back looks like it sent the MAC address of the ethernet card. Looking up the IP using host XXX.XXX.XXX.XXX gives

in-addr.dhcp.YYY.YYY domain name pointer intel-0-3-57-2c-98-a.dhcp.YYY.YYY

which is not correct. Any ideas what’s going on?

You probably have no control over the reverse mapping of the IP address to name. If it’s a public domainname, it’s generated at your ISP’s nameserver and is designed to make it easy to see what IP address, and in fact what MAC address you have. If the reverse mapping is done at the router, then it depends on whether the router allows you to specify a name of your choice instead of the router generated one.

The domain isn’t public (it’s an .edu) and the previous versions of Suse (9.3 and 10.0) that I was running did not suffer this problem. I have another machine configured in Suse 10.0 with exactly the same set up currently running and the DHCP alias is not a problem there.

.edu addresses are public addresses as opposed to private addresses in private LANs.

The question is really is doing the reverse mapping. If it’s a DNS nameserver that is not under your control, then the policy is up to the sysadmin, whether it accepts hostname updates from the DHCP server that gave you the address. If it does, then the next issue is how to send the right DHCP option in the client’s request to make this happen.

No, Joe’s right, there is definitely something different going on with openSUSE 11. I have a wireless router running DD-WRT that provides DHCP with dynamic DNS based on the hostname that the client sends. It did (and does) work perfectly with openSUSE 10.3, but not with 11. Nothing looks different from a configuration standpoint as far as I can tell. I guess I will have to sniff the traffic to learn more. :frowning:

This is a bug in openSUSE 11

for some reason it doesn’t send the hostname to the dhcp-server and therefore it cannot be registered at the dns-server.

see for more details



Thank you! The bug mentions a workaround, which fixed it for me. In /etc/dhclient.conf, set:

send host-name "yourhostname";

There’s already such a line in the file. You just need to uncomment it. Good enough for now.

At some point (presumably after an update), the workaround stopped working. The bug remains open. Does anyone know of another workaround?

This one’s got me too, a pain in the neck. The workarounds suggested in the bug are a bit confusing, anyone know what change works best?

My last comment in the bug explains what you need to do. If it’s not clear, let me know what part is confusing and I’ll try to clarify. I haven’t tried the same workaround in 11.1 because I am not running it. But hopefully the same trick still works, since the bug wasn’t fixed.

Thanks, I re-read the bug report carefully and figured it out. As root enter:

> touch /etc/dhclient-eth0.conf
> vi /etc/dhclient-eth0.conf

For wireless the file would be /etc/dhclient-wlan0.conf

And then enter:
send host-name “computername”;

And finally:
> rcnetwork restart

All of a sudden the computer has a name. Magic.

I guess that is old magic, because on 11.4, that doesn’t work.
But, fret not: now, THREE years after the initial report, as of June 6, 2011, a fix has been created and pushed out.

Must have been a very difficult bug…