Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In Windows (specifically, server 2008 R2), if a network interface dies and I replace it, how can I then retrieve the IP that was assigned to the old interface?

I know Windows retains it somewhere, because if I knew what it was and assigned it to the new interface, Windows would throw a warning and inform me that IP was assigned on this system before.

Along the same lines, if I were talking about a virtual guest that was moved to a new host that did not have the virtual network configured the same, I arrive at the same issue. I need to find the old IP and assign it to the new interface.

Thanks,

[EW]

share|improve this question

2 Answers 2

up vote 4 down vote accepted

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces

via regedit

share|improve this answer
    
Thanks! Gets me the info I need. Have not tried it on a systems with an interface missing yet though. Will update after I have. Also, works fine converted for PowerShell: get-childitem "hklm:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces" |get-itemproperty |fl pschildname,*ipaddress,*subnetmask,*gatewayhardware –  E W Dec 2 '10 at 20:47
    
yep powershell works fine! –  tony roth Dec 2 '10 at 21:16

You can use the netsh command to accomplish this:

netsh interface ipv4 dump

That should give you manually assigned ipv4 interface information (active, inactive, or even removed interfaces). Replace with ipv6 if you need ipv6 interface information.

Result:

# ----------------------------------
# IPv4 Configuration
# ----------------------------------
pushd interface ipv4

reset
set global icmpredirects=enabled
add route prefix=0.0.0.0/0 interface="Local Area Connection 2" nexthop=192.168.28.1 publish=Yes
add route prefix=0.0.0.0/0 interface="Local Area Connection" nexthop=10.10.10.1 publish=Yes
add address name="Local Area Connection 2" address=192.168.28.180
add address name="Local Area Connection" address=10.10.10.212
share|improve this answer
    
That's a neat feature - I didn't know netsh would list removed interfaces. Nice. –  Helvick Dec 2 '10 at 21:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.