# Can't get an IP address - IP Driver Error Code 2



## cgrablew

I can't connect my Dell Laptop to my home wireless or wired network. It sees the Wireless network and connects but it never receives an IP address, so it can't access the Internet. I've tried uninstalling TCP/IP, the network cards and tried connecting directly to the cable modem without any luck. This PC worked fine before my wife took it on a trip. She says that the only thing she did was try to access a wireless network on her return trip. In researching the problem I tried deleting the WINSOCK & WINSOCK2 entries from the registries but it didn't help. My guess is that I have corrupted file somewhere. When doing a ipconfig, I get an IP 'Driver, error code 2" error. Me and 2 other techie friends spent several hours trying to fix the problem to no avail. Has anyone else run across this problem and how did you fix it?


----------



## id4vikas

Hi,
Which operating system are u using?If u r using windows XP then u must follow this link

http://support.microsoft.com/kb/811259

Hope it works for u. -)


----------



## cgrablew

Yes I am using XP. I have tried deleting the WINSOCK & WINSOCK2 entries in the registry but it didn't work. I tried doing IPCONFIG /ALL again and got a different message: An Internal Error Occurred. The request is not support. Unable to query host name. Please contact Microsoft.


----------



## cgrablew

Hi,

I've tried the netdiag /test:winsock but I get an error saying it can't access the TCP/IP entries in the registry. Any ideas on what this may be? 

Thanks


----------



## Bob Cerelli

Might try sfc /scannow

Saw a few posts where resetting the IP stack didn't work but might want to give it a try:

netsh int ip reset [ log_file_name ]

the log_file_name needs to be specified. 
e.g. - netsh int ip reset ip_reset.txt


----------



## id4vikas

To repair Winsock if you have Windows XP Service Pack 2 (SP2) installed, type netsh winsock reset at the command prompt, and then press ENTER.

Note: Restart the computer after you run this command. Additionally, for computers that are running Windows XP SP2, there is a new netsh command that can rebuild the Winsock key. For more information, visit the following Web site: 
http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.mspx


----------



## jsample81620

I have tried everything I know and two other guys in the office have as well. Any ideas? The only things I can add are when the machine boots it seems to hang (I can do some functions command prompt but no access to network properties or exploring computer) then it goes blank, and when it reloads everything is running. I installed a copy of Symantec Antivirus Corporate 10, and then tried to update the defs manually with no luck. The NIC passed all bios tests and the Dell32 tests. The lights are on on the NIC but the OS reports it is disconnected. Tried all above suggestions. HELP!!!!


----------



## Bob Cerelli

I'm not sure you can just delete the Winsock entries and have them automatically put back - "I have tried deleting the WINSOCK & WINSOCK2 entries in the registry but it didn't work."

To Remove the existing winsock2 registry entries (regardless of the OS) run:
http://www.onecomputerguy.com/reg/xp_del_winsock.reg

To add WindowsXP clean entries back in again, run:
http://www.onecomputerguy.com/reg/xp_winsock.reg


----------



## Jeffyboy

You can rebuild your tcp/ip stack by the following command line...
netsh winsock reset catalog<Enter>


----------



## jsample81620

Tried both with a reboot in between each and still no luck. I am at the point to reload OS, but I would love to find the fix.


----------



## Bob Cerelli

"Tried both with a reboot in between each and still no luck. " - What exactly did you try.

Before a reload from scratch, and since you can boot, you might try either a reinstall or repair install. If it works it would sure save a lot of time. 

FOR A RE-INSTALL
Start WindowsXP 
Go to the location of your source files 
Run WINNT32 /unattend 
This is probably the fastest and easiest

