I have a large batch of TCP/IP devices that I want to configure all identically. They all have identical IP address by default.
I connect a device directly to a PC, upload a configuration file to the device through it's built-in web interface, and disconnect the device.
My problem is that when I connect another device to the PC, I can't ping it or access it through a web browser. I need to change its IP address using a utility that allows me to do this. Then I can access it with a web browser and upload the config file. What I have found is that if I use a rotating range of IP address, say .121 through .128, I can go back and re-use the same addresses. I just can't use the same address too soon or it won't work.
Emptying the cache doesn't solve this. In fact, If I use the same address with a second device, I can't connect with another browser. In fact, I can't even ping it. Just waiting for some unknown amount of time fixes the issue, but then I have to wait again if I connect another device.
My question is, how can I get this to work so I can simply connect a device, upload the config file, disconnect the device, and connect the next device, without having to change its IP address?
fundedAnswer Doug Brouwer's question
People succeed in answering Doug Brouwer's questions 0% of the time (0 success in 4 attempts).
Answers by: bryanf | rodmar | tb714usr | awt
You need to understand a bit more about how IP networks work to see why this is happening.
The quick explanation is that on a local network communication happens between MAC addresses (sometimes called Physical addresses), which are hard-coded on every network card. The IP address is only used initially, to figure out which MAC address is associated with which IP address using Address Resolution Protocol (ARP). Then that IP to MAC association is added to an ARP cache, and not looked up again until the cache expires (up to 10 minutes on WinXP).
You can list the ARP cache on your machine from the command line using 'arp -a', and remove an IP / MAC association from the ARP cache using 'arp -d [IP]'.
So your process could be:
- plug in device
- upload config
- disconnect device
- run 'arp -d [IP of device]' from the command line
- optionally, 'arp -a' to confirm the IP/MAC has been removed
- plug in next device, etc
If you want a more detailed explanation of how IP and ARP work, including diagrams, you can check out this MS TechNet document:
http://technet.microsoft.com/en-us/library/bb726993(TechNet.10).aspx#EIAA
Thanks,
Bryan