Skip to content
Advertisement

dhclient not sending DHCPDISCOVER after $reason report TIMEOUT and valid lease are unreachable

I am using ISC dhclient 4.3.1 on my debian 8.3 Linux. When the $reason reported by dhclient is TIMEOUT due to valid lease from leases file cannot be reached, the dhclient-script exits with status 2. The dhclient is not sending DHCPDISCOVER msgs after this. However, when the $reason reported by dhclient is FAILED due to no valid lease available, the dhclient keeps sending DHCPDISCOVER msgs periodically. Note that the timeout and retry values in dhclient.conf are 8 second and 1 second respectively.

There can be a scenario where the DHCP server is unreachable now, because its down or something, but can be available later. In such a case with valid lease in leases file if $reason is TIMEOUT, the dhclient is not sending DHCPDISCOVER periodically.

I am using ifup/ifdown scripts to manage the network connectivity.

Advertisement

Answer

Found the issue myself. It was due to dhclient-script wrongly interpreting the exit status, due to which the exit status always turned out to be 0 and hence “if (!script_go (client))” in state_panic function always turned out to be true, there by putting the dhclient in BOUND state and not starting a timer to send the DHCPDISCOVER.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement