Remove multiple preferred IPv4 addresses Windows 7, Windows 8 & Server 2008

… and disable IPv6 in Windows 7, Windows 8 & Server 2008

Update and clarification: 6th Oct 2014

  1. As pointed out in comments, disabling IPv6 is not a requirement if you’re just dealing with multiple preferred IPs – ignore Step 1 if you do not wish to disable it.
  2. Still relevant after all these years

Just finished adding a few more new Windows 7 machines to our Domain, and they’ve been displaying interesting behaviour re ip configuration – I’m not listing the results of ‘ipconfig /all’ here, but they were long and had multiple preferred IPv4 addresses and extensive unrequired IPv6 entries (tunneling etc), which you can’t uninstall from Windows 7 or Server 2008.

The multiple IPv4 addresses were understandably causing a few problems on the network…

In attempts to remove them I tried scanning the registry for IP addresses in decimal, hex and binary; uninstalling and reinstalling network adapters; and just about everything else I could think of – finally, and after much pen chewing, I found the following 3 step resolution – note this will clear all your current IP settings:

1. Disable IPv6 in Server 2008 / Windows 7 / Windows 8
Add a ‘DisabledComponents’ DWORD registry key to Tcpip6 parameters set value to FF – This disables IPv6 on all your interfaces and connections, but does not disable the IPv6 loopback interface:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
Tcpip6\Parameters\DisabledComponents

Restart your computer…

2. Reset WinSock and TCP/IP Stack
Open a Command Prompt as administrator:

Reset WINSOCK entries: netsh winsock reset catalog
Reset TCP/IP stack: netsh int ip reset reset.log
Reboot the machine (you can run both commands first, I tend to put multiple commands in notepad and then copy and paste into the command window).

3. Renew your IP
Configure your IP settings, whether static or dynamic, and we’re done

Enjoy your clean and simple ipconfig /all

Multiple preferred IPv4 addresses removed

Update: Before disabling IPV6, you may want to take a quick look at the following related TechNet article.

22 comments to “Remove multiple preferred IPv4 addresses Windows 7, Windows 8 & Server 2008”
  1. One of the best informative reads I have had in years, top find Mr Faulkner cheers; I have forwarded this article onto all my colleagues.

  2. Thanks, was fighting with extra ips that would not go away after a sysprep and clone and reip. The pre sysprep ip kept returning. Gone after the netsh reset 🙂

  3. I suddenly started getting “Unidentified Network” out of nowhere on my Win 7 laptop. This fixed the problem. Thanks a million.

  4. This saves my day! I had about 10 preferred IP stuck on my WIN8 and cannot configure any more IP.

  5. This was extremely helpful experiencing the issue myself. I shared it with all my IT staff and added it to our knowledge base.

    Thank you very much William.

  6. helped me a lot. although I didn’t use the “1. Disable IPv6”, didn’t need it.
    its a shame windows doesn’t give a normal interface to do this

    • My rigs are all Hyper-V VMs – I’ll knock up a VVWare host so I can look into (working from home). First time not resolved so maybe different root cause. Do you have a ipconfig/all you could share..?

  7. Hub – re: previous comment. ‘It doesn’t work’ is the kind of comment I’d expect from a user. Post your ipconfig/all results and we can take a look.

  8. I was pulling my hair out about multiple ip addresses, this worked perfectly first time. thank you.

  9. After some really frustrating hours hitting my head against the wall this article show me my way out. Thank you X a lot.

  10. I ran the commands and still had 169.254.197.185 stuck in IPconfig.
    Cursing cursing cursing…
    Looked at IPv4 Properties > Alternate Configuration Tab
    Automatic private IP address was selected
    Changed to User configured with an address for the current network
    IPconfig /release
    IPconfig /renew
    169.254.197.185 was gone in the next IPconfig
    I’ve tried to resolve this for years…
    Thanks for getting me to look at it one more time.

  11. I have nine systems on a switch but six is work while the other three is showing invalid ip after I troubleshoot

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.