首 页文章中心

Linux学习网

您的位置Linux学习网 > Linux综合 > 文章内容

Linux 2.4.20 以后内核的ECN问题

作者:佚名  来源:不详  发布时间:2007-12-21 16:46:00
问题描述: UE9Linux联盟
在安装了2.4.20以后内核的Linux,在连接如意通邮箱的smtp端口的时候,出现timeout的问题。在2.4.18内核和其他操作系统上没有这个问题。 UE9Linux联盟
UE9Linux联盟
Dec 14 17:10:58 mail1 postfix/smtp[5286]: D624020108F: to=, relay=none, delay=33, status=deferred (connect to smtp.ruyi.com[211.97.168.172]: Connection timed out) UE9Linux联盟
UE9Linux联盟
cz:~# telnet smtp.ruyi.com 23 UE9Linux联盟
Trying 211.97.168.172... UE9Linux联盟
telnet: Unable to connect to remote host: Connection timed out UE9Linux联盟
UE9Linux联盟
UE9Linux联盟
问题原因: UE9Linux联盟
在2.4.20以后的内核里面,增加了一个 ECN 功能: UE9Linux联盟
TCP Explicit Congestion Notification support UE9Linux联盟
CONFIG_INET_ECN UE9Linux联盟
Explicit Congestion Notification (ECN) allows routers to notify UE9Linux联盟
clients about network congestion, resulting in fewer dropped packets UE9Linux联盟
and increased network performance. This option adds ECN support to UE9Linux联盟
the Linux kernel, as well as a sysctl (/proc/sys/net/ipv4/tcp_ecn) UE9Linux联盟
which allows ECN support to be disabled at runtime. UE9Linux联盟
UE9Linux联盟
Note that, on the Internet, there are many broken firewalls which UE9Linux联盟
refuse connections from ECN-enabled machines, and it may be a while UE9Linux联盟
before these firewalls are fixed. Until then, to access a site UE9Linux联盟
behind such a firewall (some of which are major sites, at the time UE9Linux联盟
of this writing) you will have to disable this option, either by UE9Linux联盟
saying N now or by using the sysctl. UE9Linux联盟
UE9Linux联盟
这个功能在和有些老的防火墙通讯的时候,会产生问题。 UE9Linux联盟
UE9Linux联盟
UE9Linux联盟
解决办法: UE9Linux联盟
1) UE9Linux联盟
echo "0" > /proc/sys/net/ipv4/tcp_ecn UE9Linux联盟
2) UE9Linux联盟
sysctl -w net.ipv4.tcp_ecn=0 UE9Linux联盟
3)编辑 /etc/sysctl.conf UE9Linux联盟
net.ipv4.tcp_ecn=0 UE9Linux联盟
4)编译内核的时候,去掉 ECN 选项 UE9Linux联盟
收藏本页到: 365Key | del.icio.us | | 添加到雅虎收藏+
  • 网站帮助 - 广告合作 - 网站地图