Using DHCPv6 options codes

Glenn Satchell glenn.satchell at uniq.com.au
Sun Mar 11 12:24:59 UTC 2012


Hi Siobhán

Check out the dhcp-options man page, and look for the section titled
"DEFINING NEW OPTIONS". You can't just use the number, because you need to
tell dhcpd how to encode the option in the packet it sends.

     New options are declared as follows:

     option new-name code new-code = definition ;

So in your example below, as you are using quotes it looks like an ascii
text string. So you define it once, using an arbitrary name you choose:

option my-option-56 code 56 = text;

Then assign a value as you have done below:

option my-option-56 "2001:1b70:82a1:b:0:3008:26:1";

or perhaps
option foo-gateway code 56 = ip6-address;
option foo-gateway 2001:1b70:82a1:b:0:3008:26:1;

regards,
-glenn

> Hi
>
> Is it possible to use the option code if an option name doesn't exist and
> if so how can I call it I have the tried the following combinations
>
> option 56 "2001:1b70:82a1:b:0:3008:26:1";
>
> Mar  9 15:52:48 atclvm200 dhcpd: [ID 702911 daemon.error]
> /usr/local/etc/dhcpd6.conf_subnet line 5: expecting identifier after
> option keyword.
> Mar  9 15:52:48 atclvm200 dhcpd: [ID 702911 daemon.error] option 56
> Mar  9 15:52:48 atclvm200 dhcpd: [ID 983272 daemon.error]         ^
>
> option code 56 "2001:1b70:82a1:b:0:3008:26:1";
>
> Mar  9 15:53:33 atclvm200 dhcpd: [ID 702911 daemon.error]
> /usr/local/etc/dhcpd6.conf_subnet line 5: unknown option dhcp.code
> Mar  9 15:53:33 atclvm200 dhcpd: [ID 702911 daemon.error] option code 56
>
> code 56 "2001:1b70:82a1:b:0:3008:26:1";
>
> Mar  9 15:54:32 atclvm200 dhcpd: [ID 702911 daemon.error]
> /usr/local/etc/dhcpd6.conf line 4: /usr/local/etc/dhcpd6.conf_subnet: bad
> parse.
> Mar  9 15:54:32 atclvm200 dhcpd: [ID 702911 daemon.error] include
> "/usr/local/etc/dhcpd6.conf_subnet"
>
> Thanks
>
> Siobhán
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users




More information about the dhcp-users mailing list