From: Yu Watanabe Date: Sat, 26 Apr 2025 07:19:33 +0000 (+0900) Subject: networkd: reduce the default IPv4 DAD (ACD) timeout and make it configurable (#37138) X-Git-Tag: v258-rc1~735 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b09f351bd7c2bc14377e048f3404bfe00a4f6ef1;p=thirdparty%2Fsystemd.git networkd: reduce the default IPv4 DAD (ACD) timeout and make it configurable (#37138) RFC 5227 specifies randomized intervals to avoid that a large number of hosts powered up at the same time send their message simultaneously. Performing the conflict detection takes a variable time between 4 and 7 seconds from the beginning to the first announcement, as shown by the following diagram where P indicates a probe and A an announcement: ``` time(s) 0 1 2 3 4 5 6 7 8 9 +---+---+---+---+---+---+---+---+---+ SHORTEST P P P A A LONGEST P P P A A ``` The host can't use the address until the first announcement is sent. 7 seconds is a very long time on modern computers especially considering the fact that the round-trip time on current LAN technologies is at most few milliseconds. Section 2.2 of the RFC addresses this matter and hints that a future standard will adjust those timeouts; however that standard doesn't exist yet. Make the timeout configurable via a new "IPv4DuplicateAddressDetectionTimeoutSec=" option. The intervals defined in the RFC are then scaled proportionally so that the duration of the conflict detection takes at most the given value. Interval happening after the first announcement are not scaled, as recommended by the RFC. Also reduce the default value from 7s to 200ms, which is a more suitable value for today's technology. --- b09f351bd7c2bc14377e048f3404bfe00a4f6ef1