Skip to content

Requesting a DHCP hostname with Debian

The DHCP server at my workplace allows clients to request a host name, and it then uses dynamic DNS updates to update the local DNS zone.

To make this work on Debian, I added the hostname option to the LAN iface stanza in my /etc/network/interfaces file:

iface eth0 inet dhcp
hostname capybara

Strangely, this option is not supported with dhcp3-client (the ISC client, Debian’s default), so I had to install one of the alternatives listed in the interfaces(5) man page (pump, dhcpcd or udhcpc). I knew dhcpcd from my Gentoo days, so I tried it, and it worked.

{ 1 } Comments

  1. Charl van Niekerk | 7 February 2009 at 10:43 pm | Permalink

    Thanks very much for this tip, I didn’t know that one can do this in the /etc/network/interfaces file as well. On Ubuntu Hardy, I usually use the “send host-name” setting in /etc/dhcp3/dhclient.conf and that worked pretty well for me.

Post a Comment

Your email is never published nor shared. Required fields are marked *