论坛: 电脑门诊 标题: ADSL代理上网部分网站无法浏览的解决办法 复制本贴地址    
作者: yoyo989898 [yoyo989898]    论坛用户   登录
通过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.

另:据网友反映,将SAGATE升级到4.0以上版本也可解决有关问题。
以上转至广州社区adsl版



地主 发表时间: 06-04-26 15:30

论坛: 电脑门诊

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号