[En-Nut-Discussion] DCHP timeout/set IP address by ARP/PING command

Christian.Schilmoeller at camco.de Christian.Schilmoeller at camco.de
Wed Nov 16 17:19:35 CET 2005


Hello NutOS experts,

I'd like to configure my ethernut application by DHCP server like it is 
done in many of the example applications. I did this with 
NutDhcpIfConfig("eth0", 0, 10000), because I thought 10 seconds should be 
enough for the simple process of obtaining an IP address.
This always worked in our company network (Linux server). But now I tested 
a configuration with a Netgear WLAN router and the 10 seconds seem to be 
to short!
Dedicated Windows DHCP server applications sometimes run into trouble, 
too. Is this behaviour normal or have I done something wrong? I saw that 
the timeout value in the Ethernut examples is 60 seconds - one minute 
seems to be quite long, though!

Another question: In the hardware manual of my ethernut board is explained 
how the board can be configured without a DHCP server and without a saved 
IP configuration in the EEPROM. It is basically a manual ARP entry (with 
known MAC address and desired IP address) followed by a PING request to 
that desired IP address. Is this method outdated or should it still work? 
I remember that old ethernut applications used NutNetAutoConfig(). Did 
that function refer to the ARP/PING method?

Provided that the ARP/PING method is deprecated (I tried it without 
success in NutOS 3.9.8), how can be made sure that the ethernut board is 
accessible under the following circumstances:
No DHCP server present in the network (e. g. ethernut directly connected 
to PC via crossover cable).
Valid IP address stored in ethernut eeprom, but does not match current 
network settings (e. g. 192.168.1.X vs. 192.168.40.X / netmask 
255.255.255.0).
No default IP address present in firmware and firmware not changeable by 
customer.

Provided that the board isn't accessible under these conditions, I'm 
thinking about adding an application similar to the "NutDiscover" utility 
which is based on broadcast addresses, not on IP addresses. Would that be 
an appropriate path to go?

Regards,

Christian





More information about the En-Nut-Discussion mailing list