News Glossary of Terms FAQs Polls Cool Links SpeedGuide Teams SG Premium Services SG Gear Store
Registry Tweaks Broadband Tools Downloads/Patches Broadband Hardware SG Ports Database Security Default Passwords User Stories
Broadband Routers Wireless Firewalls / VPNs Software Hardware User Reviews
Broadband Security Editorials General User Articles Quick Reference
Broadband Forums General Discussions
Advertising Awards Link to us Server Statistics Helping SG About
The Broadband Guide
SG
search advanced
 Username:
 Password:
Register
 forgot your password?

How to repair TCP/IP and Winsock

2004.12.01 10:24 by Philip
Tags: Winsock, TCP/IP


Internet connectivity problems can often occur due to malware, misconfiguration, or corrupted networking software installation. When this occurs, packets don't get transferred over the network even thoguh it may seem you're connected to the internet. When you start Internet Explorer, you may receive an error message: "The page cannot be displayed"

In addition, you may receive one of several other error messages while using the "ipconfig" command:

"An error occurred while renewing interface 'Internet': An operation was attempted on something that is not a socket"
"An error occurred while renewing interface Local Area Connection: the requested service provider could not be loaded or initialized."
"The attempted operation is not supported for the type of object referenced."
"The operation failed since no adapter is in the state permissible for this operation."

You can use the methods below to recover from Winsock and TCP/IP corruption and reset them to their default state.

 

Use the TCP Optimizer to reset TCP/IP and Winsock
The SG TCP Optimizer has the ability to repair/reset TCP/IP and Winsock:

1. Download and run the program
2. Navigate to the "File > Reset Winsock" menu
3. Navigate to the "File > Reset TCP/IP" menu
4. Restart Windows

  

Reset TCP/IP
Windows XP SP2, Vista, Windows 7

The below command resets TCP/IP to its default state under Windows XP SP2 and newer OSes. You will have to use elevated command prompt under Vista/Windows 7:

netsh int ip reset

Note: If you'd like to generate a log file of the changes, append a logfile path to the above command, i.e.: "netsh int ip reset c:\resetlog.txt". Changes will be appended to the end of the log file if it exists.

The above NetShell (netsh) command-line tool resets the following registry branches to their default state:
SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
SYSTEM\CurrentControlSet\Services\DHCP\Parameters\

 

Reset Winsock
Windows XP SP2, Vista, Windows 7

Winsock (the Windows Sockets API) defines how software should access network services, especially TCP/IP. It defines a standard interface between TCP/IP client appliactions (such as an FTP client or a web browser) and the unterlying TCP/IP protocol stack.

To repair Winsock and reset it to its default state, start command prompt (elevated command prompt under Vista/Windows 7) and type the following command: 

netsh winsock reset

Note: If you'd like to generate a log file of the changes, append a logfile path to the above command, i.e.: "netsh winsock reset c:\resetlog.txt". Changes will be appended to the end of the log file if it exists.

 

 

Reinstall TCP/IP under Windows 2000

You might have to reinstall TCP/IP to help resolve some issues, such as improperly configured bindings, dialup clients that are unable to connect to the RAS server, NIC drivers that do not properly bind to the TCP/IP protocol, etc.

To remove TCP/IP in Windows 2000:

  1. Click to clear the TCP/IP check box from all dialup and LAN connections in "Network and Dialup Connections".
  2. Install another protocol (NetBEUI or NWlink) to maintain a placeholder for each conneciton.
  3. Restart your computer
  4. Reinstall TCP/IP, and restart your computer again.

Note: this method is only available under older Windows OSes (pre-XP). Later Windows versions consider the TCP/IP stack a core component of the operating system and disable the uninstall option for the TCP/IP protocol.

 

 

Related Links

MS KB 299357 - How to Reset Internet Protocol (TCP/IP) in Windows XP
MS KB 314067 - How to troubleshoot TCP/IP connectivity with Windows XP
MS KB 811259 - How To determine and recover from Winsock2 corruption

  User Reviews/Comments:
    rate:
   avg:
by Faisal Kohgadai - 2007.11.23 13:24
There's a tool that you can use for XP to reset this for you. Especially when you receive [] when pinging local host. Its called WinSock XP Fix
comment print discuss top

exec. time: 0.02096 s
Copyright © 1998-2014 Speed Guide, Inc. All rights reserved.
Terms of Use | Privacy Policy