<div dir="ltr"><p>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:</p>
<p>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.</p>
<p>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.</p><p>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.</p><p>Thad<br></p><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 17, 2018 at 10:53 AM, Thad Phetteplace <span dir="ltr"><<a href="mailto:tdphette@gmail.com" target="_blank">tdphette@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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.</div><div><br></div><div>My questions for my fellow developers are:</div><div><br></div><div>1) Am I missing some obvious solution that does not require writing new code?</div><div>2) Would the systemd-devel community be open to this feature if I / my client contributed it?</div><div>3) What should the syntax in the config file look like? I was thinking something like this:</div><div><br></div><div>LinkLocalAddressing=fallback</div><div><br></div><div>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='<wbr>. I'm open to whatever the community would accept.</div><div><br></div><div>I appreciate your thoughts on this.</div><div><br></div><div>Thanks,</div><div><br></div><div>Thad Phetteplace</div><div>GLACI, Inc.</div><div><br></div></div>
</blockquote></div><br></div>