[systemd-devel] Bouncing interface once chrony is synced

Lennart Poettering lennart at poettering.net
Mon Jul 10 08:43:37 UTC 2017


On Wed, 05.07.17 10:29, Ian Pilcher (arequipeno at gmail.com) wrote:

> I am using CentOS 7 (systemd 219) on a Banana Pi as my residential
> firewall/gateway.  The Banana Pi does not have a persistent clock, so
> it has no idea what the time is until it is able to sync via NTP.  Thus,
> the initial DHCP leases that the BPi receives have incorrect expiration/
> renewal times (since the system can't sync via NTP before it has an IP
> address - chicken and egg).

DHCP only sends times as relative times, precisely to not require
synchronized clocks.

See RFC2131, section 3.3:

    "As clients and servers may not have synchronized clocks, times
    are represented in DHCP messages as relative times, to be
    interpreted with respect to the client's local clock.
    Representing relative times in units of seconds in an unsigned 32
    bit word gives a range of relative times from 0 to approximately
    100 years, which is sufficient for the relative times to be
    measured using DHCP."

If your DHCP client implementation gets confused by the wallclock not
being steady then this appears to be a bug in the
implementation. Given that there are so many DHCP clients to choose
from, maybe use a different one?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list