Using DHCPv6 options codes

Siobhan Keehan siobhan.keehan at ericsson.com
Mon Mar 12 13:54:50 UTC 2012


Hi Glenn,

Thanks for that, just another question I am assuming that it would be best practice to have this new option in the overall .conf file, but would there be any implications in keeping this in the inlcude file .conf_subnet. Also outside of calling the option number on the client side, are there any other gotchas that you can think of

Many Thanks
Siobhán



-----Original Message-----
From: dhcp-users-bounces+siobhan.keehan=ericsson.com at lists.isc.org [mailto:dhcp-users-bounces+siobhan.keehan=ericsson.com at lists.isc.org] On Behalf Of Glenn Satchell
Sent: 11 March 2012 12:25
To: Users of ISC DHCP
Subject: Re: Using DHCPv6 options codes

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


_______________________________________________
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