由 d_hui 在 06-26-2004 19:56 发表:
RedHatLinux9 ADSL 部分网站上不去!帮忙!
操作系统是RedHatLinux9,ADSL上网方式,拨号软件为操作系统自带,部分网站上不去,而换成WindowsXP则全部都能上去!请兄弟们帮忙指教,谢谢!!!
由 Snoopy 在 06-26-2004 21:04 发表:
部分网站上不了 ? 已经拨上去了对吧,
看下/etc/resolv.conf里dns
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 faint 在 06-26-2004 23:09 发表:
如果dns设置正确,还有那些网站能ping 通的情况下,但就是不能用浏览器上去。出现这种情况应该就是MTU的问题。把adsl的MTU减小些。好像前些日子这里有个讨论.
由 Snoopy 在 06-27-2004 00:11 发表:
可一般来说,他用默认的,怎么会去修改mtu呢 ?
兄弟改改看看是否问题出在MTU ?
加到vi /etc/sysconfig/network-scripts/ifcfg-eth0
MTU=
数值 68>1500
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 faint 在 06-27-2004 00:32 发表:
这个在配置adsl的时候就可有吧。没有用过RH,应该会有这个选项。
$sudo grep mtu /etc/ppp/peers/dsl-provider
mtu 1492
$
这个我的adsl的设置的值。
下面是我引述别人的一段话:“
> quote:
>
> * * *
>
>
>
> 为了充分利用链路,最好在发送数据包时让每个包的大小为整个链路中最小的MTU,一般情况下就是以太网的1500字节。但是,如果中间有隧道 VPN或PPPoE等链路,这段的MTU比1500要小一点点。系统工作时找出最小的MTU采用如下过程(Path MTU Discovery):
>
> 建立tcp连接的syn 和syn+ack包中,带有一个MSS(Max Segment Size)选项,MSS为本地接口的MTU-IP包头-TCP包头。这样,tcp的client和server端都有一个MSS,以后发送tcp数据包时,按照MSS分段,最终的数据链路层的包包大小正好是MTU,并且这些IP包中都有DF(Dont Fragment)位,如果中间某条链路的MTU比较小,这些数据包如果要正常传输必需要 分片,由于设置了DF位,数据包会被丢弃,而返回一个icmp frag needed数据包给源发送站点,源发送站点接到这个icmp包后会减小MSS,直到能正常通信。
>
>
>
> 如果有原因导致icmp数据包被丢弃,以上工作过程就不能正常进行,表现出来就是稍微大点的tcp数据包无法传输,直接表现就是能ping通,甚至tcp 能connect,但是访问主页无法工作。这种现象称为Path MTU Discovery blackhole,再google上能查到更详细的描述,RFC2923也讲了这个。
>
>
>
> * * *
我觉得这个说得清楚,也很有道理。
另外如果楼主用到ipables的话,可以看看man iptables,也有这么一段:
> quote:
>
> * * *
>
>
>
> TCPMSS
>
> This target allows to alter the MSS value of TCP SYN packets, to control the maximum size for that connection (usu-
>
> ally limiting it to your outgoing interface's MTU minus 40). Of course, it can only be used in conjunction with -p
>
> tcp.
>
> This target is used to overcome criminally braindead ISPs or servers which block ICMP Fragmentation Needed packets.
>
> The symptoms of this problem are that everything works fine from your Linux firewall/router, but machines behind it
>
> can never exchange large packets:
>
> 1) Web browsers connect, then hang with no data received.
>
> 2) Small mail works fine, but large emails hang.
>
> 3) ssh works fine, but scp hangs after initial handshaking.
>
> Workaround: activate this option and add a rule to your firewall configuration like:
>
> iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
>
> -j TCPMSS --clamp-mss-to-pmtu
>
>
>
> --set-mss value
>
> Explicitly se