On Thu, 2003-11-20 at 22:57, Daniel Fone wrote:
> Hi guys,
> 
> I have a question regarding dhcpd. And before you tell me to rtfm,
> please specify the "fm" because I've been through a few.
> I have a small network at home that gets IP, gateway, nameservers etc
> from my linux box running dhcpd. I would like to specify the TCP
> hostname using DHCP. Is this possible? What is the best way to identify
> a client in the conf file? I have windows and linux clients.

You can for the Linux clients, but not for the Windows clients.

To a Linux machine, its name is a minor attribute that it does not use
itself very much. When you configure dhcpd to send the host name to the
clients, the Linux clients will use this as the host name. To do this
you need to specify use-host-decl-names as "on" in your dhcpd.conf file.
You would then need to create an entry for each machine in your
dhcpd.conf file which specifies a unique entity for each client to map
names to clients. The hardware ethernet address is the most commonly
used entity for this, so you'd map ethernet addresses to names, for
example:

host    pcone   { hardware ethernet 00:12:34:56:78:9a; }
host    pctwo   { hardware ethernet 08:00:fb:9a:39:10; }

When dhcpd receives a request from the 00:12:etc hardware address, it
will send a reply with "pcone" as the hostname option, and Linux clients
will use this value as their hostname.

An interesting additional option of the ISC DHCP implementation is that
you can use an 'expression' in the dhcpd.conf file to mangle the
ethernet address into a unique hostname (such as pc00123456789a), in
which case you no longer need to have an entry for each machine on your
network, but you do end up with crappy machine names.


On Windows, everything is different... Windows Networking uses the
NetBIOS protocol, which can run over a number of different protocols, of
which TCP/IP is just one (albeit the most commonly used one). On a
Windows PC you specify a NetBIOS name which the machine uses as its main
machine name. You can separately specify a host name in the TCP/IP
settings, but this needs not be the same as the NetBIOS name and is
largely ignored by Windows. Both names are configured locally on the
client and stored in the Registry and the DHCP option for the hostname
is completely ignored by Windows. In fact, when you look through the
dhcpd.leases file, you will see that the client already sends its name
in the DHCP request, at which point it is too late to overwrite it.

HTH,
Herman
-- 
Herman Verkade <[EMAIL PROTECTED]>

Reply via email to