I had no success applying the many other good solutions to my setup which involves having a macvlan interface on top of
Install based on
What works well for me:
systemctl disable dhcpcd
Reduce timeout in
# Do not hold boot for default 60 seconds, give up faster
# but not too fast, see what work with your DHCP server
# Retry faster
# This is after initial give up and dhclient went to background and boot proceeded without a lease
# Default 5 minutes is too long
# Consider backoff-cutoff setting as well
So now that waits at boot for up to 10 seconds, and if there is no DHCP lease the
dhclient goes into background and boot continues without a lease.
dhcpcd I have the added benefit of being manually stop/start/restart
wlan0 without having to hunt down
wpa_supplicant started presumably by
dhcpcd and which was refusing to stop with
Note: this might mean you might not be able to use
rapsi-config to configure your wifi, and need to write config into
/etc/network/interfaces, which is preferred for me anyway.
The otherwise neat solution by Evgeniy Chukanov using
/etc/systemd/system/networking.service.d/reduce-timeout.conf to reduce timeout causes
dhcpcd to NOT bring up my macvlan interface IF lease timeout on
eth0 at boot gets reached.
Not that my macvlan config matters for OP, but it was the reason to come up with this solutions, so for completeness:
iface macvlan1 inet static
pre-up ip link add macvlan1 link eth0 type macvlan
post-down ip link del macvlan1
I have since swapped
mavclan1, and I do static IPv4 on
eth0 and DHCP client on
macvlan1, which gets me further even using
dhcpcd, interface gets created, but still does not re-try to obtain lease after initial timeout.
I have not bothered to investigate further because my solution without
dhcpcd works very well for me.