[systemd-devel] LinkLocalAddressing fallback on DHCP failure

Thad Phetteplace tdphette at gmail.com
Tue Jul 31 17:50:12 UTC 2018


I've got a pull request for this almost ready to go. I just need to clean
it up a bit and update the man pages with the new config options. They are
as follows:

Within the [Network] section I've added a LinkLocalFallback option that
takes the same parameters as LinkLocalAddressing (yes,no,ipv4,ipv6). This
will allow IPv4 and IPv6 to be configured independently. Selecting
LinkLocalFallback assumes LinkLocalAddressing is turned on for that
protocol family, so there is no need to select both. Thus if you do
LinkLocalFallback=ipv4, there is no need to do LinkLocalAddressing=ipv4...
that is assumed. If you do both, it is fine... but the fallback feature
will take precedence. Note that I've only implemented ipv4 so far. It will
let you set ipv6 in the config, but I don't have the plumbing in place to
support it yet, so it will just be ignored.

In the [DHCP] section I've added a FallbackTimeout option that allows you
to set how many seconds DHCP should try before failing and falling back to
some other addressing mechanism. I gave it a generic name to support other
addressing schemes like static or future things yet to be invented. Only
Link Local Addressing is currently supported. If no fallback mechanism is
active, the timeout will be ignored. The default value is 15 seconds. If
seconds are not granular enough, I could make this milliseconds... I'm open
to persuasion on that.

Basically at this point I'm just waiting on feedback from management/legal
to officially approve release of the code, so now would be a good time for
any of you to ask questions or suggest changes before I actually generate
the pull request.

Thad


On Tue, Jul 17, 2018 at 10:53 AM, Thad Phetteplace <tdphette at gmail.com>
wrote:

> I'm currently working with a client that needs LinkLocalAddressing as a
> fallback when DHCP resolution fails. Currently with systemd-networkd it
> looks like you have both DHCP and LinkLocalAddressing on, but that means
> you get a second 169.254.*.* address even when DHCP succeeds. We
> investigated using avahi-autoipd, but it currently appears to work only
> with dhclient, and we prefer to stick with networkd. Rather than add
> networkd support to avahi, I think adding a LinkLocalAddressing 'failover'
> option to networkd makes more sense.
>
> My questions for my fellow developers are:
>
> 1) Am I missing some obvious solution that does not require writing new
> code?
> 2) Would the systemd-devel community be open to this feature if I / my
> client contributed it?
> 3) What should the syntax in the config file look like? I was thinking
> something like this:
>
> LinkLocalAddressing=fallback
>
> Or if you wanted it only for a specific protocol, use 'ipv4fallback' or
> ipv6fallback'. The other option would be to include an additional flag like
> 'LinkLocalAddressingFallback='. I'm open to whatever the community would
> accept.
>
> I appreciate your thoughts on this.
>
> Thanks,
>
> Thad Phetteplace
> GLACI, Inc.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180731/bbf47800/attachment.html>


More information about the systemd-devel mailing list