Windows 7 DHCP annoyances

These days sensible DHCP daemons can be configured to assign a single IP to multiple MAC addresses. Probably the most common use case is a laptop that is connected to your LAN through wireless or wired for that gigabit goodness, but pretty much never with both adapters at the same time, eliminating concerns about clashing IPs. Having a single IP per machine not per adapter simplifies things greatly as soon as you have any apps on your network that push data towards your client computers (i.e. Growl notifications etc). Instead of having to configure your server-side apps for two IPs for every laptop, now you don’t have to care how your user is connected.

This setup “just works” on OS X, tested on Leopard. My single IP comes and goes as needed as I (un-)plug cables and (en-)disable AirPorts. I have no doubt it works seamlessly on Linux either. But of course Microsoft engineers are the ones that seem to know something that noone else does not, which probably explains why Windows 7 DHCP client implementation behaves very annoyingly in this scenario.

Whatever adapter you get the DHCP lease first with will apparently own the lease and refuse to let it go even if you force disconnect on that adapter. Then the other adapter you just hooked up will just keep broadcasting for DHCPOFFERs (at some ridiculously high repeat rate mind you, looking at dnsmasq logs), receive a perfectly valid response yet refuse to accept it.

After some animal testing during which no animals were hurt or injured and googling, it can be concluded that our poor Windows 7 user becomes responsible for manually releasing the DHCP lease before disconnecting WiFi or unplugging the cable. Either go cmd.exe or FarManager and:

ipconfig /release

or use this free GUI I found called HoverIP to manage your adapters:

Let it be noted that initially I attempted to ipconfig /release after disconnecting the adapter. That proved to be an insoluble problem for Windows 7, since all I got were error messages like “Incorrect parameter” for /release and “Object already exists” for trying /renew like any sane person at that point would.

Anyway, I thought that’s the kind of stuff we have computers for. But I guess manual labor is still hip @ MS. Too bad Apple really sucks just as much with their exploding batteries and the likes.

About Leho


  • Diomidis Spinellis

    Thank you for posting this.  I had the exact same setup and problem.  You solved me hours of debugging.

  • Levi Shawn Blaney

    Me too, windows server 2012 with multiple adapters in a team. The team would not accept DHCP offers only a static IP. One of the previous NIC’s must have has a DHCP lease like you were mentioning.