FOR A REPAIR INSTALL
1.	Insert and boot from your WindowsXP CD 
2.	At the second R=Repair option, press the R key 
3.	This will start the repair 
4.	Press F8 for I Agree at the Licensing Agreement 
5.	Press R when the directory where WindowsXP is installed is shown. Typically this is C:\WINDOWS 
6.	It will then check the C: drive and start copying files 
7.	It will automatically reboot when needed. Keep the CD in the drive. 
8.	You will then see the graphic part of the repair that is like during a normal install of XP (Collecting Information, Dynamic Update, Preparing Installation, Installing Windows, Finalizing Installation) 
9.	When prompted, click on the Next button 
10.	When prompted, enter your XP key 
11.	Normally you will want to keep the same Workgroup or Domain name 
12.	The computer will reboot 
13.	Then you will have the same screens as a normal XP Install 
14.	Activate if you want (usually a good idea) 
15.	Register if you want (but not necessary) 
16.	Finish 
17.	At this point you should be able to log in with any existing accounts.


----------



## jsample81620

Sorry Bob. I tried your suggestions and then the thread after yours. Rebooting in between of course. I am trying the re-install option now!


----------



## jsample81620

The automated repair option took care of my problems. Had issues getting the unattended to work. Looks like a bad NIC and somehow that caused the IP issues. Everything is working and now the NIC fails the Dell tests. Thanks! THis was my first use of this board and I will be back!


----------



## Bob Cerelli

Glad the repair option worked for you.


----------



## hublerb

REALLY REINSTALLING TCP/IP
Complete destruction and restoration of dead TCP/IP stack
Recovery from fatal failure or partial or complete corruption of TCP/IP.
For virus related problems, please consult tcpip.sys to ensure it is not a corrupt version before following these steps.

This solution is an alternative to reinstalling by partial method or by using winnt /unattend which I very much wanted to avoid.

Here is the hardcore method when nothing else is working. I have cobbled together these suggestions through various forums to offer them here as a concise solution. There are no guarantees! Back up anything relevant and set a system restore point to cover your ***. I discovered this method after all other solutions failed.

Related error messages:
"TCP/IP network transport is not installed" error message from active sync
TCP/IP driver missing from devmgmt.msc showing hidden devices
ipconfig produces immediate failure message : 
Windows IP Configuration
An Internal error occured: The request is not supported.
Please contact Microsoft Product Support Services for further help.
Additional information: Unable to query host name.
"the specified device instance handle does not correspond to a present device" message regarding DHCP service in services.msc
net start tcpip >>> fails with system error 2, The system cannot find the file specified
ping error: "Unable to contact IP driver, error code 2"
Repair Local Area Connection: Failed to query TCP/IP settings of the connection. Cannot proceed.
"Tcp/ip Protocol Driver Service Failed To Start, system cannot find the file specified"
"The TCP/IP Protocol Driver service failed to start due to the following error: The system cannot find the file specified"

Failed repair methods:
netsh int ip reset resetlog.txt >>> no effect
non-full reinstall of TCP/IP using only the have disk method. >>> no effect
netsh Winsock reset >>> no effect
http://www.snapfiles.com/get/winsockxpfix.html >>> no effect
reinstalling network card >>> no effect

MY SOLUTION:::

Step #1
Full uninstall of TCP/IP ... no ********.
----------------------------------------------------------------------
These steps are copied from http://support.microsoft.com/kb/325356
11. Locate the Nettcpip.inf file in %winroot%\inf, and then open the file in Notepad. 
12. Locate the [MS_TCPIP.PrimaryInstall] section. 
13. Edit the Characteristics = 0xa0 entry and replace 0xa0 with 0x80. 
14. Save the file, and then exit Notepad. 
15. In Control Panel, double-click Network Connections, right-click Local Area Connection, and then select Properties. 
16. On the General tab, click Install, select Protocol, and then click Add. 
17. In the Select Network Protocols window, click Have Disk. 
18. In the Copy manufacturer's files from: text box, type c:\windows\inf, and then click OK. 
19. Select Internet Protocol (TCP/IP), and then click OK.
Note This step will return you to the Local Area Connection Properties screen, but now the Uninstall button is available. 
20. Select Internet Protocol (TCP/IP), click Uninstall, and then click Yes. 
RESTART

