dhcpcd icon indicating copy to clipboard operation
dhcpcd copied to clipboard

cannot extend the waiting time for a lease offer

Open garrik opened this issue 7 months ago • 8 comments

I am troubleshooting an issue where sometimes the DHCP server does not respond with a lease offer within 5 seconds, so dhcpcd selects the fallback profile. I am trying to increase the waiting time, so I set timeout in the dhcpcd.conf or via command line dhcpcd -B -d -w -4 -t 0 enp10s0 but it does not work. Am I doing something wrong?

Here is the dhcpcd.conf

timeout 0

profile static_enp10s0
static ip_address=192.168.157.2
static routers=192.168.157.1
static domain_name_servers=192.168.157.1

interface enp10s0
fallback static_enp10s0

and the log

May 27 14:05:28 [497]: dhcpcd-9.5.2 starting
May 27 14:05:28 [497]: spawned privileged proxy on PID 498
May 27 14:05:28 [497]: spawned controller proxy on PID 499
May 27 14:05:28 [497]: DUID 00:04:00:00:00:00:00:00:00:00:00:00:cc:82:7f:27:cd:e6
May 27 14:05:28 [497]: enp10s0: executing: /usr/libexec/dhcpcd-run-hooks PREINIT
May 27 14:05:28 [497]: enp10s0: executing: /usr/libexec/dhcpcd-run-hooks NOCARRIER
May 27 14:05:28 [497]: enp10s0: waiting for carrier
May 27 14:05:31 [497]: enp10s0: carrier acquired
May 27 14:05:31 [497]: enp10s0: executing: /usr/libexec/dhcpcd-run-hooks CARRIER
May 27 14:05:31 [497]: enp10s0: delaying IPv4 for 0.8 seconds
May 27 14:05:32 [497]: enp10s0: using hwaddr cc:82:7f:27:cd:e7
May 27 14:05:32 [497]: enp10s0: reading lease: /var/lib/dhcpcd/enp10s0.lease
May 27 14:05:32 [497]: enp10s0: soliciting a DHCP lease
May 27 14:05:32 [497]: enp10s0: sending DISCOVER (xid 0x2ebb22dd), next in 4.2 seconds
May 27 14:05:32 [498]: enp10s0: spawned BPF BOOTP on PID 512
May 27 14:05:36 [497]: enp10s0: sending DISCOVER (xid 0x2ebb22dd), next in 8.1 seconds
May 27 14:05:37 [497]: enp10s0: selected profile static_enp10s0
May 27 14:05:37 [497]: enp10s0: using hwaddr cc:82:7f:27:cd:e7
May 27 14:05:37 [497]: enp10s0: probing address 192.168.157.10/24
May 27 14:05:37 [497]: enp10s0: probing for 192.168.157.10
May 27 14:05:37 [497]: enp10s0: ARP probing 192.168.157.10 (1 of 3), next in 2.0 seconds
May 27 14:05:37 [498]: enp10s0: spawned BPF ARP on PID 513
May 27 14:05:39 [497]: enp10s0: ARP probing 192.168.157.10 (2 of 3), next in 1.3 seconds
May 27 14:05:40 [497]: enp10s0: ARP probing 192.168.157.10 (3 of 3), next in 2.0 seconds
May 27 14:05:42 [497]: enp10s0: DAD completed for 192.168.157.10
May 27 14:05:42 [497]: enp10s0: using static address 192.168.157.10/24
May 27 14:05:42 [497]: enp10s0: adding IP address 192.168.157.10/24 broadcast 192.168.157.255
May 27 14:05:42 [497]: enp10s0: adding route to 192.168.157.0/24
May 27 14:05:42 [497]: enp10s0: adding default route via 192.168.157.1
May 27 14:05:42 [497]: enp10s0: ARP announcing 192.168.157.10 (1 of 2), next in 2.0 seconds
May 27 14:05:42 [497]: enp10s0: executing: /usr/libexec/dhcpcd-run-hooks STATIC
May 27 14:05:44 [497]: enp10s0: ARP announcing 192.168.157.10 (2 of 2)
May 27 14:05:58 [497]: received SIGINT, stopping
May 27 14:05:58 [497]: enp10s0: removing interface
May 27 14:05:58 [497]: enp10s0: deleting IP address 192.168.157.10/24
May 27 14:05:58 [497]: enp10s0: deleting route to 192.168.157.0/24
May 27 14:05:58 [497]: enp10s0: deleting default route via 192.168.157.1
May 27 14:05:58 [497]: enp10s0: executing: /usr/libexec/dhcpcd-run-hooks STOP
May 27 14:05:58 [497]: enp10s0: executing: /usr/libexec/dhcpcd-run-hooks STOPPED

garrik avatar May 27 '25 16:05 garrik

fallback_time seconds Start fallback after seconds. The default is 5 seconds.

perkelix avatar May 27 '25 16:05 perkelix

Thank you for the timely response. However, I’m getting an error: unknown option: fallback_time. I’m currently using version 9.5.2.

garrik avatar May 28 '25 15:05 garrik

Correct. The option was added sometimes during branch 10.

perkelix avatar May 28 '25 15:05 perkelix

@garrik Does the above issue still affect you using newer dhcpcd releases?

perkelix avatar Nov 16 '25 11:11 perkelix