Windows claiming the IP address is in use – ARGH!
I've bought myself a new ADSL2+ modem this week, a Netgear DM111P, because my existing ZyXEL R-660R-61, which I've got from my internet provider, had some sort of bug - It denied the connection to certain IP addresses after a while, and sent back "Source Quench" ICMP packets when trying to contact the addresses. The only way I could get contact to the IP addresses again was to restart the router. Doing this at least once every day becomes bothersome so I wanted to find a solution.
I had already disabled the router function in the existing ZyXEL device, since I'm using my own computer running IPCop for that, so I set out to find a device only containing the modem function, and the choice fell on the Netgear DM111P.
When setting up the new modem I couldn't find any manual for it at first on the supplied CD, and since I had connected it directly to my Kubuntu laptop, I didn't have a chance to set up the modem with the Windows software. From Linux I guessed which IP address the modem had and found the web interface port with a port scan, but didn't have the username and password to log into it. So I had to connect the modem to my Windows workstation instead.
After I ran through the setup guide, which had a lot of "sleeps" in it taking somewhere between 15-30 minutes I was connected to the Internet, but that was only from my workstation, I needed to get it connected to my IPCop box. It went pretty smooth, but after the modem was connected to my gateway, I received an error on my Windows workstation that the IP address was already in use, after the machine got rebooted. Since I only have three devices on my LAN, I knew that was not the case, but I tried to assign another IP address to the computer, which was within the same range. The same error came and the machine didn't get connected to my LAN. If I tried an IP address outside the LAN range it worked fine, but then I wouldn't have any connection to my network. I even tried with another network card, and that worked fine until the computer was rebooted again - The same error occurred.
I thought it might was the Netgear software that I used when initially setting up the modem which had made some changes on my computer which caused this problems, so I cleaned up my computer and did a re-installation of Windows. After the system was booted up, network drivers was installed and the IP address was set up, the same error came once again.
Eager to find out what caused this, I set up Wireshark on the computer and captured packets when I set the IP address. Every time I've changed the IP address of the computer, an ARP broadcast was sent out on the network, in order to find out if the IP address was already taken, and every time the same MAC address answered back that I was using that. The MAC address was the one of my Netgear modem!
I tried to pull out the network cable from the modem while setting the IP address on my computer, and then there weren't any problem, even after the modem was connected again. But after a reboot of the Windows computer the same error box popped up again.
I've found some information about this ARP package Windows sends out on Microsofts homepage, and it was called a "Gratuitous ARP Function". However, the information I found on it was only regarding Windows NT 4.0 and Windows 2000, the registry string the above document referred to was not found in the registry. I tried to add this key manually since it couldn't do any harm, and the error did not occur after a reboot. The problem was solved!
Just for quick info, the following registry key needs to be added in order to resolve this problem:
\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TcpIp\Parameters\ArpRetryCount, it should be added as a DWORD string with the value "0".
I hope this helps out others which may encounter the same problem.
Comments
Leave a Reply

Google Buzz
Launchpad