Re: Can dhcpcd run DISCOVER immeditaly instead of requesting the current IP
Kobi Cohen-Arazi
Fri Apr 05 17:01:22 2013
On Fri, Apr 5, 2013 at 7:52 AM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> On 04/04/2013 23:49, Kobi Cohen-Arazi wrote:
>
>> http://manpages.ubuntu.com/**manpages/intrepid/man5/dhcpd.**conf.5.html<http://manpages.ubuntu.com/manpages/intrepid/man5/dhcpd.conf.5.html>[3]
>>
>>
>> Here is the confusing part:
>>
>> If the server knows nothing
>> about the address, it will remain silent, unless the address is
>> incorrect for the network segment to which the client has been attached
>> and the server is authoritative for that network segment, in which case
>> the server will send a DHCPNAK even though it doesn’t know about the
>> address.
>>
>> In other words, my client had 192.168.1.10 from network A and I moved
>> to network B which happen to have the same IP network config and
>> client issue a DHCP request, DHCP server (which knows nothing about
>> the client having this IP) will remain silent even if it is
>> authoritative.
>>
>> In another words - server knows nothing about the address, BUT the
>> address *is* correct for the network segment, so it will keep silent.
>> If server knows nothing about the address AND the address is
>> incorrect for this network subnet (e.g. 10.10.1.10) AND server is
>> autoritative, then server replies with NAK.
>>
>> I might be wrong here, but this is how I understand the above.
>>
>
> Interesting.
>
> Well, the default timeout is just 5 seconds and if that's too long you can
> always add this to dhcpcd.conf
> reboot 0
>
> Which causes the INIT-REBOOT phase to be skipped entirely without
> releasing the lease.
>
Yeah. I think I tried it just for see how it works but I can't remember
what was the end result.
Anyway - I don't want it to have this behavior always, but just in a
specific scenario.
This is why -k might work just fine for me. (I still need to try it out).
> As it's quite rare IMO that Android based platforms (or any mobile
> platform for that matter) to gracefully shutdown, it's actually very
> unlikely a release would ever occur even if configured.
>
True. But my case is different. There is no shutdown but moving across
networks w/o shutdown.
> This has the added benefit that if you stay on the same network, you
> should get the same address back from the server.
>
True. And I will keep this as is. It is just a very specific scenario where
I want it to release the lease and start DISCOVER in a new network w/o
remembering the old/prev IP
Thanks,
Kobi
Archive administrator: postmaster@marples.name