LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 842|回复: 1

arch 中一个网络故障的解决

[复制链接]
发表于 2006-9-12 22:04:45 | 显示全部楼层 |阅读模式
放寒假时发现的问题
原帖子在http://www.linuxsir.cn/bbs/showthread.php?t=264158
tingXX兄弟似乎也遇到了
http://www.linuxsir.cn/bbs/showthread.php?t=269867

主要表现就是能ping到对方机器,但就是连接不上.windows下可以连接.
2.6.17内核.

解决方法,在
/etc/sysctl.conf添加
  1. net.ipv4.tcp_window_scaling = 0
复制代码

即可
具体参见maillist
Message: 2
Date: Fri, 8 Sep 2006 23:11:18 +0200
From: "Jose M. Prieto" <jmprieto@gmx.net>
Subject: [arch] Kernel 2.6.17 and TCP window scaling
To: arch@archlinux.org
Message-ID: <200609082311.18715.jmprieto@gmx.net>
Content-Type: text/plain;  charset="us-ascii"

Hi, after some time running a custom 2.6.15 kernel, yesterday, I decided to
upgrade to stock kernel26-2.6.17.11-1.

I rebooted and all seemed to work fine until I opened a browser and noticed I
couldn't connect to the internet. Nothing in the system logs nor in dmesg
catched my attention and, according to ifconfig, the network interface was
up. So, at first, I thought my crappy DSL router had died. I tried to connect
to its web interface with no luck... but I could ping it and I could ping
internet sites, even using DNS names. In some moment I realized that there is
one fundamental difference between ping, dns and http or ftp: ping uses ICMP
and dns uses UDP, while http and ftp use TCP.

After booting with an older kernel and doing some googling (without any
network issue) I found the source of the problem [1]. A change in the way the
kernel calculates TCP buffer sizes has caused it to use TCP window scaling by
default under some circumstances. Window scaling is an old standard, but
anyway it seems some modern equipment (such as my router) still can't handle
it. There are several posts in the mailing list [2] and in the forums which
seem to be related to this [3,4,5,6] (some regarding kernel 2.6.8, as that
version introduced a similar change that was reverted or somehow fixed
later).

TCP window scaling can be disabled by setting the kernel parameter
net.ipv4.tcp_window_scaling to 0 (I am sending this email from a 2.6.17,
after adding that setting to /etc/sysctl.conf). Disabling window scaling will
only slightly affect performance over high speed, long distance network
links, while having it enabled will greatly affect performance much more
often. So I think it would be wise to disable it in the default sysctl.conf.
If someone wants window scaling (s)he can comment out the line.

[1] http://kerneltrap.org/node/6723
[2] http://www.archlinux.org/pipermail/arch/2006-June/011250.html
[3] http://bbs.archlinux.org/viewtopic.php?t=24248
[4] http://bbs.archlinux.org/viewtopic.php?t=22818
[5] http://bbs.archlinux.org/viewtopic.php?t=22743
[6] http://bbs.archlinux.org/viewtopic.php?t=6188
发表于 2006-9-13 08:14:44 | 显示全部楼层
终于看到解决方法了 苦闷了这么久
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表