Boudewijn Plomp

WELCOME TO MY BLOG SITE!

  • Email
  • LinkedIn
  • RSS
  • Home
  • Blogs
  • Links
  • About me
  • Contact
  • Cisco
    • Unified Computing System
  • Dell
    • VRTX
  • Microsoft
    • Active Directory Certificate Services
    • Active Directory Domain Services
    • Azure
    • DirectAccess
    • Exchange
    • Hyper-V
    • Office 365
    • System Center
    • Windows
  • SkyKick
    • SkyKick Cloud Backup
  • Uncategorized
You are here: Home / Microsoft / Windows / Troubleshoot NICs (left behind in registry)

Troubleshoot NICs (left behind in registry)

March 11, 2015 By Boudewijn Plomp 4 Comments

Symptoms:

At customers I have noticed that sometimes problems occur with network interfaces in Windows, either physical or virtual network interfaces. Having one or more of the following symptoms:

  • A static IP Address cannot be used because (accoring to Windows) it is already in use. But there is no sign of a NIC with that specific IP Address.
  • A static Default Gateway on the TCP/IP properties of your NIC is lost after reboot or directly after you apply the TCP/IP settings.
  • The label “Local Area Network 2” or “Ethernet 2” cannot be renamed to “Local Area Network” or “Ethernet” because (according to Windows) that name already exists.
  • A network interface is detected and shown in Device Manager as <interface-name> #2, whereas it is the only interface.

These symptoms occur when settings are left behind in the registry. Which is often caused by human error, incorrectly removing a NIC (Network Interface Card) interface, or using an OS image on another machine. Of course there is no one to blame, what seems so simple is sometimes overlooked. Troubleshooting these symptoms can take a lot of time. But in fact they are quit easy to solve. With this blog I hope to make you aware about what you should (not) do when removing or re-adding a NIC. And if you encounter such symptoms, how to solve it. 

What you should not do:

Keep in mind that the following rules apply:

  • Never remove a physical NIC without first de-installing it within Device Manager.
  • Never remove a vmNIC from a Virtual Machine on a VMware or Hyper-V host before de-installing the network interface on the guest OS within Device Manager.
  • Never de-install a NIC without first disabling teaming or aggregation.
  • Never re-order physical NICs in PCI slots before de-installing the NIC within Device Manager.

What you should do (correct procedure):

Actually it is quite simple. A NIC has a lot of references in the registry. You have to remove those registry settings before removing a physical or virtual NIC. This can be achieved very easily with the following steps:

  1. Go to Device Manager.
  2. Right-click on the NIC that you want to remove and select Uninstall.
    Optionally: Select Delete driver software for this device.
  3. Click OK.
  4. Shutdown your computer.

And finally do your thing. It is as simpel as that, and it can spare you a lot of annoyance.

How to solve it:

Suppose you have a NIC that is not removed correctly and you encounter one or more symptoms as described ealier. Depending on your problem there are many ways to solve it. But from my experience, 9 out of 10 cases, with the following steps you should be able to solve it:

WARNING: Use the following steps at your own risk! I am not not responsible for any problems that might occur by using this information.

  1. Open an elevated command-prompt (Run as Administrator).
  2. Run the command “SET DEVMGR_SHOW_NONPRESENT_DEVICES=1”.
  3. Run the command “START DEVMGMT.MSC”.
  4. In the Device Manager menu select View > Show hidden devices.
  5. Right-click on the NIC you want to remove and select Uninstall.
    Optionally: Select Delete driver software for this device.
  6. Click OK.

Your problem should now be solved. To be certain, it is best to restart your computer. When the steps above did not solve your problem, there is still another option available. A last case scenerio; by resetting the TCP/IP protocol stack, using the following steps:

WARNING: Use the following steps at your own risk! I am not not responsible for any problems that might occur by using this information.

NOTE: Before you continue; make sure you write down the TCP/IP settings of the existing NIC. Because the TCP/IP settings from all NICs are going to reset.

  1. Open an elevated command-prompt (Run as Administrator).
  2. Enter the command “netsh int IP reset c:\resetlog.txt”.
  3. Restart your computer.

