Skip to content

Enhancement - Let kernel handle interface management #594

@ColinMcInnes

Description

@ColinMcInnes

In Linux, the kernel can do all the heavy lifting of Neighbour Discovery, Router Solicitation, handling Router Advertisements, generating link local addresses, using prefixes, etc.

Add an option to startup dhcpcd for an interface, which will monitor incoming IPv6 traffic similar to radvd. This will give us a feed of Router Advertisements, allowing dhcpcd to determine what "mode" (Managed/DHCPv6 or Other/SLAAC) to begin operating in.

Include ability to send enabling configurations to kernel (see below).

Basically, to take Linux as an example, we should be writing to
(net.ipv6.conf..accept_ra), (net.ipv6.conf..addr_gen_mode),
(net.ipv6.conf.*.use_tempaddr) to enable RS (optionally
stable-privacy, tempaddr address - but respect the values for those if
they're already non-zero), for any interface that needs it and let the
kernel configure those items, before we let DHCPv6 request anything
else.

Martin-Éric

So an example DHCPv6 startup might look like

  1. dhcpcd is asked to start up eth0 as IPv6
  2. dhcpcd configures RS options in kernel space for eth0 as per its per-interface config
  3. dhcpcd requests kernel set net.ipv6.conf.eth0.accept_ra and begins listening to RA stream
  4. dhcpcd receives RA, that provides a prefix and flags M=1,O=0
  5. dhcpcd leave LL generation up to kernel, but as instructed, begins DHCPv6 solicitation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions