Using netsh command to reset the TCP/IP stack in Windows


netsh int ip reset c:\resetlog.txt


Source: http://support.microsoft.com/kb/299357

Pasted from MS Article:

One of the components of the Internet connection on your computer is a built-in set of instructions called TCP/IP. TCP/IP can sometimes become damaged or corrupted. If you cannot connect to the Internet and you have tried all other methods to resolve the problem, TCP/IP might be causing it.

Because TCP/IP is a core component of Windows, you cannot remove it. However, you can reset TCP/IP to its original state by using the NetShell utility (netsh).

This article describes two ways to reset TCP/IP. You must be logged on to the computer as an administrator. The first method uses a Fix it automated solution to reset TCP/IP. This method is designed for beginning to intermediate users.

The second method describes how to use a command to reset TCP/IP manually. This method is designed for advanced users.

Use a manual method to reset TCP/IP


Note This section is intended for advanced computer users. If you are not comfortable with advanced troubleshooting, ask someone for help or contact Support. For information about how to contact Support, see the Microsoft Help and Support contact information Web site:

http://support.microsoft.com/contactus (http://support.microsoft.com/contactus)

The reset command is available in the IP context of the NetShell utility. Follow these steps to use the reset command to reset TCP/IP manually:

  1. To open a command prompt, click Start and then click Run. Copy and paste (or type) the following command in the Open box and then press ENTER:

    cmd
  2. At the command prompt, copy and paste (or type) the following command and then press ENTER:

    netsh int ip reset c:\resetlog.txt

    Note If you do not want to specify a directory path for the log file, use the following command:

    netsh int ip reset resetlog.txt
  3. Reboot the computer.


When you run the reset command, it rewrites two registry keys that are used by TCP/IP. This has the same result as removing and reinstalling the protocol. The reset command rewrites the following two registry keys: 

Use a manual method to reset TCP/IP


Note This section is intended for advanced computer users. If you are not comfortable with advanced troubleshooting, ask someone for help or contact Support. For information about how to contact Support, see the Microsoft Help and Support contact information Web site:


The reset command is available in the IP context of the NetShell utility. Follow these steps to use the reset command to reset TCP/IP manually:

  1. To open a command prompt, click Start and then click Run. Copy and paste (or type) the following command in the Open box and then press ENTER:

    cmd
  2. At the command prompt, copy and paste (or type) the following command and then press ENTER:

    netsh int ip reset c:\resetlog.txt

    Note If you do not want to specify a directory path for the log file, use the following command:

    netsh int ip reset resetlog.txt
  3. Reboot the computer.


When you run the reset command, it rewrites two registry keys that are used by TCP/IP. This has the same result as removing and reinstalling the protocol. The reset command rewrites the following two registry keys:

SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
SYSTEM\CurrentControlSet\Services\DHCP\Parameters\

To run the manual command successfully, you must specify a file name for the log, in which the actions that netsh takes will be recorded. When you run the manual command, TCP/IP is reset and the actions that were taken are recorded in the log file, known as resetlog.txt in this article.

The first example, c:\resetlog.txt, creates a path where the log will reside. The second example, resetlog.txt, creates the log file in the current directory. In either case, if the specified log file already exists, the new log will be appended to the end of the existing file

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

314067  (http://support.microsoft.com/kb/314067/ ) How to troubleshoot TCP/IP connectivity with Windows XP

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

811259  (http://support.microsoft.com/kb/811259/ ) How to determine and recover from Winsock2 corruption in Windows Server 2003, in Windows XP, and in Windows Vista

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: