"Tamas Somogyi" <[email protected]> writes: > My device uses dhcp+autoip option, and I noticed that finding a suitable > IP in a network where no DHCP server present takes more than one minute, > mainly because lwip spends 57 secs with retrying dhcp requests > (dhcp.c).
Tamas, I have recently submitted two patches that deal with this and other issues with DHCP/AutoIP. http://savannah.nongnu.org/patch/?6721 http://savannah.nongnu.org/patch/?6725 The patches have not been accepted into CVS yet. Perhaps you could apply them to your own code base, and see if they solve your problem? Your feedback will be appreciated. > The question is that this 57 secs or number of retries is required by > some specification (RFC=?) -or- merely arbitrary numbers? I think it is somewhat arbitrary. The RFCs do not talk much about DHCP/AutoIP cooperation. RFC 3927 says that AutoIP must not in any way change to operation of the DHCP client. This means that the DCHP client will keep looking for a DHCP server. When it finds one, the DHCP address will override the AutoIP address. This can be a problem when getting an AutoIP address quickly after reboot. If the DCHP server is a bit sluggish you will first get an AutoIP address, and then a real DHCP address a few seconds later. There is nothing wrong with that, but your software must be able to handle it. All your TCP connections are closed when the IP address is changed. Regards, /stoklund _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