succesfull uninstallation of TCP/IP will remove numerous keys from the registry including
HKLM/system/CurrentControlSet/services/tcpip
HKLM/system/CurrentControlSet/services/dhcp
HKLM/system/CurrentControlSet/services/dnscache
HKLM/system/CurrentControlSet/services/ipsec
HKLM/system/CurrentControlSet/services/policyagent
HKLM/system/CurrentControlSet/services/atmarpc
HKLM/system/CurrentControlSet/services/nla
These represent various interconnected and interdependant services.

For good measure you should delete the following keys before reinstalling TCP/IP in step #2
HKLM/system/CurrentControlSet/services/winsock
HKLM/system/CurrentControlSet/services/winsock2

Step #2
Reinstall of TCP/IP
----------------------------------------------------------------------
Following the above substep #13, replace the 0x80 back to 0xa0, this will eliminate the related "unsigned driver" error that was encountered during the uninstallation phase.

Return to "local area connection"> properties > general tab > install > Protocol > TCP/IP

You may receive an "Extended Error" failure upon trying to reinstall the TCP/IP, this is related to the installer sub-system conflicting with the security database status.

to check the integrity of the security database
esentutl /g c:\windows\security\Database\secedit.sdb

There may be a message saying database is out of date
first try the recovery option
esentutl /r c:\windows\security\Database\secedit.sdb

this did not work for me, I needed the repair option
esentutl /p c:\windows\security\Database\secedit.sdb

rerun the /g option to ensure that integrity is good and database is up to date.

Now return to the "local area network setup" 
choose install > protocol > tcp/ip and try again

reboot.
worked for me.


----------



## hemburyr

1. Reboot XP into Safe Mode

2. Delete the following files - c:\windows\system32\drivers\tcpip.sys & c:\windows\system32\dllcache\tcpip.sys

3. From your original XP CD or i386 folder on local HDD find the following file - tcpip.sy_ and then expand this file to locations above eg expand c:\i386\tcpip.sy_ c:\windows\system32\drivers\tcpip.sys

4. When both files have been replaced reboot the PC.


----------



## hemburyr

Source files = original XP CD

So you would probably need to run something like the following -

< drive letter of CD >:\i386\winnt32 /unattend


----------



## trevorjmason

Many hugs 'n' kisses to "hublerb" for alternative options to the M$ way of doing things when refreshing the TCP stack and Winsock.

While this in itself didn't fix my entire problem, I know it didn't do any harm - and I am prepared for next time.

Final set of hugs 'n' kisses to "hemburyr" for the final suggestion that did resolve the last of my issues following a very nasty trojan infection.

Great work guys. Keep up the good work - as I know you will


----------



## HugoP

I could get NO tcp ip - when I typed ipconfig /all I got an error message
I tried ALL fixes for 3 days straight - reset EVERYTHING, nothing worked, and was just about to reinstall XP and then.......

Finally the answer was so simple I am kicking myself - spyware/virus had replaced the tcpip.sys file with a new file.

Just delete tcpip.sys in system/drivers and the backup file created by the spyware (tcpip.sys.flg in my case)- it will automatically reset this file to the original (2004) file.

SIMPLE!!!!!!!!

Hugo


----------



## joeker455

I have been working on a similar problem for 2 days now. All of a sudden my computer will not connect to the internet. I have tried several of the things suggested here however I have not yet tried what you did. I know where to find the tcpip.sys file however where do I find the file created by the spyware if there is one?


----------



## HugoP

Hi Joeker
The spyware tcpip was in the same directory and just had a different file extention tcpip.sys.flg in my case - maybe do a search for anything called tcpip.
If you delete the proper windows version it should automatically re-create it straight away with the archived windows version, or you could try re-installing the latest service pack.
Anyway keep an eye on the date of tcpip.sys - if it is a unique date to the rest of the components in the system32/drivers you've probably got a spyware version.


----------

