Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • Great idea, but I am confident that force the adapter out of DHCP.
    – Fergus
    Commented Nov 22, 2013 at 2:39
  • 1
    I tested it, and @Fergus is right: saying netsh interface ipv4 show address after this gives the static IP only. The DHCP IP is gone. Commented Nov 22, 2013 at 3:03
  • Ooops, yeah I remember now. The option would be to get the current IP, then add both back. It is very unlikely that an DHCP lease would not be renewed while in actively in use (there is a grace period to avoid this), so it only matters at boot time.
    – Paul
    Commented Nov 22, 2013 at 4:25
  • @Paul: If I just add the DHCP address back with netsh, doesn't that make it a static IP, so the Windows box's stack won't keep sending DHCP lease renewals to the DHCP server? When the initial lease time is up, the DHCP server would then be free to reassign that address. Commented Nov 22, 2013 at 5:17
  • @WarrenYoung How long is the lease you are getting? (ipconfig /all. for me it's 10 days from my router). So if the computer is restarted before the lease is over it shouldn't be a problem. Otherwise you could add a ipconfig /release and ipconfig /renew above these lines and schedule it to run at 3 AM (when nobody is behind the computer).
    – Rik
    Commented Nov 22, 2013 at 9:00