[Dnsmasq-discuss] Using IPv6 DHCP

Sean Boran sean at boran.com
Wed Oct 3 13:45:22 BST 2012


> 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

- 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