What do you mean DHCP Server? There is no DHCP server running on your lwip machine; you probably refer to a Web Server running on your unit?
When your DHCP query fails, Auto IP is applied but DHCP is periodically reinvoked, so as soon as the DHCP server is available, your unit will obtain a proper IP address valid in your net. I suspect that you run into a very typical trap: You try to access a Web (or other application) server that is a moving target due to being a DHCP client and you don't like it when the address changes because then your previous address isn't valid anymore. The simple answer is: Don't. Do NOT assume that a dynmaic address is a valid target for a communication. It's only going to cause you headaches. There is no easy solution out; you will need some kind of high level protocol such as DynDNS or SIP to map changing addresses to abstract addresses such as DNS addresses. Even then, it's not guaranteed to work properly. These things are extremly tricky. Your safest bet is to require that your unit runs in an environment where the DHCP server guarantees a constant DHCP address for your MAC address. And no, don't call dhcp_close. If you wish to force dhcp renegotiation, use setiflinkup() (or something along those lines; I don't have the code in front of me right now). That'll reinvoke dhcp. But normally all of that works automatic. -- View this message in context: http://lwip.100.n7.nabble.com/auto-ip-is-a-valid-address-tp21018p21021.html Sent from the lwip-users mailing list archive at Nabble.com. _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
