Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

What is a ping?

Malcolm

Administrator
Administrator
Staff Team
Code Plus
Company Plus
Hi Coders,

I have been working with the terminal a lot more now and have often heard of the term "Ping". I understand that it helps you determine if the server/domain can receive a connection (correct me if I am wrong) but however what does the information it displays really mean?
 
Solution
Windows or Linux? They display information differently.

Windows:
Code:
ping anzahcraft.de

Ping wird ausgeführt für anzahcraft.de [5.9.187.34] mit 32 Bytes Daten:
Antwort von 5.9.187.34: Bytes=32 Zeit=24ms TTL=51
Antwort von 5.9.187.34: Bytes=32 Zeit=24ms TTL=51
Antwort von 5.9.187.34: Bytes=32 Zeit=25ms TTL=51
Antwort von 5.9.187.34: Bytes=32 Zeit=24ms TTL=51

Ping-Statistik für 5.9.187.34:
    Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0
    (0% Verlust),
Ca. Zeitangaben in Millisek.:
    Minimum = 24ms, Maximum = 25ms, Mittelwert = 24ms

Linux:
Code:
ping anzahcraft.de
PING anzahcraft.de (5.9.187.34) 56(84) bytes of data.
64 bytes from web.anzah.network (5.9.187.34): icmp_seq=1 ttl=58 time=2.86 ms
64 bytes from web.anzah.network...
Windows or Linux? They display information differently.

Windows:
Code:
ping anzahcraft.de

Ping wird ausgeführt für anzahcraft.de [5.9.187.34] mit 32 Bytes Daten:
Antwort von 5.9.187.34: Bytes=32 Zeit=24ms TTL=51
Antwort von 5.9.187.34: Bytes=32 Zeit=24ms TTL=51
Antwort von 5.9.187.34: Bytes=32 Zeit=25ms TTL=51
Antwort von 5.9.187.34: Bytes=32 Zeit=24ms TTL=51

Ping-Statistik für 5.9.187.34:
    Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0
    (0% Verlust),
Ca. Zeitangaben in Millisek.:
    Minimum = 24ms, Maximum = 25ms, Mittelwert = 24ms

Linux:
Code:
ping anzahcraft.de
PING anzahcraft.de (5.9.187.34) 56(84) bytes of data.
64 bytes from web.anzah.network (5.9.187.34): icmp_seq=1 ttl=58 time=2.86 ms
64 bytes from web.anzah.network (5.9.187.34): icmp_seq=2 ttl=58 time=2.89 ms
^C
--- anzahcraft.de ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 3ms
rtt min/avg/max/mdev = 2.864/2.878/2.893/0.055 m

Windows always makes 4 requests unless you use the -t switch. Linux on the other hand makes infinite requests without using switches.

TTL= Time To Live
This is, so to speak, the lifetime of a data packet. Each router subtracts one unit; when 0 is reached, the packet is discarded. This is to ensure that a packet does not wander around the Internet endlessly.
The TTL-value is a value which is decremented by 1 every time a hop/router is passed.
If the TTL value is set too low (route runs through more hops than TTL value was high at the beginning), the packet "dies" before it reaches its destination. The hop at which the packet died :D then sends an ICMP message (time excceeded) back to the sender.

Time should be clear, this simply indicates the response time in ms.

Then the packet size and the IP of the server is specified.
 
Solution
A ping is a fundamental Internet tool enabling users to test and confirm the existence and accessibility of a specific destination IP address within computer network administration.

Thanks
 
Back
Top Bottom