How to reset “Internet Protocol (TCP/IP)” in Windows Server 2003

SUMMARY

If you click the Internet Protocol (TCP/IP) entry in the This connection uses the following items list that is displayed in the Local Area Connection properties, you may notice that the Uninstall button is unavailable (disabled). This behavior occurs because the Transport Control Protocol/Internet Protocol (TCP/IP) stack is a core component of Microsoft Windows Server 2003 and cannot be removed.
In some scenarios, you may want to reinstall TCP/IP to return the TCP/IP stack to its original state. You can use the Netsh.exe utility to reset the TCP/IP stack to the same conciliation that it was when you first installed the operating system.

Back to the top

MORE INFORMATION

The Netsh.exe utility (netsh) is a command-line scripting tool that you can use to configure and monitor Windows Server 2003 networking. This tool gives you an interactive network shell interface.
You can use the reset command in the Internet Protocol (IP) context of this utility to rewrite the following TCP/IP-related registry keys:

  • SYSTEMCurrentControlSetServicesTcpipParameters
  • SYSTEMCurrentControlSetServicesDHCPParameters

If you run this command, you get the same result as if you removed and reinstalled the TCP/IP protocol.
Warning The netsh int ip reset command will reset all IP information, default gateway information, and DNS server information. Before you restart the computer after you run this command, you must configure your TCP/IP settings. Otherwise, you may not be able to connect to the computer remotely.

Back to the top

Command syntax

netsh int ip reset [log_file_name]

To use the netsh command to reset the TCP/IP stack, you must specify a log file name in which the results of the command are recorded. If you enter either of the commands that are described in the "Command Samples" section of this article, the TCP/IP stack on the current computer is reset, and the activities of that action are recorded in the Resetlog.txt file that is specified in the command line. In the first example, the log file is created in the current folder; in the second example, a complete path to the Resetlog.txt log file is specified.
Note If an existing log file with the same name is present in the target folder, the new log file information is appended to the end of the existing file.

Back to the top

Command samples

The following examples describe how to use the netsh command to reset the TCP/IP protocol stack.

Example 1
  1. Click Start, and then click Run.
  2. In the Open box, type cmd, and then click OK.
  3. At the command prompt, type the following command, and then press ENTER:

    netsh int ip reset resetlog.txt

    NOTE: In the preceding command, "int" is the shortened form of the interface command.

  4. Type exit, and then press ENTER.
Example 2
  1. Click Start, and then click Run.
  2. In the Open box, type cmd, and then click OK.
  3. At the command prompt, type the following command, and then press ENTER:

    netsh int ip reset c:resetlog.txt

  4. Type exit, and then press ENTER.

To view help for the command, type the command, type a space, and then type ?. Additional help is available for commands in the sub-contexts of the netsh command. For example, to view help for the netsh commands that are described in the preceding section, type the following commands at the command prompt:

  • Type netsh ?, and then press ENTER.
  • Type netsh int ?, and then press ENTER.
  • Type netsh int ip ?, and then press ENTER.
  • Type netsh int ip reset ?, and then press ENTER.

Back to the top

Example of the log file for NETSH INT IP RESET

The following text is an example of the log file that is generated by netsh if you run the ip reset command. The actual log file may vary depending on the configuration of the computer on which you run the command. Typically, no actions are logged in the file if the TCP/IP registry keys have not been altered from their original configuration.

reset   SYSTEMCurrentControlSetServicesDhcpParametersOptions15RegLocation
            old REG_MULTI_SZ =
                SYSTEMCurrentControlSetServicesTcpipParametersInterfaces?DhcpDomain
                SYSTEMCurrentControlSetServicesTcpIpParametersDhcpDomain

added   SYSTEMCurrentControlSetServicesNetbtParametersInterfacesTcpip_{2DDD011E-B1B6-4886-87AC-B4E72693D10C}NetbiosOptions
added   SYSTEMCurrentControlSetServicesNetbtParametersInterfacesTcpip_{BAA9D128-54BB-43F6-8922-313D537BE03E}NetbiosOptions
reset   SYSTEMCurrentControlSetServicesNetbtParametersInterfacesTcpip_{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}NameServerList
            old REG_MULTI_SZ =
                10.1.1.2

deleted SYSTEMCurrentControlSetServicesNetbtParametersEnableLmhosts
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{2DDD011E-B1B6-4886-87AC-B4E72693D10C}AddressType
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{2DDD011E-B1B6-4886-87AC-B4E72693D10C}DefaultGatewayMetric
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{2DDD011E-B1B6-4886-87AC-B4E72693D10C}DisableDynamicUpdate
deleted SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{2DDD011E-B1B6-4886-87AC-B4E72693D10C}DontAddDefaultGateway
reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{2DDD011E-B1B6-4886-87AC-B4E72693D10C}EnableDhcp
            old REG_DWORD = 0

