Confused about dhclient .conf and -script..

B. Cook bcook at poughkeepsieschools.org
Mon Jun 11 14:10:31 UTC 2007


I am trying to make a FreeBSD machine that gets a dynamic ip from a 
pfsense box work the same way as a Windows machine does.

After reading way more about isc-dhcpd than I wanted to, I found out 
that I can customize /etc/dhclient.conf (great).  I found a great 
dhclient.conf but it seemed to do things that I could not get my FreeBSD 
box(es) to do.

So I found out that this config file actually came from a linux box 
(some ubuntu version) and that it runs a dhclient-script which I then 
found out that FreeBSD also has..

So I'm closer but not there yet and can not seem to figure out what I am 
missing.

This is my /etc/dhclient.conf :

send host-name "$HOSTNAME";
request subnet-mask, broadcast-address, time-offset, routers,
         domain-name, domain-name-servers, host-name,
         netbios-name-servers, netbios-scope;
timeout 30;
script "/sbin/dhclient-script";


the dhclient-script is the stock one (6.2-p5) the linux one had the 
host-name set to "<hostname>" after looking at the dhclient-script it 
looks like I need to use $HOSTNAME.

Except when I change the hostname of the box (via hostname -s 
blahblah.local.domain) and then run dig against the dns server, the name 
blahblah did not register.

Jun 11 09:47:11 pfsense dhcpd: DHCPACK on 192.168.1.13 to 
00:b0:d0:a1:8f:17 ($HOSTNAME) via dc0
Jun 11 09:47:13 pfsense dhcpd: DHCPREQUEST for 192.168.1.13 from 
00:b0:d0:a1:8f:17 ($HOSTNAME) via dc0

So what am I doing wrong, can I get what I am looking for?

doing this:


More information about the freebsd-questions mailing list