Tuesday, 3 March 2020

PING

Packet Internet Gopher 

Tip - Gopher means status 

PING is a tool of IP upper layer protocol stack which is use to get the "Network Layer" Status ( IP Layer . Layer 3 Status)

Ping sends ICMP (Internet Control Message Protocol) echo packets to get network layer status .



Uses :-
=====================================================================
  • Ping is also used to check the connectivity 
  • To check the latency
  • To verify the link quality 
  • To troubleshoot the link related issues


Using PING on Windows OS


Example of Sucessful Ping 
======================================================================


C:\Users\NETTECHSTUFF>ping www.google.com

Pinging www.google.com [172.217.167.164] with 32 bytes of data:
Reply from 172.217.167.164: bytes=32 time=3ms TTL=57
Reply from 172.217.167.164: bytes=32 time=6ms TTL=57
Reply from 172.217.167.164: bytes=32 time=10ms TTL=57
Reply from 172.217.167.164: bytes=32 time=4ms TTL=57

Ping statistics for 172.217.167.164:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 3ms, Maximum = 10ms, Average = 5ms


Example of Failed  Ping 
======================================================================

C:\Users\NETTECHSTUFF>ping 10.1.1.1

Pinging 10.1.1.1 with 32 bytes of data:
Reply from 10.1.1.100: Destination host unreachable.
Reply from 10.1.1.100: Destination host unreachable.
Reply from 10.1.1.100: Destination host unreachable.
Reply from 10.1.1.100: Destination host unreachable.

Ping statistics for 10.1.1.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),


Example of  Command to get continues  Ping 
======================================================================

C:\Users\NETTECHSTUFF>ping www.google.com -t

Pinging www.google.com [172.217.167.164] with 32 bytes of data:
Reply from 172.217.167.164: bytes=32 time=3ms TTL=57
Reply from 172.217.167.164: bytes=32 time=3ms TTL=57
Reply from 172.217.167.164: bytes=32 time=4ms TTL=57
Reply from 172.217.167.164: bytes=32 time=4ms TTL=57
Reply from 172.217.167.164: bytes=32 time=4ms TTL=57
Reply from 172.217.167.164: bytes=32 time=9ms TTL=57
Reply from 172.217.167.164: bytes=32 time=3ms TTL=57
Reply from 172.217.167.164: bytes=32 time=6ms TTL=57
Reply from 172.217.167.164: bytes=32 time=9ms TTL=57
Reply from 172.217.167.164: bytes=32 time=2ms TTL=57
Reply from 172.217.167.164: bytes=32 time=3ms TTL=57
Reply from 172.217.167.164: bytes=32 time=3ms TTL=57
Reply from 172.217.167.164: bytes=32 time=5ms TTL=57

Example of  Command to check ping with number of echo packets
======================================================================

C:\Users\NETTECHSTUFF>ping www.google.com -n 10

Pinging www.google.com [172.217.167.164] with 32 bytes of data:
Reply from 172.217.167.164: bytes=32 time=8ms TTL=57
Reply from 172.217.167.164: bytes=32 time=4ms TTL=57
Reply from 172.217.167.164: bytes=32 time=11ms TTL=57
Reply from 172.217.167.164: bytes=32 time=4ms TTL=57
Reply from 172.217.167.164: bytes=32 time=3ms TTL=57
Reply from 172.217.167.164: bytes=32 time=4ms TTL=57
Reply from 172.217.167.164: bytes=32 time=11ms TTL=57
Reply from 172.217.167.164: bytes=32 time=8ms TTL=57
Reply from 172.217.167.164: bytes=32 time=28ms TTL=57
Reply from 172.217.167.164: bytes=32 time=3ms TTL=57

Ping statistics for 172.217.167.164:
    Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 3ms, Maximum = 28ms, Average = 8ms

Example of  Command to check ping with defined buffer size of echo packet.
======================================================================

C:\Users\NETTECHSTUFF>ping www.google.com -l 26

Pinging www.google.com [172.217.174.228] with 26 bytes of data:
Reply from 172.217.174.228: bytes=26 time=4ms TTL=57
Reply from 172.217.174.228: bytes=26 time=7ms TTL=57
Reply from 172.217.174.228: bytes=26 time=5ms TTL=57
Reply from 172.217.174.228: bytes=26 time=4ms TTL=57

Ping statistics for 172.217.174.228:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 4ms, Maximum = 7ms, Average = 5ms


OTHER OPTIONS 
=======================================================================

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name

Options:
    -t             Ping the specified host until stopped.
                   To see statistics and continue - type Control-Break;
                   To stop - type Control-C.
    -a             Resolve addresses to hostnames.
    -n count       Number of echo requests to send.
    -l size        Send buffer size.
    -f             Set Don't Fragment flag in packet (IPv4-only).
    -i TTL         Time To Live.
    -v TOS         Type Of Service (IPv4-only. This setting has been deprecated
                   and has no effect on the type of service field in the IP Header).
    -r count       Record route for count hops (IPv4-only).
    -s count       Timestamp for count hops (IPv4-only).
    -j host-list   Loose source route along host-list (IPv4-only).
    -k host-list   Strict source route along host-list (IPv4-only).
    -w timeout     Timeout in milliseconds to wait for each reply.
    -R             Use routing header to test reverse route also (IPv6-only).
    -S srcaddr     Source address to use.
    -4             Force using IPv4.
    -6             Force using IPv6.



Thanks for Reading !!!!!!
 BEST OF LUCK !!!!!!!!!!!!!!!!!!


No comments:

Post a Comment