Ping
You can use it to check IP connectivity between two network devices.
The ping command uses Internet Control Message Protocol (ICMP), which is a Layer 4 protocol.


The syntax of the ping command:
ping [ -t ] [-n count ] [ -l size ] [ -f ] [ -i TTL ] [ -S srcaddr ] target_name

-t -> This option repeatedly sends pings (ICMP echo messages) until you stop it by pressing Ctrl+C.
-n count -> This option specifies the number of pings to send.
-f -> This option sets the don’t fragment bit in a packet’s header. If the packet tries to cross a router that attempts to fragment the packet, the packet is dropped, and an ICMP error message is returned.
-i TTL ->This option sets the TTL value in a packet’s header. The TTL is decremented for each router hop. A packet is discarded when its TTL value reaches 0.
-S srcaddr -> If the PC from which you are issuing the ping command has more than one IP address, this option allows you to specify the source IP address from which the ICMP echo messages should be sent.
target_name -> This option specifies the name or the IP address of the device to which you are sending ICMP echo messages.