Re: Can dhcpcd run DISCOVER immeditaly instead of requesting the current IP
Roy Marples
Thu Apr 04 21:20:18 2013
Hi Kobi
On 04/04/2013 21:42, Kobi Cohen-Arazi wrote:
Question - I have a scenario, where I would like to request a new IP
(but not to renew it).
In this scenario, I stop dhcpcd before running a new DHCP request.
The platform is Android (recent JB) and from what I see, dhcpcd take
the current IP (not sure where does it take it from, maybe from
dhcp.wlan0.ipaddress system property ?) and use this IP in the
request
packet.
In this specific scenario, the target DHCPD server is not the same
one giving this IP to the client so it remains silent. (this is by
the
spec IMO).
client backs off for 10 second and start again with DISCOVER. From
this point everything goes as it should be.
Is there a way to tell dhcpcd to start with DISCOVER instead of
attempting to (re)use the previous IP?
Any pointers for this? I can add an option for that and stick it in
if-options.c:parse_option to make it configurable.
You could add the release keyword to dhcpcd.conf(5) or stop dhcpcd
using the -k option or sending it SIGHUP.
This causes dhcpcd to release any lease and discard the current saved
lease if any so that a dhcpcd restart starts up fresh as you want.
Does this help?
Thanks
Roy
Archive administrator: postmaster@marples.name