[Dnsmasq-discuss] Cannot assign IPv6 address for /96 subnet

Sheng Yang sheng at yasker.org
Wed Mar 20 18:28:38 GMT 2013


On Fri, Mar 15, 2013 at 7:25 AM, Simon Kelley <simon at thekelleys.org.uk> wrote:
> On 14/03/13 01:57, Sheng Yang wrote:
>>
>> Interesting, the newer version seems no longer allow such line in the
>> configuration file?
>>
>> dhcp-range=fc00:3:1602::7473,96,static
>>
>> dnsmasq keeps complaining about bad dhcp-range, for version 2.66test21.
>>
>> Use the 2.62 is fine(though different cidr not working for dhcp-host).
>
>
>
> Ah! This might explain everything! That dhcp-range is wrong, and 2.66 is
> correct to reject it. The parsing code has been tightened up since 2.62
>
> the configuration you need is
>
> dhcp-range=fc00:3:1602::7473,static,96
>
>
> If I was to do dnsmasq again from scratch, I'd re-design the configuration
> syntax to avoid this sort of ambiguity.

Ah, this works... Oops...

Thanks!

--Sheng


>
>
>
> Simon.
>
>
>
>
>>
>> --Sheng
>>
>> On Fri, Mar 8, 2013 at 9:53 AM, Simon Kelley <simon at thekelleys.org.uk>
>> wrote:
>>>
>>> On 07/03/13 22:38, Sheng Yang wrote:
>>>>
>>>>
>>>> Hi Simon,
>>>>
>>>> Any chance you can reproduce it?
>>>>
>>>> If dhcp-range can accept a prefix rather than 64 then hand it out, I
>>>> think dhcp-host should also able to do so...
>>>
>>>
>>>
>>> I just tested 2.66test21, and it worked fine for me. I didn't test
>>> earlier
>>> code.
>>>
>>> I've re-written huge chunks of relevant code for test21, without actually
>>> looking at this problem. So either I've not got the same conditions as
>>> you
>>> and the bug is still there, or I've done a better job this time round as
>>> fixed the bug without doing so explicitly.
>>>
>>>
>>> Please could you give 2.66test21 a go with you config, and see how you
>>> get
>>> on?
>>>
>>>
>>>
>>> Cheers,
>>>
>>> Simon.
>>>
>>>
>>>>
>>>> --Sheng
>>>>
>>>> On Wed, Feb 20, 2013 at 2:58 AM, Simon Kelley<simon at thekelleys.org.uk>
>>>> wrote:
>>>>>
>>>>>
>>>>> On 20/02/13 02:16, Sheng Yang wrote:
>>>>>>
>>>>>>
>>>>>> Hi Simon,
>>>>>>
>>>>>> Did you use dhcphost option? dhcp-range works for me(if I specify a
>>>>>> range), but not with dhcp-host option(when I specify dhcp-range as
>>>>>> static).
>>>>>
>>>>>
>>>>>
>>>>> Ah, no, I didn't. I should have read back through the thread. I'll
>>>>> check
>>>>> again, but it rather looks like this is non possible, by design,  (or
>>>>> miss-design)
>>>>>
>>>>> Simon.
>>>>>
>>>>>>
>>>>>> --Sheng
>>>>>>
>>>>>> On Tue, Feb 19, 2013 at 1:06 PM, Simon Kelley<simon at thekelleys.org.uk>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> So, I did some testing. I configured an server interface with
>>>>>>> prefix-length
>>>>>>> 96, and configured dnsmasq with a dhcp-range and 96 prefix.
>>>>>>>
>>>>>>> Using dhclient, I got a lease successfully.
>>>>>>>
>>>>>>> The only problem is that dhclient configured the client's interface
>>>>>>> with
>>>>>>> prefix-length 64.
>>>>>>>
>>>>>>> I moment's thought shows that this is expected: there is nowhere in
>>>>>>> the
>>>>>>> DHCPv6 messages for the prefix-length information to be passed to the
>>>>>>> client. There _is_ a prefix-length field in router-advertisements.
>>>>>>> but
>>>>>>> AFAIK, there's no way for the DHCPv6 client to use that information.
>>>>>>>
>>>>>>> Of course if you're using RA for address-allocation, using SLAAC, the
>>>>>>> prefix
>>>>>>> length has to be 64 anyway.
>>>>>>>
>>>>>>> If anyone knows better, or can explain how the standard(s) are
>>>>>>> supposed
>>>>>>> to
>>>>>>> work, please enlighten me.
>>>>>>>
>>>>>>> Simon.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>



More information about the Dnsmasq-discuss mailing list