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

Christian.Schilmoeller at camco.de Christian.Schilmoeller at camco.de
Thu Nov 17 15:58:33 CET 2005


Hi Michel,
> 
> We've been using 20 seconds for a long, long time now in all sorts of
> environments and it seems to be long enough.
 
OK, thanks for the advice, I'll take also 20 seconds then as a good, 
approved compromise.

> Set the confnet members to the values you need and use them as follows 
if
> you want to use static IP:
>         if (NutNetIfConfig(szIfName, confnet.cdn_mac, 
confnet.cdn_cip_addr,

I know from the documentation that I can use this function for a manual, 
fixed setup.
But from my (possibly outdated?) hardware manual it seems that there is 
another way of setting the IP address externally from the network (not 
within firmware).
On page 4-1 of enhwm15.pdf is said:

ARP Method
If the Ethernut's EEPROM contains no configuration data and no DHCP
server is available on the network, then the ARP method can be used to
set the board's IP address. In this mode the Ethernut board set its 
address
from the first ICMP packet it receives.
To set the Ethernut's IP address by the ARP method, an ARP entry can be
manually created on the PC and then a ping packet is sent from the PC to
the Ethernut board.
Enter the following command to manually create an ARP entry for an
Ethernut board with a MAC address of 00:06:98:00:00:00 and an IP
address of 192.168.171.5 on a LINUX command line shell:
arp -s 192.168.171.5 00:06:98:00:00:00
On a Windows DOS prompt this command is slightly different:
arp -s 192.168.171.5 00-06-98-00-00-00
The next command to enter is the same on both systems:
ping 192.168.171.5
The first ping packet that arrives at the Ethernut board with the MAC
address of 00:06:98:00:00:00 sets the IP address of that board to
192.168.171.5. Note, that the ARP method will not configure a default
gateway and will fix the network mask to 255.255.255.0.

My question is, is this method still valid for current releases of NutOS?

At the moment, my task is to refurbish and extend an older application 
which is based on NutOS 3.3.2. There, the (now outdated) function 
NutNetAutoConfig() is used. My suspicion is that the ARP setup 
functionality (as described above) is done inside this function.

I need to keep at least some "downwards compatibility" between the old and 
new application concerning general setup. So any comments about (past or 
present) IP address setup possibilities are appreciated!

Regards,

Christian





More information about the En-Nut-Discussion mailing list