ADSL代理上網部分網站無法瀏覽的解決辦法 通過ADSL代理上網有些站點上不去的原因與解決辦法 為什麼通過ADSL代理上網有些站點上不去,現在找到了原因: 這是由於M$的Windows系列傳送的TCP包請求的segment太大,超出PPPoE的 frame所能夠接受的範圍,導致PPPoE傳送「don't fragment」的ICMP而不 是「must fragment」,最終導致網站沒有回應。 這種情況稱為Black Hole Router,以下是解決辦法: 通過修改客戶端的MaxMTU的值為1450(十進制) (1)在Win9X下面可以通過修改MaxMTU為1450避免這種情況的發生,改註冊表 就可以了(當然也可以通過工具完成) HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\ NetTrans\0000\ 主鍵下面建立字元串鍵名為MaxMTU,鍵值為1450(十進制)。 (2)在WinNT4.0下面更改MaxMTU的方法: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ 中建立MTU鍵名,類型是REG_DWORD,鍵值為1450(十進制) (3)在Win2000下面更改MaxMTU的方法: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ Interfaces\<ID for Adapter> 中建立MTU鍵名,類型是REG_DWORD,鍵值為1450(十進制) 重新啟動後可以很正常的瀏覽諸如21cn.com/sina.com.cn等 本來不能夠正常開啟的頁面。 附:相關英文資料 Q: Why do MacOS and Windows 98 connections freeze when running PPPoE on the gateway A: Thanks to Michael Wozniak <mwozniak@netcom.ca> for figuring this out and Dan Flemming <danflemming@mac.com> for the Mac solution: This is due to what's called a "Black Hole" router. MacOS and Windows 98 (and maybe other Microsoft OSs) send TCP packets with a requested segment size too big to fit into a PPPoE frame (MTU is 1500 by default for ethernet) and have the "don't fragment" bit set (default of TCP) and the Telco router is not sending ICMP "must fragment" back to the www site you are trying to load. When the www server is sending you frames that don't fit into the PPPoE pipe the Telco router drops them on the floor and your page doesn't load (some pages/graphics do as they are smaller than a MSS.) This seems to be the default of most Telco PPPoE configurations (if only they knew how to program a router... sigh...) One fix is to use regedit on your 95/98 boxes to add the following registry entry... HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\NetTrans\0000\MaxMTU It should be a string with a value ``1450'' (more accurately it should be ``1464'' to fit TCP packets into a PPPoE frame perfectly but the ``1450'' gives you a margin of error for other IP protocols you may encounter). Refer to MS KB # ``Q158474 - Windows TCPIP Registry Entries'' and ``Q120642 - TCPIP & NBT Configuration Parameters for Windows NT '' for more information on changing Windoze MTU to work with a NAT/PPPoE router. Unfortunately, MacOS does not provide an interface for changing TCP/IP settings. However, there is commercial software available, such as OTAdvancedTuner (OT for OpenTransport, the MacOS TCP/IP stack) by Sustainable Softworks, that will allow users to customize TCP/IP settings. MacOS NAT users should select ip_interface_MTU from the drop-down menu, enter 1450 instead of 1500 in the box, click the box next to Save as Auto Configure, and click Make Active. From msdn.microsoft.com 1.MS KB # ``Q158474 - Windows TCPIP Registry Entries'' The entries in this section must be added to the following registry key, where n represents the particular TCP/IP-to-network adapter binding. HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\netTrans\000n MaxMTU = 16-bit integer Data Type: String Specifies the maximum size datagram IP that can pass to a media driver. SNAP and source routing headers (if used on the media) are not included in this value. For example, on an Ethernet network, MaxMTU will default to 1500. The actual value used will be the minimum of the value specified with this parameter and the size reported by the media driver. The default is the size reported by the media driver. 2.MS KB #``Q120642 - TCPIP & NBT Configuration Parameters for Windows NT '' The information in this article applies to: Microsoft Windows NT Workstation versions 3.5, 3.51, 4.0 Microsoft Windows NT Server versions 3.5, 3.51, 4.0 Microsoft Windows 2000 Professional Microsoft Windows 2000 Server Microsoft Windows 2000 Advanced Server MORE INFORMATION WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows NT to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk. To change these parameters, use the following procedure: Run Registry Editor (REGEDT32.EXE). From the HKEY_LOCAL_MACHINE subtree, go to the following key: \SYSTEM\CurrentControlSet\Services. Add a value to the key described in the appropriate entry below, by selecting "Edit -> Add Value", typing in the value, and using the "Data Type" checkbox to set the value type. Select OK. Exit the Registry Editor. Reboot the system to make the change take effect. All of the TCP/IP parameters are registry values located under one of two different subkeys of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters <Adapter Name>\Parameters\Tcpip where <Adapter Name> refers to the subkey for a network adapter that TCP/IP is bound to, such as Lance01. Values under the latter key(s) are specific to each adapter. Parameters for which there may be both a DHCP and statically configured value may or may not exist depending on whether the system/adapter is DHCP configured and/or static override values have been specified. A reboot of the system is required for a change in any of these parameters to take effect. IMPORTANT NOTE: The Windows NT 3.5 Resource Kit documentation was not updated properly from version 3.1, and lists a number of incorrect TCP/IP registry parameters. The parameters listed in this document should be used in their place. The Windows NT 3.5 TCP/IP stack was a complete re-write, so many of the old parameters are no longer valid. MTU Key: <Adapter Name>\Parameters\Tcpip NOTE: In Windows 2000 this value is under the following key: Key: Tcpip\Parameters\Interfaces\<ID for Adapter> Value Type: REG_DWORD Number Valid Range: 68 - <the MTU of the underlying network> Default: 0xFFFFFFFF Description: This parameter overrides the default Maximum Transmission Unit (MTU) for a network interface. The MTU is the maximum packet size in bytes that the transport will transmit over the underlying network. The size includes the transport header. Note that an IP datagram may span multiple packets. Values larger than the default for the underlying network will result in the transport using the network default MTU. Values smaller than 68 will result in the tranport using an MTU of 68. 作者:懶人 |