标签:
目的:学习linux命令ping,traceroute的用法
1:ping的用法:
man ping
ping:判断某个主机是否有响应
linux-8o9i:~ # ping -c 4 119.29.29.29
PING 119.29.29.29 (119.29.29.29) 56(84) bytes of data.
64 bytes from 119.29.29.29: icmp_seq=1 ttl=51 time=101 ms
64 bytes from 119.29.29.29: icmp_seq=2 ttl=51 time=75.0 ms
64 bytes from 119.29.29.29: icmp_seq=3 ttl=51 time=74.4 ms
64 bytes from 119.29.29.29: icmp_seq=4 ttl=51 time=74.2 ms
--- 119.29.29.29 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 74.249/81.303/101.454/11.638 ms
64bytes:传输的icmp包大小数值
icmp_seq=1:侦测的次数
ttl:生存时间,每经过一个路由,数值减1,初始值为:64
time:响应时间,数值越小,网络联机状况越好
ping- 向网络主机发送ICMP回显请求
-c:计数器
-b (后面接broadcast的ip,查询某个网域内有哪些活动主机)
2:traceroute的用法:
man traceroute
traceroute:追踪路由(节点)
-n:不经过解析,只显示ip
linux-8o9i:~ # traceroute -n 119.29.29.29
通常情况下,网络上很多防火墙和主机会将tracetoute通过的权利屏蔽掉,所以会显示*
标签:
原文地址:http://www.cnblogs.com/supker/p/4880939.html