added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{2DDD011E-B1B6-4886-87AC-B4E72693D10C}NameServer
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{2DDD011E-B1B6-4886-87AC-B4E72693D10C}RawIpAllowedProtocols
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{2DDD011E-B1B6-4886-87AC-B4E72693D10C}TcpAllowedPorts
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{2DDD011E-B1B6-4886-87AC-B4E72693D10C}UdpAllowedPorts
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{5B3675C3-6EB9-4936-B991-04DA31024C4E}DisableDynamicUpdate
reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{5B3675C3-6EB9-4936-B991-04DA31024C4E}EnableDhcp
            old REG_DWORD = 0

reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{5B3675C3-6EB9-4936-B991-04DA31024C4E}IpAddress
            old REG_MULTI_SZ =
                12.12.12.12

deleted SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{5B3675C3-6EB9-4936-B991-04DA31024C4E}IpAutoconfigurationAddress
deleted SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{5B3675C3-6EB9-4936-B991-04DA31024C4E}IpAutoconfigurationMask
deleted SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{5B3675C3-6EB9-4936-B991-04DA31024C4E}IpAutoconfigurationSeed
reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{5B3675C3-6EB9-4936-B991-04DA31024C4E}RawIpAllowedProtocols
            old REG_MULTI_SZ =
                0

reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{5B3675C3-6EB9-4936-B991-04DA31024C4E}SubnetMask
            old REG_MULTI_SZ =
                255.255.255.0

reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{5B3675C3-6EB9-4936-B991-04DA31024C4E}TcpAllowedPorts
            old REG_MULTI_SZ =
                0

reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{5B3675C3-6EB9-4936-B991-04DA31024C4E}UdpAllowedPorts
            old REG_MULTI_SZ =
                0

added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BAA9D128-54BB-43F6-8922-313D537BE03E}AddressType
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BAA9D128-54BB-43F6-8922-313D537BE03E}DefaultGatewayMetric
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BAA9D128-54BB-43F6-8922-313D537BE03E}DisableDynamicUpdate
deleted SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BAA9D128-54BB-43F6-8922-313D537BE03E}DontAddDefaultGateway
reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BAA9D128-54BB-43F6-8922-313D537BE03E}EnableDhcp
            old REG_DWORD = 0

added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BAA9D128-54BB-43F6-8922-313D537BE03E}NameServer
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BAA9D128-54BB-43F6-8922-313D537BE03E}RawIpAllowedProtocols
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BAA9D128-54BB-43F6-8922-313D537BE03E}TcpAllowedPorts
added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BAA9D128-54BB-43F6-8922-313D537BE03E}UdpAllowedPorts
reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}DefaultGateway
            old REG_MULTI_SZ =
                10.1.1.2


reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}DefaultGatewayMetric
            old REG_MULTI_SZ =
                0


added   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}DisableDynamicUpdate
reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}EnableDhcp
            old REG_DWORD = 0

reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}IpAddress
            old REG_MULTI_SZ =
                10.1.1.1


deleted SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}IpAutoconfigurationAddress
deleted SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}IpAutoconfigurationMask
deleted SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}IpAutoconfigurationSeed
reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}NameServer
            old REG_SZ = 10.1.1.2,10.1.1.3

reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}RawIpAllowedProtocols
            old REG_MULTI_SZ =
                0

reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}SubnetMask
            old REG_MULTI_SZ =
                255.255.255.0


reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}TcpAllowedPorts
            old REG_MULTI_SZ =
                0

reset   SYSTEMCurrentControlSetServicesTcpipParametersInterfaces{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}UdpAllowedPorts
            old REG_MULTI_SZ =
                0

deleted SYSTEMCurrentControlSetServicesTcpipParametersDontAddDefaultGatewayDefault
deleted SYSTEMCurrentControlSetServicesTcpipParametersEnableIcmpRedirect
deleted SYSTEMCurrentControlSetServicesTcpipParametersEnableSecurityFilters
deleted SYSTEMCurrentControlSetServicesTcpipParametersSearchList
deleted SYSTEMCurrentControlSetServicesTcpipParametersUseDomainNameDevolution
<completed>
				

Note In Windows Server 2003 Service Pack 1, you can use the netsh winsock reset command to repair Winsock.

Warning Programs that access or monitor the Internet, such as antivirus programs, firewall programs, or proxy clients may be negatively affected when you run the netsh winsock reset command. If you have a program that no longer functions correctly after you use this resolution, reinstall the program to restore functionality.

Back to the top

REFERENCES

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

811259  How to determine and to recover from Winsock2 corruption in Windows Server 2003, in Windows XP, and in Windows Vista

Back to the top


APPLIES TO
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows Small Business Server 2003 Standard Edition
  • Microsoft Windows Small Business Server 2003 Premium Edition

Source: How to reset "Internet Protocol (TCP/IP)" in Windows Server 2003

Leave a Reply

Your email address will not be published. Required fields are marked *