Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Ping Command Output  (Read 3577 times)

0 Members and 1 Guest are viewing this topic.

Zaeem

    Topic Starter


    Rookie

    Thanked: 1
    • Experience: Beginner
    • OS: Unknown
    Ping Command Output
    « on: September 12, 2011, 05:23:59 AM »
    If we are pinging with 56 bytes, why does it show 64 bytes when actually pinging?

    PING www.example.com (192.0.43.10) 56(84) bytes of data.
    64 bytes from 43-10.any.icann.org (192.0.43.10): icmp_seq=1 ttl=250 time=80.5 ms

    Similarly here:

    PING localhost (127.0.0.1) 100(128) bytes of data.
    108 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.022 ms

    Why is it showing 108 bytes instead of 100 bytes?

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Ping Command Output
    « Reply #1 on: September 12, 2011, 10:27:45 AM »
    Is tis a quiz?

    Salmon Trout

    • Guest
    Re: Ping Command Output
    « Reply #2 on: September 12, 2011, 11:11:38 AM »
    If we are pinging with 56 bytes, why does it show 64 bytes when actually pinging?

    PING www.example.com (192.0.43.10) 56(84) bytes of data.
    64 bytes from 43-10.any.icann.org (192.0.43.10): icmp_seq=1 ttl=250 time=80.5 ms

    Similarly here:

    PING localhost (127.0.0.1) 100(128) bytes of data.
    108 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.022 ms

    Why is it showing 108 bytes instead of 100 bytes?

    All ICMP packets have an 8 byte header and variable sized data section. The first 4 bytes of the header will be consistent. The first byte is for the ICMP type. The second byte is for the ICMP code. The third and fourth bytes are a checksum of the entire ICMP message. The contents of the remaining 4 bytes of the header will vary based on the ICMP type and code. In this case (ICMP echo request and replies), they will be composed of identifier (16 bits) and sequence number (16 bits).