Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Written by: Michael Wood
- #Date 11-29-2011
- Ways you can tell it's broken is:
- Computer will not pull a DHCP address
- Running the command "ipconfig" will result in an error message
- Obviously, you wouldn't be able to ping any address
- Most people, when it comes to fixing the TCP/IP stack in Windows, would run the command:
- netsh int ip reset resetlog.txt
- Then restart the machine.
- This above command rewrites two registry keys that are used by TCP/IP:
- SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
- SYSTEM\CurrentControlSet\Services\DHCP\Parameters\
- Here is what the log file would look like after running the command:
- (Note: When the TCP/IP registry keys have not been altered from their original configuration, there might be no actions logged in the file)
- #BEGIN LOG#
- reset SYSTEM\CurrentControlSet\Services\Dhcp\Parameters\Options\15\RegLocation
- old REG_MULTI_SZ =
- SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\?\DhcpDomain
- SYSTEM\CurrentControlSet\Services\TcpIp\Parameters\DhcpDomain
- added SYSTEM\CurrentControlSet\Services\Netbt\Parameters\Interfaces\Tcpip_{2DDD011E-B1B6-4886-87AC-B4E72693D10C}\NetbiosOptions
- added SYSTEM\CurrentControlSet\Services\Netbt\Parameters\Interfaces\Tcpip_{BAA9D128-54BB-43F6-8922-313D537BE03E}\NetbiosOptions
- reset SYSTEM\CurrentControlSet\Services\Netbt\Parameters\Interfaces\Tcpip_{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\NameServerList
- old REG_MULTI_SZ =
- 10.1.1.2
- deleted SYSTEM\CurrentControlSet\Services\Netbt\Parameters\EnableLmhosts
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{2DDD011E-B1B6-4886-87AC-B4E72693D10C}\AddressType
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{2DDD011E-B1B6-4886-87AC-B4E72693D10C}\DefaultGatewayMetric
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{2DDD011E-B1B6-4886-87AC-B4E72693D10C}\DisableDynamicUpdate
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{2DDD011E-B1B6-4886-87AC-B4E72693D10C}\DontAddDefaultGateway
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{2DDD011E-B1B6-4886-87AC-B4E72693D10C}\EnableDhcp
- old REG_DWORD = 0
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{2DDD011E-B1B6-4886-87AC-B4E72693D10C}\NameServer
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{2DDD011E-B1B6-4886-87AC-B4E72693D10C}\RawIpAllowedProtocols
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{2DDD011E-B1B6-4886-87AC-B4E72693D10C}\TcpAllowedPorts
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{2DDD011E-B1B6-4886-87AC-B4E72693D10C}\UdpAllowedPorts
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{5B3675C3-6EB9-4936-B991-04DA31024C4E}\DisableDynamicUpdate
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{5B3675C3-6EB9-4936-B991-04DA31024C4E}\EnableDhcp
- old REG_DWORD = 0
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{5B3675C3-6EB9-4936-B991-04DA31024C4E}\IpAddress
- old REG_MULTI_SZ =
- 12.12.12.12
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{5B3675C3-6EB9-4936-B991-04DA31024C4E}\IpAutoconfigurationAddress
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{5B3675C3-6EB9-4936-B991-04DA31024C4E}\IpAutoconfigurationMask
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{5B3675C3-6EB9-4936-B991-04DA31024C4E}\IpAutoconfigurationSeed
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{5B3675C3-6EB9-4936-B991-04DA31024C4E}\RawIpAllowedProtocols
- old REG_MULTI_SZ =
- 0
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{5B3675C3-6EB9-4936-B991-04DA31024C4E}\SubnetMask
- old REG_MULTI_SZ =
- 255.255.255.0
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{5B3675C3-6EB9-4936-B991-04DA31024C4E}\TcpAllowedPorts
- old REG_MULTI_SZ =
- 0
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{5B3675C3-6EB9-4936-B991-04DA31024C4E}\UdpAllowedPorts
- old REG_MULTI_SZ =
- 0
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BAA9D128-54BB-43F6-8922-313D537BE03E}\AddressType
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BAA9D128-54BB-43F6-8922-313D537BE03E}\DefaultGatewayMetric
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BAA9D128-54BB-43F6-8922-313D537BE03E}\DisableDynamicUpdate
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BAA9D128-54BB-43F6-8922-313D537BE03E}\DontAddDefaultGateway
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BAA9D128-54BB-43F6-8922-313D537BE03E}\EnableDhcp
- old REG_DWORD = 0
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BAA9D128-54BB-43F6-8922-313D537BE03E}\NameServer
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BAA9D128-54BB-43F6-8922-313D537BE03E}\RawIpAllowedProtocols
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BAA9D128-54BB-43F6-8922-313D537BE03E}\TcpAllowedPorts
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BAA9D128-54BB-43F6-8922-313D537BE03E}\UdpAllowedPorts
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\DefaultGateway
- old REG_MULTI_SZ =
- 10.1.1.2
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\DefaultGatewayMetric
- old REG_MULTI_SZ =
- 0
- added SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\DisableDynamicUpdate
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\EnableDhcp
- old REG_DWORD = 0
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\IpAddress
- old REG_MULTI_SZ =
- 10.1.1.1
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\IpAutoconfigurationAddress
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\IpAutoconfigurationMask
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\IpAutoconfigurationSeed
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\NameServer
- old REG_SZ = 10.1.1.2,10.1.1.3
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\RawIpAllowedProtocols
- old REG_MULTI_SZ =
- 0
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\SubnetMask
- old REG_MULTI_SZ =
- 255.255.255.0
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\TcpAllowedPorts
- old REG_MULTI_SZ =
- 0
- reset SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{BD2859BA-B26A-4E2B-A3FE-3D246F90A81A}\UdpAllowedPorts
- old REG_MULTI_SZ =
- 0
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DontAddDefaultGatewayDefault
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\EnableIcmpRedirect
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\EnableSecurityFilters
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\SearchList
- deleted SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\UseDomainNameDevolution
- <completed>Note In Windows Server 2003 Service Pack 1, you can use the netsh winsock reset command to repair Winsock.
- #END LOG#
- So, this is all cool and everything but it doesn't always work.
- The next best thing to do is completely uninstall the TCP/IP protocol!
- First, if you browse to your network connections and right click on the "Local Area Connection" and choose "Properties" the Local Area Connection properties window is displayed. In this list you should see "Internet Protocol Version 4 (TCP/IPv4)". If you select it you will notice that the "Uninstall" option is greyed out.
- Now for the fun part!
- Browse to C:Windows\inf (make sure you can view all hidden files and protected operating system files)
- Locate the file "nettcpip.inf" and open it with Notepad (or whatever text editor you use).
- Locate this section:
- #BEGIN#
- ;=======================
- ; TCP/IP Primary Install
- ;=======================
- [MS_TCPIP.PrimaryInstall]
- ; TCPIP has properties to display
- Characteristics = 0xA0 ; NCF_HAS_UI | NCF_NOT_USER_REMOVABLE
- AddReg = Registry.MS_TCPIP.PrimaryInstall, Registry.MS_TCPIP, Registry.MS_TCPIP.Legacy
- #END#
- The line containing "Characteristics = 0xA0 ; NCF_HAS_UI | NCF_NOT_USER_REMOVABLE" change the "0xA0" to "0x80" and save the file.
- Now, go back to your Local Area Connection properties window and select "Install" > "Protocol" > "Add" > "Have disk" > "Browse..."
- Select the "nettcpip.inf" in the directory C:\Windows\inf
- After it installs the driver file the option "Uninstall" should be visible, instead of greyed out. Choose "Uninstall" on "Internet Protocol Version 4 (TCP/IPv4) and restart the machine.
- When the machine comes back up simply go back to your Local Area Connection properties window and select "Install" > "Protocol" > "Add" > "Have disk" > "Browse..."
- Select the "nettcpip.inf" in the directory C:\Windows\inf
- After the driver loads restart the machine once more. When it comes back up, you should have a working TCP/IP stack. The network card should have pulled a DHCP address and the "ipconfig" command should give you the correct output.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement