我有D-LinkDSL-2500U/BRU/D,ADSL模式是"ADSL2+ AnnexM EU-56",配置为桥接器并连接到linux (Gentoo)工作站。线路足够好,我有稳定的速度2.09MiB/秒(约18-20 20Mbps).但是,我只能在下载急流或使用多个连接(比如并行运行几个wget进程)下载一些东西时才能看到这种速度。
单个wget进程平均从任何地方下载200‘ve/秒(比如kernel.org或其他我尝试过的服务器)。当wget启动时,它可能会以400至500 may的速度开始下载,但很快就会将下载速度降低到大约100 may,然后缓慢地将下载速度提高到150-200 may。当然,这个问题适用于任何一个tcp连接,而不仅仅是wget。
我也尝试过kernel.org in WinXP SP3,以及OpenSUSE-11.3、Ubuntu-9.04和Ubuntu-6.10的LiveCD,只是为了排除Gentoo工作站配置错误的可能性。在所有这些操作系统中,我都看到了同样的问题--单个wget无法以200 line /秒的速度下载,但我可以以这样的速度同时运行几个wget,因此它不受ADSL线路的限制。
最初我认为这个问题是因为某个ISP的整形器,但后来我发现WinSeven能够以每秒1-2米的速度从kernel.org中获得!另外,我也尝试过将调制解调器从桥接模式切换到路由器模式,在我的Gentoo中获得了1-2MiB/秒的单次wget,所以这个问题可能与ISP无关。
在eth0上,MTU设置为1500,在ppp0上设置为1492。我注意到WinSeven在pppoe接口上使用MTU 1480,并在linux上尝试了相同的值--这没有帮助。此外,我还尝试使用sysctl (rmem/wmem/等等)进行不同的tcp优化--也没有成功。
有什么想法吗?如何在不把调制解调器从网桥切换到路由器的情况下解决这个问题?
发布于 2010-08-02 09:42:14
可能是PPPoE客户端上的MTU问题。
pppoe的手册建议使用-m选项将TCP段大小限制为1412:
-m MSS
Causes pppoe to clamp the TCP maximum segment size at the specified value. Because of PPPoE overhead,
the maximum segment size for PPPoE is smaller than for normal Ethernet encapsulation. This could cause
problems for machines on a LAN behind a gateway using PPPoE. If you have a LAN behind a gateway, and the
gateway connects to the Internet using PPPoE, you are strongly recommended to use a -m 1412 option. This
avoids having to set the MTU on all the hosts on the LAN.https://serverfault.com/questions/166062
复制相似问题