The above syntax is based on a Microsoft solution. Refer to the following link for more information:

How to reset Internet Protocol (TCP/IP)
http://support.microsoft.com/kb/299357/en-us

What about NIC Teaming:

For NIC Teaming the same rules apply. But if you use have an issue with a NIC Team (NICt) or Team NIC (tNIC) configured with LBFO (Load Balancing and Fail-Over) in Windows Server 2012 and later, use the following command from the command-line to reset the entire NIC Teaming (LBFO) configuration:

WARNING: The following command will remove all NIC Teams! Use the following steps at your own risk! I am not not responsible for any problems that might occur by using this information.

  1. Open an elevated command-prompt (Run as Administrator).
  2. Enter the command “LbfoAdmin /ResetConfig”.

I hope this information was informative to you. If this blog helped you solve a problem, please be so kind to leave a comment behind.

Filed Under: Windows Tagged With: Device Manager, Load Balancing and Failover, Network Interface Card, NIC Team, Team NIC

About Boudewijn Plomp

Boudewijn is working as an Senior IT Consultant. His expertise is mainly focused on Microsoft infrastructures, together with Azure cloud services.

Comments

  1. Boudewijn Plomp says

    February 25, 2017 at 12:11 PM

    I recently noticed that the latest Azure VM image with Windows Server 2016 Datacenter has a NIC left behind in the registry. Thats why the NIC in the OS is named “Ethernet 2”. Not a showstopper, but ain’t pretty.

    Reply
    • Jobbo says

      June 7, 2017 at 5:10 PM

      Yes, it ain’t pretty at all. I think the person who create the Master VM image did not uninstall that “Ethernet” then it left as Ghost interface.

      Can we do this?

      Rename-NetAdapter -Name “Ethernet” -NewName “Ethernet X” -IncludeHidden

      Then rename “Ethernet 2” Back to “Ethernet”

      Rename-NetAdapter -Name “Ethernet 2” -NewName “Ethernet”

      Reply
      • Boudewijn Plomp says

        June 7, 2017 at 5:25 PM

        You can. But its better to just remove the hidden device. Then you are able to rename it. Anyway that’s the way I do it.

        Reply
  2. Jochem de Zeeuw says

    February 1, 2018 at 4:51 PM

    Thanks Boudewijn! In place upgrade (couldn’t be helped) killed my teaming;
    netsh int IP reset c:\resetlog.txt helped me out!

    Reply

Leave a Reply Cancel 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.

Recent Blogs:

  • How-to fix the Downloaded Maps Broker (MapsBroker) warning
  • Useful links for Microsoft Azure
  • SkyKick Cloud Backup (for Office 365)
  • My first FlexPod! (Part 6 – System Center)
  • My first FlexPod! (Part 5 – Hyper-V Cluster)
  • My first FlexPod! (Part 4 – Quality of Services)
  • My first FlexPod! (Part 3 – Hardware Configuration)

Catagories:

  • Cisco (6)
    • Unified Computing System (6)
  • Microsoft (8)
    • Azure (1)
    • Exchange (1)
    • Hyper-V (2)
    • Office 365 (1)
    • System Center (1)
    • Windows (2)
  • SkyKick (1)
    • SkyKick Cloud Backup (1)
  • Uncategorized (1)

Tags:

Anti-SPAM Azure Cisco Cisco ASA Cisco FlexPod Cisco Nexus Cisco UCS Cisco VIC Converged Network Adapter Device Manager Exchange Hyper-V Load Balancing and Failover MapsBroker Microsoft NetApp Network Interface Card NIC Team Office 365 Quality of Services Sender ID Sender Policy Framework Services Simple Mail Transfer Protocol SkyKick Cloud Backup System Center System Center Operations Manager System Center Virtual Machine Manager Team NIC UCS Manager UCS PowerTool Suite vHBA vNIC Windows

Archives

  • August 2017
  • April 2016
  • August 2015
  • May 2015
  • March 2015
  • March 2014
  • February 2014

Copyright © 2023 · Boudewijn Plomp · All Rights Reserved · Log in