Unable to add IPv6 option to dhcp config file

Glenn Satchell glenn.satchell at uniq.com.au
Fri May 7 06:30:35 UTC 2010


Ok, that error is easy to fix: "option definitions may not be scoped" 
means you must define the option in the global scope, not in the subnet 
scope.

Move the option definition line out of the subnet into the global scope, 
ie put it *before* any subnet definitions. You can still fill in the 
values in the subnet scope though, you might want different values in 
different subnets for example.

option OPTION_6RD code 201 = array of integer 8;
subnet ... {
	option domain-name ...
	option OPTION_6RD 
201,24,28,64,192,168,1,100,32,01,18,52,0,0,0,0,0,0,0,0,0,0,0,0;
	...
}

regards,
-glenn


On 05/07/10 16:21, ShashidharReddy Polepalli-JDXW34 wrote:
> Hi Glenn,
> Excerpt from the dhcpd man page under "DEFINING NEW OPTIONS"
> /* ARRAYS
>
> Options can contain arrays of any of the above types except for the
> text and data string types, which aren't currently supported in arrays.
> An example of an array definition is as follows:
>
> option kerberos-servers code 200 = array of ip-address;
> option kerberos-servers 10.20.10.1, 10.20.11.1;*/
>
> I have added the option as below in red to an already existing
> dhcpd.conf file.
>
> subnet 192.168.1.0 netmask 255.255.255.0 {
> default-lease-time 86400;
> max-lease-time 86400;
> range 192.168.1.64 192.168.1.253;
> option routers 192.168.1.254;
> option domain-name-servers 192.168.1.254;
> option domain-name "domain_not_set.invalid";
> option OPTION_6RD code 201 = array of integer 8;
> Option OPTION_6RD
> 201,24,28,64,192,168,1,100,32,01,18,52,0,0,0,0,0,0,0,0,0,0,0,0;
> }
>
> Below is the error I get
> */etc/dhcpd.conf line 8: option definitions may not be scoped.
> option OPTION_RD code
> ^
> /etc/dhcpd.conf line 9: unknown option dhcp.OPTION_RD
> option OPTION_RD 200,
> ^
> Configuration file errors encountered -- exiting*
> FYI : Link for the draft RFC which has a mention of OPTION_6RD option
> http://tools.ietf.org/html/draft-ietf-softwire-ipv6-6rd-01
>
> Regards,
> Shashi
>
>
>
> -----Original Message-----
> From: dhcp-users-bounces+shashidhar=motorola.com at lists.isc.org
> [mailto:dhcp-users-bounces+shashidhar=motorola.com at lists.isc.org] On
> Behalf Of Glenn Satchell
> Sent: Friday, May 07, 2010 11:22 AM
> To: Users of ISC DHCP
> Subject: Re: Unable to add IPv6 option to dhcp config file
>
> Hi Shashi
>
> Have you looked at the section "DEFINING NEW OPTIONS" in the
> dhcp-options man page? This explains the format and syntax for user
> defined or customised options.
>
> Can you post the code you have tried and whatever the definition is in
> the RFC? Someone here may be able to correct it for you.
>
> regards,
> -glenn
>
> On 05/07/10 15:19, ShashidharReddy Polepalli-JDXW34 wrote:
>  > The draft and IANA appears to have not assigned option code.
>  > I have tried to add my own option code number in couple of ways. It
>  > either says unrecognized option or option not scoped.
>  > Would it be possible to define your own option number , name and
>  > define your own organized array as per draft RFC?
>  > Regards,
>  > Shashi
>  >
>  > ----------------------------------------------------------------------
>  > --
>  > *From:* dhcp-users-bounces+shashidhar=motorola.com at lists.isc.org
>  > [mailto:dhcp-users-bounces+shashidhar=motorola.com at lists.isc.org] *On
>  > Behalf Of *Patrik Lahti
>  > *Sent:* Thursday, May 06, 2010 8:01 PM
>  > *To:* Users of ISC DHCP
>  > *Subject:* Re: Unable to add IPv6 option to dhcp config file
>  >
>  > What are you trying to put into dhcpd.conf exactly?
>  >
>  > Could the problem be that it's a draft and IANA hasn't assigned an
>  > option code for OPTION_6RD?
>  >
>  > /P
>  >
>  > On 06/05/10 08:36 AM, ShashidharReddy Polepalli-JDXW34 wrote:
>  >> Hi,
>  >> Im unable to add OPTION_6RD to the dhcpd.conf file as mentioned in
>  >> the http://tools.ietf.org/html/draft-ietf-softwire-ipv6-6rd-01
>  >> Would appreciate quick response in this regard.
>  >> Thanks,
>  >> Shashi
>  >>



More information about the dhcp-users mailing list