Using option-119/RFC3397 in DHCP 3.1.0

Andrew Pollock apollock at debian.org
Mon Jan 14 00:04:06 UTC 2008


On Mon, Jan 14, 2008 at 03:08:54AM +1000, Andrew Pollock wrote:
> On Mon, Jan 14, 2008 at 02:40:53AM +1000, Andrew Pollock wrote:
> > Hi,
> > 
> > I'm trying to have a play around with the new domain search path support
> > that is allegedly in DHCP 3.1.0, but I'm really fumbling around in the dark.
> > The RFC doesn't go into implementation detail, and I haven't seen anything
> > in the included documentation.
> > 
> > So far, I've tried putting
> > 
> > option domain-search-order code 119 = string;
> > 
> > in my dhcpd.conf and then 
> > 
> > option domain-search-order "acme.com";
> > 
> > in one of my subnet declarations, but a packet capture shows no evidence of
> > it being sent out when a lease is obtained. I'm not at all sure how to make
> > the DHCP client request a custom option.
> > 
> > Any pointers appreciated.
> > 
> 
> So I must be missing something here.
> 
> I've just tried this with DHCP 3.0.6 (client and server) and got the same
> results as with 3.1.0 (client and server).
> 
> On the server, I put:
> 
> option domain-search code 119 = string;
> 
> and in a subnet:
> 
> option domain-search "andrew.net.au debian.org linux.org.au";
> 
> On the client, I put:
> 
> option domain-search code 119 = string;
> 
> and added domain-search to the list of options requested.
> 
> Then, in a hook that just spits out environment variables, I could see an
> old_domain_search and a new_domain_search set. Even with 3.0.6.
> 
> So I'm inclined to think that I'm doing this the wrong way, or I'm defining
> the domain-search option incorrectly in the server or something.
> 

Never mind, I've figured it out. Helps to read the dhcp-options manpage :-|
And I did that after looking at the source and figuring it out.

That said, I'm seeing a possibly benign error when I obtain a lease, though:

"parse_option_param: Bad format D" (see below for context)

apollock at mac:~$ sudo ifdown eth0; sudo ifup eth0
There is already a pid file /var/run/dhclient.eth0.pid with pid 16136
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.0
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

parse_option_param: Bad format D
parse_option_param: Bad format D
Listening on LPF/eth0/00:0d:93:c1:94:fe
Sending on   LPF/eth0/00:0d:93:c1:94:fe
Sending on   Socket/fallback
option_space_encapsulate: option space agent does not exist, but is configured.
DHCPRELEASE on eth0 to 192.168.0.1 port 67
Internet Systems Consortium DHCP Client V3.1.0
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:0d:93:c1:94:fe
Sending on   LPF/eth0/00:0d:93:c1:94:fe
Sending on   Socket/fallback
option_space_encapsulate: option space agent does not exist, but is configured.
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPOFFER from 192.168.0.1
option_space_encapsulate: option space agent does not exist, but is configured.
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.10 -- renewal in 290 seconds.

From my inspection of the source, there's that new format code "D" for
domain lists (in common/tables.c), and it's only used for the new
domain-search option. I'm thinking there needs to be a corresponding case
entry in parse_option_decl() in common/parse.c (but I'm not at all familiar
with the source, so I could be talking out my hat).

I'm starting to think that that's why the client script is seeing the
domains separated by \032 - because parse_domain_list() isn't being called
on the data.

regards

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20080114/f6b874d6/attachment.bin>


More information about the dhcp-users mailing list