PDA

View Full Version : IP conflict when using DHCP




woodlandtrek
Mar 8, 2010, 02:40 PM
I have an iMac that keeps displaying the message "Another device on the network is using your computer's IP address". Here's how the problem started:

"IMac A" was set up with a static IP address of 10.10.10.10 but was having hardware/software issues (kernel panics, freezing, etc). I copied all the user files to a new iMac and then set up the new iMac (iMac B) with a static mapped IP address of 10.10.10.10 from snow leopard server using DHCP. I removed iMac A from the network to do some troubleshooting and try to figure out what was wrong with it. Then I formatted the hard drive, reinstalled snow leopard, and plugged it back into the network.

With the network configuration set to "Using DHCP", it keeps trying to get the 10.10.10.10 address again, which of course conflicts with iMac B. In DHCP Server Admin, there are no leases listed for iMac A. If I add a static DHCP mapping for a different address, everything is okay, but as soon as I remove the static mapping it tries to go back to the 10.10.10.10 address!

Any help would be appreciated.



belvdr
Mar 8, 2010, 03:40 PM
It seems the issue is with the DHCP server.

Some DHCP servers will test to see if the IP is taken by pinging it first. You can try and see if this is an option, or alternatively, clear the DHCP cache on the server. A reboot of the DHCP server may clear it.

yg17
Mar 8, 2010, 03:48 PM
Reboot the router (or whatever you're using as a DHCP server) to clear out its IP allocation tables. There's something in memory telling it that iMac A has that address and it's trying to assign it without checking to make sure its taken. A reboot should take care of that.

Chris.L
Mar 9, 2010, 04:02 PM
Did you restore iMac A from a backup?

If you do an ifconfig in Terminal does it show that static address?

What does Network Preferences say for that connection?

woodlandtrek
Mar 10, 2010, 11:43 AM
Thanks for the input. I'll try a reboot of the server next time I get a chance. It's used for a bunch of other things in the organization as well, so a reboot is never convenient or I probably would have tried that earlier. I've restarted the DHCP service several times, but not the whole server.

Just curious, do any of you know of any way to view the server's IP allocation tables through terminal?

@Chris.L - iMac A is set up with a fresh install of 10.6. Nothing was migrated or added after the install. If I remove the static mapping for this iMac, neither ifconfig nor Network preferences will list an IP address, though after about 10 seconds of renewing the DHCP lease the error I mentioned below pops up.

belvdr
Mar 10, 2010, 12:06 PM
On dhcpd, there's a file called dhcpd.leases (http://www.daemon-systems.org/man/dhcpd.leases.5.html)

I am not aware of its location on OS X.

springerj
Mar 12, 2010, 05:16 AM
Obviously something is being cached, and it may well be in the dhcp server. When you have a mix of fixed and dhcp ip addresses, they should be separated into two ranges. In the dhcp server you should be able to specify the starting and ending address. I generally pick from .100 to .199. That leaves addresses below 100 and above 200 for fixed things. I usually put the gateway and router kinds of stuff at .1, .2, etc, and printers and stuff in the 200s. But the main thing is to separate the fixed and dynamic ip ranges.

DoFoT9
Mar 12, 2010, 05:29 AM
yea check the logs. you would assume that the DHCP table would be updated! but clearly not in this case. maybe refresh that somehow.

why dont you manually change address for the mean time?

woodlandtrek
Mar 15, 2010, 11:33 AM
Okay, so I restarted the server this weekend, and I'm still having the same problem. That really doesn't make sense, because both possible points of failure have been reset/restarted.

@springerj - the DHCP server is set to only hand out addresses in the .100 - .254 range. The .1 - .100 range is used for servers, printers, etc.

I have the DHCP logging level set to high, but this is all I'm getting (MAC addresses removed):

Mar 15 12:09:41 miniserver bootpd[38999]: DHCP DISCOVER [en0]: 1,0:XX:XX:XX:XX:XX <imac-A>
Mar 15 12:09:41 miniserver bootpd[38999]: replying to 10.10.10.10
Mar 15 12:09:41 miniserver bootpd[38999]: OFFER sent iMac-B$ 10.10.10.10 pktsize 310
Mar 15 12:09:41 miniserver bootpd[38999]: service time 0.003063 seconds
Mar 15 12:09:42 miniserver bootpd[38999]: DHCP REQUEST [en0]: 1,0:XX:XX:XX:XX:XX <imac-A>
Mar 15 12:09:42 miniserver bootpd[38999]: replying to 10.10.10.10
Mar 15 12:09:42 miniserver bootpd[38999]: ACK sent iMac-B$ 10.10.10.10 pktsize 310
Mar 15 12:09:42 miniserver bootpd[38999]: service time 0.000824 seconds
Mar 15 12:09:43 miniserver bootpd[38999]: DHCP DECLINE [en0]: 1,0:XX:XX:XX:XX:XX
Mar 15 12:09:43 miniserver bootpd[38999]: service time 0.000398 seconds