Subject: Re: getting the hostname from DHCP server
To: Hauke Fath <>
From: Stephen Borrill <>
List: netbsd-users
Date: 02/17/2006 09:32:35
On Thu, 16 Feb 2006, Hauke Fath wrote:
> Am 16.02.2006 um 9:04 Uhr +0000 schrieb Stephen Borrill:
>> It "just works" on NetBSD too. This relies on the DHCP server sending the 
>> hostname; it won't fall back to the client doing reverse DNS.
> No, it doesn't. On netbsd-3, at least, you need to set up a custom 
> /etc/dhclient.conf and request (or require) host-name, and possibly other 
> things that you might want. Per default, the dhcpd provides a rather limited 
> subset of what you can set with dhcp.

I've never found that to be the case. On a clean netbsd-3 install:

# hostname

# dhclient
Internet Software Consortium DHCP Client V3.0.1rc11
Copyright 1995-2002 Internet Software Consortium.
All rights reserved.
For info, please visit

Listening on BPF/xennet0/aa:00:00:21:0c:d5
Sending on   BPF/xennet0/aa:00:00:21:0c:d5
Sending on   Socket/fallback
DHCPDISCOVER on xennet0 to port 67 interval 3
DHCPDISCOVER on xennet0 to port 67 interval 5
DHCPDISCOVER on xennet0 to port 67 interval 12
DHCPDISCOVER on xennet0 to port 67 interval 9
DHCPREQUEST on xennet0 to port 67
bound to -- renewal in 16957 seconds.
# hostname
# cat /etc/dhclient.conf
cat: /etc/dhclient.conf: No such file or directory

Perhaps your DHCP server is set up differently. For instance, I have the 
following in mine:
get-lease-hostnames on;