[ previous ] [ next ] [ threads ]
 
 From:  Fred Wright <fw at well dot com>
 To:  m0n0wall at lists dot m0n0 dot ch
 Subject:  DHCP Hostname
 Date:  Thu, 10 Jul 2003 23:32:48 -0700 (PDT)
I notice that the DHCP client has no provision to configure and send a
hostname.  Note that this is not necessarily the same as the "normal"
hostname, but is instead used by some ISPs as an account identifier.  
This is actually more sensible than tying it to a specific MAC address
(and getting into the "MAC spoofing" nonsense), but it does mean that such
services are only usable with clients that support it.

Unfortunately it appears that dhclient has no provision for specifying the
hostname on the command line, so it's necessary to have something of the
following form in /etc/dhclient.conf:

	interface "interface_name" {
		send host-name "host_name";
	}

BTW, I notice that a working case here (on a different platform) includes
the trailing NUL in the hostname string in the packet, in semi-violation
of the RFC ("SHOULD NOT").  I don't know if that's a bug or a workaround
for some broken server implementation (though the RFC says the receiver
isn't supposed to care).

					Fred Wright