zoukankan      html  css  js  c++  java
  • TCP/IP 笔记 7 Ping

    lenovo-myc@lenovomyc-Lenovo-Product:~$ ping www.baidu.com
    PING www.a.shifen.com (123.125.65.82) 56(84) bytes of data.    这句出现前的延时,为DNS对域名的解析时间
    64 bytes from 123.125.65.82: icmp_seq=1 ttl=50 time=2.60 ms    这句time如果较长,可能是发送ARP请求和接受ARP应答所花的时间
    64 bytes from 123.125.65.82: icmp_seq=2 ttl=50 time=3.36 ms
    64 bytes from 123.125.65.82: icmp_seq=3 ttl=50 time=2.38 ms
    64 bytes from 123.125.65.82: icmp_seq=4 ttl=50 time=2.75 ms
    64 bytes from 123.125.65.82: icmp_seq=5 ttl=50 time=3.64 ms
    ^C
    --- www.a.shifen.com ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4006ms
    rtt min/avg/max/mdev = 2.382/2.950/3.647/0.480 ms
    
    
    lenovo-myc@lenovomyc-Lenovo-Product:~$ ping 123.125.65.78
    PING 123.125.65.78 (123.125.65.78) 56(84) bytes of data.
    64 bytes from 123.125.65.78: icmp_seq=1 ttl=50 time=2.45 ms
    64 bytes from 123.125.65.78: icmp_seq=2 ttl=50 time=2.35 ms
    64 bytes from 123.125.65.78: icmp_seq=3 ttl=50 time=2.19 ms
    64 bytes from 123.125.65.78: icmp_seq=4 ttl=50 time=2.94 ms
    64 bytes from 123.125.65.78: icmp_seq=5 ttl=50 time=2.59 ms
    64 bytes from 123.125.65.78: icmp_seq=6 ttl=50 time=2.71 ms
    64 bytes from 123.125.65.78: icmp_seq=7 ttl=50 time=2.57 ms
    ^C
    --- 123.125.65.78 ping statistics ---
    7 packets transmitted, 7 received, 0% packet loss, time 6008ms
    rtt min/avg/max/mdev = 2.193/2.547/2.947/0.232 ms

    ping -s packetsize 指定数据包大小,默认为56

       -s packetsize
                  Specifies  the  number of data bytes to be sent.  The default is
                  56, which translates into 64 ICMP data bytes when combined  with
                  the 8 bytes of ICMP header data.

    lenovo-myc@lenovomyc-Lenovo-Product:~$ ping -s 4 www.baidu.com
    PING www.a.shifen.com (220.181.112.244) 4(32) bytes of data.
    12 bytes from 220.181.112.244: icmp_seq=1 ttl=45
    12 bytes from 220.181.112.244: icmp_seq=2 ttl=45
    12 bytes from 220.181.112.244: icmp_seq=3 ttl=45
    12 bytes from 220.181.112.244: icmp_seq=4 ttl=45
    12 bytes from 220.181.112.244: icmp_seq=5 ttl=45
    ^C
    --- www.a.shifen.com ping statistics ---
    6 packets transmitted, 5 received, 16% packet loss, time 5006ms

    查看中间路由。。。没找到可以测的网址

    lenovo-myc@lenovomyc-Lenovo-Product:~$ ping -R www.baidu.com
    PING www.a.shifen.com (220.181.111.188) 56(124) bytes of data.
    64 bytes from 220.181.111.188: icmp_seq=1 ttl=45 time=186 ms
    NOP
    RR:     220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
    
    64 bytes from 220.181.111.188: icmp_seq=2 ttl=45 time=184 ms
    NOP
    RR:     220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
    
    64 bytes from 220.181.111.188: icmp_seq=3 ttl=45 time=178 ms
    NOP
    RR:     220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
    
    64 bytes from 220.181.111.188: icmp_seq=4 ttl=45 time=176 ms
    NOP
    RR:     220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
        220.181.111.188
    
    ^C
    --- www.a.shifen.com ping statistics ---
    5 packets transmitted, 4 received, 20% packet loss, time 4006ms
    rtt min/avg/max/mdev = 176.328/181.574/186.643/4.214 ms

    ping同一个网段

    lenovo-myc@lenovomyc-Lenovo-Product:~$ ping -R 10.100.156.2
    PING 10.100.156.2 (10.100.156.2) 56(124) bytes of data.
    64 bytes from 10.100.156.2: icmp_seq=1 ttl=255 time=2.30 ms
    NOP
    RR:     10.100.156.2
        10.100.156.2
        10.100.156.2
        10.100.156.2
    
    64 bytes from 10.100.156.2: icmp_seq=2 ttl=255 time=2.53 ms
    NOP    (same route)
    64 bytes from 10.100.156.2: icmp_seq=3 ttl=255 time=1.11 ms
    NOP    (same route)
    64 bytes from 10.100.156.2: icmp_seq=4 ttl=255 time=4.45 ms
    NOP    (same route)
    ^C
    --- 10.100.156.2 ping statistics ---
    5 packets transmitted, 4 received, 20% packet loss, time 4005ms
    rtt min/avg/max/mdev = 1.110/2.602/4.459/1.200 ms
  • 相关阅读:
    Struts初探(二)
    struts2初探(一)
    css样式表设置
    css美化Div边框的样式实例
    CSS中background样式的repeat和no-repeat
    嘘,如何激活更新的win10
    学习向上转型和向下转型的一个好例子
    atom插件安装引发的nodejs和npm安装血案
    Java--Inheritance constructor继承中的构造方法问题(二)
    Java--Inheritance constructor继承中的构造方法问题(一)
  • 原文地址:https://www.cnblogs.com/maxiaodoubao/p/4708807.html
Copyright © 2011-2022 走看看