[Dnsmasq-discuss] Using IPv6 DHCP

Gene Czarcinski gene at czarc.net
Wed Oct 3 20:28:16 BST 2012


On 10/03/2012 08:45 AM, Sean Boran wrote:
>> I was initially surprised: it works just like you would like it to.
>>
>> Now, this works with radvd and dnsmasq.  The question is whether dnsmasq
>> could do the same thing for RA while continuing to do the dhcpd/dhcpd6 and
>> dynamic dns stuff so that it was unnecessary to run radvd.  This works on an
>> IPv6-only network.
> Now that only works with your patch to fedora?
>
>
> Using radv as you described (AdvSendAdvert on; AdvManagedFlag on;),
> instead of dnsmasq

Did you specify "AdvAutonomous off;" under the prefix definition?  I 
have not tried all the various combinations of radvd parameters ... 
these are the ones which I was told work ... and they do for me anyway.

My patch is not involved with making this work.  What my patch does is 
to supply the final piece with and dhclient sent the appropriate info up 
to radvd/named/dhcpd6 or radvd/dnsmasq so that dynamic updating of the 
dns occurs.

On thing I found out from another message on another thread is that 
while radvd/dnsmasq work, dnsmasq can do the whole job itself.:

> Am 02.10.2012 21:52, schrieb Simon Kelley:
>> On 02/10/12 14:56, Dan Williams wrote:
>>> So you really want to reconfigure either dnsmasq or radvd to set the
>>> "M" (Managed) flag, which will tell the clients to get their address
>>> from DHCPv6, not generate one from the RA prefix option.
>> Dan is right, and the way to do this in dnsmasq is to define a dhcp-range, and set the
>> global enable-ra flag. That will send RA (for the default route) with the M flag set (no
>> SLAAC address). If you want SLAAC addresses_as_well_  as DHCPv6 assigned ones, add the
>> "slaac" keyword to the dhcp-range. That clears the M flag.

What puzzles me is that there appears to be only one way things work, 
that it works correctly for stateful IPV6 addresses, that it complies 
with RFC 4861, but these facts are not well documented and "marketed."  
This info needs to get into the documentation that accompanies 
distributions.

Gene

>
> - On Ubuntu 12.04, network=automatic, SLAAC (but not DHCP) addresses
> are assigned, default route works.
> - with Automatic/DHCP, a dhcp address is assigned, but no route :-(
> - with Automatic/Address only, SLAC+dhcp address is assigned, route works.
>
> On a windows 7 client, only a slaac address is assigned, route is fine.
> You indicated being able to get windows 7 to work as desired?
>
>
> Finally, disable radvd and in dnsmasq "enable-ra" agin.
> The Ubunut client with "with Automatic/Address only", gets only SLAAC,
> not DHCP.
> In the discussion so far, was it indicated if dnsmasq RA ca do the
> equivalent of "AdvSendAdvert on; AdvManagedFlag on;" ?
>
>
> Sean
>
>
>
> On 2 October 2012 05:36, Gene Czarcinski <gene at czarc.net> wrote:
>> On 10/01/2012 04:43 PM, Simon Kelley wrote:
>>> On 01/10/12 21:13, Sean Boran wrote:
>>>> "I have not tested dnsmasq to see if it could provide the RA, dhcp, and
>>>> dns
>>>> services for IPv6 but I am interested that it would."
>>>>
>>>> It can do RA, but I disabled it, as I did on my router. For me it was
>>>> necessary on my Ubuntu client to prevent it having a SLAAC address.
>>>>
>>>> I'd not noticed the route issue though, and
>>>> dhcp-option=option6:router
>>>> can't be used with an Ipv6 address. oops.
>>>>
>>>> Enabling RA in dnsmasq, with dhcp , and setting the network manager to
>>>> auto
>>>> in Ubuntu 12.04 causes SLAAC addresses (2) to be assigned and the default
>>>> route to work.
>>>>
>>>> Hmm. I'd like to assign specific, not slaac addresses, but of course a
>>>> default route too.
>>>>
>>> You're right that there's no DHCPv6 option for default route: that has to
>>> come from RA. It is possible to do RA broadcasts and tell the client to use
>>> them for getting a default route, but not a SLAAC address, so that the
>>> address stuff happens by DHCPv6. That mode is what dnsmasq does on a subnet
>>> where there is an IPv6 dhcp-range, and enable-ra is set.
>>
>> OK, RA for default route and dhcp-6 for IPv6 address and dns update ... this
>> does work.
>>
>> This was developed and tested running Fedora 17 although it should/will work
>> for other systems.  The system runs NetworkManager.  A patch I developed is
>> currently in the process of being integrated.  This patch enhances
>> NetworkManager so that dynamic DNS is supported.  This has been tested with
>> both radvd/dnsmasq and radvd/named/dhcpd/dhcpd6 providing the services.
>>
>> Just dhcpd6 does not work because it does not provide any routing info.
>> NetworkManager uses their "auto" configuration to use dhcp6 (via dhclient6)
>> to provide the IPv6 address and update the dns and to use RA (from radvd) to
>> provide the default route.
>>
>> Here is the critical info:
>> https://fedoraproject.org/wiki/Tools/NetworkManager/IPv6
>>
>> Scroll down to "DHCPv6 address and DNS configuration".
>>>
>>> /etc/radvd.conf:
>>>
>>>
>>> interface eth0 {
>>>       AdvSendAdvert on;
>>>       AdvManagedFlag on;
>>>       prefix 2001:db8:1:2::/64 {
>>>           AdvAutonomous off;
>>>       };
>>> };
>>>
>>> /etc/dhcp/dhcpd6.conf:
>>>
>>> subnet6 2001:db8:1:2::/64 {
>>>       option dhcp6.name-servers 2001:db8:1:2::ab;
>>>       option dhcp6.domain-search "example.net";
>>>       range6 2001:db8:1:2::1:0000 2001:db8:1:2::1:ffff;
>>> }
>>>
>>> This is a typical DHCPv6 configuration. Note that routing information are
>>> stil delivered through Router Advertisements. NetworkManager may fail in
>>> this scenario.
>>>
>>>
>> I was initially surprised: it works just like you would like it to.
>>
>> Now, this works with radvd and dnsmasq.  The question is whether dnsmasq
>> could do the same thing for RA while continuing to do the dhcpd/dhcpd6 and
>> dynamic dns stuff so that it was unnecessary to run radvd.  This works on an
>> IPv6-only network.
>>
>> Gene
>>
>>
>>
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>




More information about the Dnsmasq-discuss mailing list