2

The networkd documentation describes the following network configuration options:

Network.DHCP. Possible values yes, ipv4, ipv6, and no. Default no.

DHCPv6 will by default be triggered by Router Advertisements, if reception is enabled, regardless of this parameter. By explicitly enabling DHCPv6 support here, the DHCPv6 client will be started in the mode specified by the WithoutRA= setting in the [DHCPv6] section, regardless of the presence of routers on the link, or what flags the routers pass.

DHCPv6.WithoutRA. Possible values solicit, information-request, and no. Default no.

Allows DHCPv6 client to start without router advertisements's "managed" or "other configuration" flag...defaults to "no", and the DHCPv6 client will be started when an RA is received.

IPv6AcceptRA.DHCPv6Client. Possible values always, true, and false. Default true.

When true, the DHCPv6 client will be started in "solicit" mode if the RA has the "managed" flag or "information-request" mode if the RA lacks the "managed" flag but has the "other configuration" flag. If set to "always", the DHCPv6 client will be started in "solicit" mode when an RA is received, even if neither the "managed" nor the "other configuration" flag is set in the RA. This will be ignored when WithoutRA= in the [DHCPv6] section is enabled

It also gives the following example:

[Match]
Name=enp1s0

[Network]
DHCP=ipv6

# The below setting is optional, to also assign an address in the delegated prefix
# to the upstream interface. If not necessary, then comment out the line below and
# the [DHCPPrefixDelegation] section.
DHCPPrefixDelegation=yes

# If the upstream network provides Router Advertisement with Managed bit set,
# then comment out the line below and WithoutRA= setting in the [DHCPv6] section.
IPv6AcceptRA=no

[DHCPv6]
WithoutRA=solicit

[DHCPPrefixDelegation]
UplinkInterface=:self
SubnetId=0
Announce=no

What exactly is the difference between Network.DHCP, DHCPv6.WithoutRA, and IPv6AcceptRA.DHCPv6Client? How do they interact?

1 Answer 1

2

Network.DHCP and DHCPv6.WithoutRA together answer the question Do we wait for an RA packet before starting DHCPv6?

DHCPv6.WithoutRA also answers the question If we don't wait for RA, what kind of DHCPv6 request do we do?

IPv6AcceptRA.DHCPv6Client answers the related question If we do wait for RA, what kind of DHCPv6 request do we do?

It's important to understand that the router advertisement (RA) has two flags:

  • managed: Tells the client to get an IP address from DHCPv6 instead of using SLAAC.

  • other configuration: Tells the client to use SLAAC, but still get DNS server information from DHCPv6.

And DHCPv6 has two modes:

  • solicit: Gets IP address and DNS server information.

  • information-request: Gets DNS server information only.

By default, the managed flag triggers solicit mode, and the other configuration flag triggers information-request mode. However, the above options exist to modify this behavior. For example, setting DHCPv6Client=always waits for an RA packet but overrides the type of DHCPv6 request to do in response. Setting DHCP=yes and WithoutRA=solicit together does a DHCPv6 request without waiting for an RA packet. (Setting IPv6AcceptRA=no ignores RAs, so DHCPv6 can only be triggered if configured to not wait for router advertisement.)

By the way, I know that I used "DNS server information" in this explanation, but DNS is just the most common type of ancillary information that could be returned over DHCPv6. The same messages could contain other information (such as NTP server information) instead of or in addition to the address of the DNS server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .