[Arm-dev] systemd-networkd and DHCP v6

Tue Jul 11 10:30:08 UTC 2017
Robert Moskowitz <rgm at htt-consult.com>


On 07/11/2017 12:52 AM, Ian Pilcher wrote:
> Is anyone using the $SUBJECT combination?
>
> I have a CentOS 7 (userland)/Banana Pi firewall, and I've been having an
> issue where dhclient fails to renew my IPv6 address.  The root cause
> seems to be that the initial lease is obtained before the B'Pi syncs its
> system time, and ISC dhclient is unable to deal with large wall clock
> changes:
>
>   https://bugzilla.redhat.com/show_bug.cgi?id=1093803

See: http://www.htt-consult.com/Centos7-armv7.html#Chrony%20caveats

for how to get services to wait until chrony is ready, and in your case 
to get the time syncing against driftfile before getting an address.

You have a real race condition here.  You need an address to get to an 
NTP source, but you need accurate time before running dhcp!

So you force dhcp to wait until there is time, and since there is no 
address, it will use the driftfile time, then let dhcp run then get the 
proper time.

I think that would work, check it out on the chrony list to be sure.

Bob

>
> (I haven't seen this problem with IPv4.  It seems like there's some sort
> of workaround for this issue in the IPv4 case somewhere in the network
> scripts, chrony, or dhclient itself.)
>
> I just tried using systemd-networkd, instead of the legacy network
> service, but it appears that systemd-networkd-219-30.el7.9.armv7hl will
> never send a "dhcp6 solicit" packet, even when "DHCP=yes" (or
> "DHCP=ipv6") is set in the relevant .network file.
>
> I've verified with tcpdump that a RHEL 7 x86_64 VM *does* send a dhcp6
> solicit, but there is absolutely no IPv6 UDP traffic coming from the
> Banana Pi.
>
> I'm back to the legacy network service for now, with a workaround to
> forcibly renew the IPv6 lease once chrony has synced the time. This is
> my home firewall, so opportunity for messing around with the network
> configuration is limited.
>
> I am wondering, though, if anyone at all is using systemd-networkd with
> DHCPv6 on CentOS 7 ARM?
>