Using DHCPv6 options codes

Siobhan Keehan siobhan.keehan at ericsson.com
Mon Mar 12 17:39:08 UTC 2012


Hi

Using locally defined options as below

option dhcp6.test-server code 180 = ip6-address;
option dhcp6.web-server code 181 = array of ip6-address;
option dhcp6.ntp-server code 182 = array of ip6-address;

subnet6 2001:1b70:82a1:b::/64 {

range6  2001:1b70:82a1:b:0:3008:21:1 2001:1b70:82a1:000b:0000:3008:0022:0001;

option dhcp6.test-server 2001:1b70:82a1:b:0:3008:26:1;
option dhcp6.web-server 2001:1b70:82a1:b:0:3008:25:1, 2001:1b70:82a1:b:0:3008:26:1;
option dhcp6.ntp-server 2001:1b70:82a1:b:0:3008:25:1, 2001:1b70:82a1:b:0:3008:26:1;



When I do a snoop on the network, I keep getting eg

DHCPv6: Message type (msg-type) = 1 (Solicit)
DHCPv6:   Requested Option Code = 180 (Unknown)
DHCPv6:   Requested Option Code = 181 (Unknown)
DHCPv6:   Requested Option Code = 182 (Unknown)

DHCPv6: Message type (msg-type) = 2 (Advertise)

DHCPv6: Option Code = 180 (Unknown)
DHCPv6: Option Code = 181 (Unknown)
DHCPv6: Option Code = 182 (Unknown)


DHCPv6: Message type (msg-type) = 3 (Request)

DHCPv6:   Requested Option Code = 180 (Unknown)
DHCPv6:   Requested Option Code = 181 (Unknown)
DHCPv6:   Requested Option Code = 182 (Unknown)

DHCPv6: Message type (msg-type) = 7 (Reply)

DHCPv6: Option Code = 180 (Unknown)
DHCPv6: Option Code = 181 (Unknown)
DHCPv6: Option Code = 182 (Unknown)



Options don't appear to be sent have I missed something in the config

//Siobhan




-----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: 12 March 2012 14:55
To: Users of ISC DHCP
Subject: Re: Using DHCPv6 options codes

I'm pretty sure that the option definition needs to be in the global scope. However, you can assign different values in each scope if you wish.

regards,
-glenn

On 03/13/12 00:54, Siobhan Keehan wrote:
> 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


More information about the dhcp-users mailing list