如果您在“本地串連”屬性中顯示的此串連使用下列項目列表中單擊 網際網路通訊協定 (IP)(TCP/IP) 項, 您將發現卸載按鈕不可用(被禁用)。這是因為傳輸控制通訊協定/Internet協議 (TCP/IP) 堆棧是 Microsoft Windows Server 2003 的核心組件,不能刪除。
在有些情況下,可能需要重新安裝TCP/IP以使TCP/IP堆棧恢複為原始狀態。可以使用 NetShell 公用程式重設 TCP/IP 堆棧,使其恢複到初次安裝作業系統時的狀態。
NetShell公用程式(netsh)是一個命令列指令碼編寫工具,2144小遊戲您可以使用此公用程式配置並監視Windows Server 2003連網。此工具提供了互動式網路外殼程式介面。
您可以使用該公用程式的Internet協議(IP)上下文中的reset命令重寫以下與TCP/IP相關的登錄機碼:
SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/
SYSTEM/CurrentControlSet/Services/DHCP/Parameters/
運行此命令的結果與刪除並重新安裝 TCP/IP 協議的效果相同。
命令文法
netsh int ip reset [log_file_name]
要使用netsh 命令重設 TCP/IP 堆棧,您必須指定記錄命令結果的記錄檔的名稱。如果輸入了本文“命令樣本”一節中介紹的任一命令,當前電腦中的 TCP/IP 堆棧將被重設,且該xx作的活動將被記錄到命令列中指定的 Resetlog.txt 檔案。在第一個樣本中,3366小遊戲記錄檔被建立在當前檔案夾中;在第二個樣本中,則指定了 Resetlog.txt 記錄檔的完整路徑。
備忘:如果該檔案的名稱與目標檔案夾中的現有記錄檔的名稱相同,則會將新記錄檔的資訊附加到現有檔案的結尾處。
命令樣本
下面的樣本說明了如何使用netsh 命令重設 TCP/IP 協議堆棧。
樣本1
單擊開始,然後單擊運行。
在開啟框中鍵入 cmd,然後單擊確定。
在命令提示字元後鍵入以下命令,然後按 ENTER 鍵:
netsh int ip reset resetlog.txt
備忘:在上面的命令中,“int”是 interface 命令的縮寫形式。
鍵入 exit,然後按 ENTER 鍵。
樣本 2
單擊開始,然後單擊運行。
在開啟框中鍵入 cmd,然後單擊確定。
在命令提示字元後鍵入以下命令,然後按 ENTER 鍵:
netsh int ip reset c:/resetlog.txt
鍵入 exit,然後按 ENTER 鍵。
要查看有關命令的協助,請鍵入空格,2144小遊戲然後鍵入 ?。即會顯示有關netsh 命令子上下文中可用命令的其他協助。例如,要查看上一節中介紹的netsh 命令,應在命令提示字元後鍵入以下命令:
鍵入 netsh ?,然後按 ENTER 鍵。
鍵入 netsh int ?,然後按 ENTER 鍵。
鍵入 netsh int ip ?,然後按 ENTER 鍵。
鍵入 netsh int ip reset ?,然後按 ENTER 鍵。
NETSH INT IP RESET 的記錄檔樣本
以下是一個記錄檔的樣本,該記錄檔是由運行ip reset 命令後的netsh 產生的。根據發出命令的電腦上不同的配置,實際的記錄檔也會有所不同。通常,如果沒有替換TCP/IP登錄機碼的原始配置,則不會在檔案中記錄任何操作。
resetSYSTEM/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/DontAddDefaultGatewayDefau
lt
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