udhcpd initial lease

Grahame Jordan gbj at theforce.com.au
Fri Nov 26 21:48:09 UTC 2010


On 11/27/2010 08:39 AM, Dan Fandrich wrote:
> On Sat, Nov 27, 2010 at 07:48:44AM +1100, Grahame Jordan wrote:
>> When using dhcpd on an embedded system after booting on some clients
>> for example Windows7 it takes a long time
>> to negotiate an ip address. In the case of Win7 it is insistent on
>> using the previous IP address that it had at its previous
>> connection to the device.
>>
>> The problem is that on most embedded systems the leases file is empty
>> after every boot. Making the negotiation
>> difficult as there is no previous record in the leases file to
>> negotiate with. The lease request needs to time out before
>> a new lease can be requested resulting in long delays on getting an
>> IP Address.
>> Additionally some embedded systems generate a random MAC address
>> every time they connect say over USB making the
>> negotiation just as difficult as with an empty leases file.
>>
>> I have created a patch that allows a request to go through if the
>> leases file is empty. This results in very quick dhcp
>> negotiating. To alleviate the random MAC address issue I empty the
>> leases file which results in quick dhcp negotiation also.
> Why should only the first client get this special privilege?  If any
> client supplies an address and it's one that the server might randomly
> allocate him already, why not let it go through?
>
In this case only one client ever connects to the USB port.
Otherwise what else can you do?  Maybe accept the requested lease if it 
is not already taken?

Grahame
>>>> Dan
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>



More information about the busybox mailing list