net.ipv4.ip_default_ttl = 64

由 devel 在 02-29-2004 19:12 发表:

net.ipv4.ip_default_ttl = 64

上面的TTL是64,怎么我PING是这样:

64 bytes from 218.30.12.178: icmp_seq=1 ttl=53 time=93.3 ms

64 bytes from 218.30.12.178: icmp_seq=2 ttl=53 time=94.4 ms

怎么不是64呢?郁闷ING

我改为其他的值也是53,难道要在加载内核前设置,那怎么设置呢?


明明白白我的心!!


由 Snoopy 在 03-01-2004 13:04 发表:


root: /home $ vi /etc/sysctl.conf

在里面添加这句,net.ipv4.ip_default_ttl=53

root: /home $ sysctl -p /etc/sysctl.conf

另外我想问下,,你是如何ping自己?ping localhost 还是ping ip ?


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


由 devel 在 03-01-2004 17:43 发表:


我在/etc/sysctl.conf加上了的,PING LOCALHOST就是自己设的TTL,PING REMOTE_HOST就是53,还是没有因我改了net.ipv4.ip_default_ttl 而改变?


明明白白我的心!!


由 seablue 在 03-01-2004 17:56 发表:


是不是对方的ttl就是53啊

晕~~~

我现在竟然ping不通[url]www.linuxsir.com,但可以上网 [/url]

什么网站都ping不通了,好象很久以前设置了什么安全措施,忘了在哪儿了


清风秋月黑白子,

解语生香共婵娟。


由 devel 在 03-01-2004 18:34 发表:


> quote: > > * * * > > 最初由 seablue 发表
>
> **是不是对方的ttl就是53啊
>
>
>
> 晕~~~
>
> 我现在竟然ping不通[url]www.linuxsir.com,但可以上网 [/url]
>
> 什么网站都ping不通了,好象很久以前设置了什么安全措施,忘了在哪儿了 ** > > * * *

不会是的。。看输出那里是看自己的包。。

要IGNORE ping和broadcast 是这样:

echo 1>/proc/sys/net/ipv4/icmp_echo_ignore_all

echo 1>/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

这是RedHat 9的作法

奇怪,偶的PING怎么被限死了。中了毒??

ping -t 132 www.sina.com.cn

PING antares.sina.com.cn (218.30.12.185) 56(84) bytes of data.

64 bytes from 218.30.12.185: icmp_seq=1 ttl=53 time=93.8 ms

64 bytes from 218.30.12.185: icmp_seq=2 ttl=53 time=95.0 ms

64 bytes from 218.30.12.185: icmp_seq=3 ttl=53 time=94.1 ms


明明白白我的心!!


由 seablue 在 03-01-2004 18:44 发表:


> > 源码: >
> * * * >
>
> > > [linuxer@mydesktop linuxer]$ cat /proc/sys/net/ipv4/icmp_echo_ignore_all
> > > 0
> > > [linuxer@mydesktop linuxer]$ cat /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
> > > 0
> > >
>
> * * *

我的没有限制,但还是ping外面都不通

好象有一篇文章是说从ttl辨别对方系统的类型的,可以搜索一下;所以ttl应该是对方的值,不知道对否


清风秋月黑白子,

解语生香共婵娟。


由 devel 在 03-01-2004 18:49 发表:


> quote: > > * * * > > 最初由 seablue 发表
>
> ** > >> >> 源码: >>
>> * * * >>
>>
>> > >> [linuxer@mydesktop linuxer]$ cat /proc/sys/net/ipv4/icmp_echo_ignore_all
>> > >> 0
>> > >> [linuxer@mydesktop linuxer]$ cat /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
>> > >> 0
>> > >>
>>
>> * * * > >
>
> 我的没有限制,但还是ping外面都不通
>
>
>
> 好象有一篇文章是说从ttl辨别对方系统的类型的,可以搜索一下;所以ttl应该是对方的值,不知道对否 ** > > * * *

可能是ISP把PING限制了。。 你PING别的网站看看。。PING www.linuxsir.com我不行。。

CU有一篇,,但回贴的说能改变TTL的值,所以不能判断是什么系统。。那主题是你发的?

能改变的。不知道怎么会这样:

**

> > 源码: >
> * * * >
>
> > > # ping -t 9 218.30.19.242
> > > PING 218.30.19.242 (218.30.19.242) 56(84) bytes of data.
> > > 64 bytes from 218.30.19.242: icmp_seq=1 ttl=247 time=98.2 ms
> > > 64 bytes from 218.30.19.242: icmp_seq=2 ttl=247 time=94.5 ms
> > > 64 bytes from 218.30.19.242: icmp_seq=3 ttl=247 time=94.8 ms
> > >
>
> * * *

<font face="腩戾,verdana, arial, helvet **

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus