All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Ben Greear <greearb@candelatech.com>, Dan Williams <dcbw@redhat.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: How is IPv6 dhcp supposed to work?
Date: Wed, 18 Jun 2014 10:18:33 +0200	[thread overview]
Message-ID: <53A14B59.2020907@6wind.com> (raw)
In-Reply-To: <53A0CC31.6090707@candelatech.com>

Le 18/06/2014 01:16, Ben Greear a écrit :
> On 06/17/2014 03:34 PM, Dan Williams wrote:
>> On Tue, 2014-06-17 at 14:41 -0700, Ben Greear wrote:
>>> I'm trying to understand how DHCP for ipv6 is supposed to work.
>>>
>>> I am able to get a global-scope address and prefix from
>>> dhclient, but dhclient is not providing a gateway address.
>>
>> That's because it doesn't; DHCPv6 isn't supposed to be used standalone
>> for global IPv6 connectivity.  That's what router advertisements are
>> for.  The normal flow is this:
>>
>> 1) your router advertisement provides your prefix, prefix length (eg
>> subnet mask), and default gateway/router
>>
>> 2) your prefix gets combined with your local Interface Identifier (often
>> your MAC address or a hashed version of your MAC, or delivered via PPP,
>> or hashed InfiniBand port GUID, or GRE tunnel address, etc) to provide
>> your global IPv6 address.  See
>> net/ipv6/addrconf.c::ipv6_generate_eui64().
>>
>> 3) the RA can also provide search domains, DNS servers, routes, MTU,
>> etc.
>>
>> 4) if there's anything else your administrator really wants to use DHCP
>> for (NTP servers, etc) then they set the M (Managed) or O (Other Config)
>> bits in the router advertisement.
>>
>> 5) In both cases, that requests that the client run DHCPv6; in M mode
>> you do get a lease from the DHCP server and that address becomes
>> preferred, in the O case no lease is obtained but other options can be
>> delivered
>>
>> 6) In all cases, the default gateways (and their respective priorities)
>> are always delivered by Router Advertisements; there can be multiple
>> default gateways in the broadcast domain for redundancy, and the network
>> administrator sets their relative priority.
>>
>>> I see the dhclient interface doing a Router Solicitation, but
>>> I don't see any answers.
>>>
>>> Are we supposed to run radvd or something like that as well?
>>
>> Yes.  If you're not using static addressing, then you must run radvd to
>> deliver router advertisements to your network.  See 'man radvd.conf' for
>> more information on configuring the additional options that DHCP used to
>> be used for (RDNSS, DNSSL, AdvLinkMTU, route, etc).
>>
>>> Or is there some other automated magic that is supposed to
>>> find the default gateway?
>>
>> Router Advertisements via radvd.  You probably want to evaluate whether
>> you really need DHCPv6 at all, since RA can deliver most of the options
>> that people use DHCP for.
>
> Thanks for the detailed answer.  A user told me that 'dhcpv6 didn't work'.
>
> And it doesn't, but I think maybe they were using the equivalent of radvd
> anyway....trying to verify that.
>
> Now, I still have troubles though.  I see the router solicit, and router advertisement,
> but 'ip monitor route' doesn't show any default route being added (and neither does
> the route show up in some other way I know to look.)
>
> I'm using routing rules, veth pairs, and such stuff, and have some local code
> hacks, so maybe it's my fault.  Don't think I've mucked with IPv6 much though...
Naive question, what is the value of accept_ra?
cat /proc/sys/net/ipv6/conf/*/accept_ra

See Documentation/networking/ip-sysctl.txt

  reply	other threads:[~2014-06-18  8:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 21:41 How is IPv6 dhcp supposed to work? Ben Greear
2014-06-17 22:34 ` Dan Williams
2014-06-17 23:16   ` Ben Greear
2014-06-18  8:18     ` Nicolas Dichtel [this message]
2014-06-18 10:37     ` Bjørn Mork
2014-06-18 11:43       ` Hagen Paul Pfeifer
2014-06-18 13:43       ` Dan Williams
2014-06-18 14:49         ` Ben Greear
2014-07-01 21:22           ` Eric W. Biederman
2014-06-18 14:17       ` Ben Greear

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A14B59.2020907@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=dcbw@redhat.com \
    --cc=greearb@candelatech.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.