Subject: Re: NetBSD-1.4: DHCP setup
To: John Nemeth <>
From: Ted Lemon <>
List: current-users
Date: 06/16/1999 11:46:06
> I know this thread has been discussed pretty thoroughly, but, there
> is a syntax error in the above line, that nobody else seems to have
> caught.

It's not a syntax error - just a violation of the suggested protocol
for choosing client identifiers.   In practice, not terribly
significant, but probably worth correcting just so you don't get in
the habit of doing it wrong... :')

> How do you dhcpd to give a client a fixed address based on either the
> hostname, or the dhcp-client-identifier (preferably the hostname)?

You write a host declaration, and within that a hardware declaration
or an "option dhcp-client-identifier ...;" statement, and also a
fixed-address declaration.   For example:

host foo {
  hardware ethernet 8:0:20:10:1d:55;


host bar {
  option dhcp-client-identifier 1:8:0:20:10:1d:55;

There's no real percentage in specifying both hardware and client
identifier unless your client might be using BOOTP for one phase of
its boot and DHCP for a second phase (BOOTP doesn't do DHCP client

> The second question is does anybody have any sample scripts that use
> the new dhclient-script hooks.  What I want is a script that will
> execute a command, anytime the IP address changes.  As you can
> probably guess, this is for registering a dynamic address.


if [ x$old_ip_address != x$new_ip_address ]; then
  do your stuff

# Don't exit...