[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] DHCP: IF not connected on power up
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] DHCP: IF not connected on power up |
Date: |
Tue, 08 Jun 2010 12:48:19 +0200 |
"Bernhard \'Gustl\' Bauer" wrote:
> I set it up as described in dhcp.c and most time it works fine. But some
> times it doesn't start a dhcp discover - I checked with wireshark.
>
> Maybe I'm not patient enough. What is the longest time from plugging the
> cable to getting an IP?
Was that really what you wanted to do? DHCP increases its retry timeout for
every retry, so when you just start DHCP and plug the cable after some minutes,
the retry timeout will already be quite high and thus it might take a long time
until DHCP retries to find a server.
Instead, you should monitor your PHY and when it detects a link, call
dhcp_start (or dhcp_reboot?). This ensures that the time from plugging the
cable to getting an IP address is (nearly) constant.
Simon
--
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl