How can I reduce time taken to switch from DHCP to Link-local address & vice versa
Jyothsna Rajan
Fri Feb 14 07:05:17 2014
I use dhcpcd_5.2.12 on my devices , running linux, to obtain DHCP IP. I have been testing the switch-over from DHCP to link local on loss of network connectivity and vice-versa when connectivity is restored. I found that it takes >8mins for the address to change from DHCP to link local and 2-3 mins to change from link-local to DHCP.
I am using the dhcpcd.conf(5) file as available with the source.
I invoke the client with following command:
dhcpcd -q --reboot 0 --hostname \"\" -t 16 <ifname>
DHCP server is authoritative and lease-time is set to 600.
I have the following questions:
1. Once a valid DHCP address has been obtained, does the client take-no-action-but-wait until the lease renewal time has expired ?
2. What IP will the device have if someone disconnects the device in the interval after a DHCP address has been obtained but before its time to renew the lease? Will the device retain its DHCP IP until it is time to renew at which time dhcpcd "wakes up" and detects there is no connection and obtains a link local address?
3. How can I force dhcpcd to monitor connection status and switch to link-local soon as a loss of connection is detected? Can I use the "NOCARRIER" reason to detect connection status and invoke a hook script to force change to link-local address?
4. Similarly, for the case where a device having link-local address is connected back into a network, is there any configuration parameter that I can tweak to reduce the time taken to switch back to DHCP address?
5. Will reducing the DHCP lease time setting help? If so, what is the minimum value I can set without jeopardizing any other functionality? I haven't been able to try this because the server is company wide and i cannot reboot it on a working day.
Thank you for your suggestions & time.
JR
Archive administrator: postmaster@marples.name