DEV Community

Cover image for why ping pong ?
Israel-Lopes
Israel-Lopes

Posted on • Updated on

why ping pong ?

Acronym for Packet Internet Network Groper, something like packet locator on the internet network

The result is given in a unit of time, usually a few milliseconds. The higher the PING value, the slower the transmission of information within that network and the more difficult it is to synchronize data in real time, which may explain why your connection to the internet or other company computers is so poor.

Using "ping"

root@example:~# ping -c4 yahoo.co.jp 

PING yahoo.co.jp (182.22.25.124) 56(84) bytes of data.
64 bytes from 182.22.25.124 (182.22.25.124): icmp_seq=1 ttl=44 time=308 ms
64 bytes from 182.22.25.124 (182.22.25.124): icmp_seq=2 ttl=44 time=307 ms
64 bytes from 182.22.25.124 (182.22.25.124): icmp_seq=3 ttl=44 time=304 ms
64 bytes from 182.22.25.124 (182.22.25.124): icmp_seq=4 ttl=44 time=313 ms

--- yahoo.co.jp ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 303.824/308.021/313.393/3.451 ms

Enter fullscreen mode Exit fullscreen mode
  • In this example, a ping is sent to the given address, it returns pong.
    • Pong is the response that the server machine sent to the recipient who made the request.
  • [rtt] Round Triple Time. And the round-trip response time.
  • [ttl=49] And lifetime a package can have. It is produced by the operating system and placed inside the ip packet, and each router that it passes "Hop" loses 1. If it reaches zero, this router that took it, has to destroy this packet and inform the origin that the ttl has expired.

Operating systems have a default ttl.

  • Unix and derivatives have ttl 255
  • Windows 128
  • Linux 64

In this case it is possible to know that the server to which the packet was sent is a Linux.

Analyzing this case, let's see: For each router that the packet passed, until it got here it lost 1, it had an average of 30 "Hop" hops. Knowing that it doesn't take more than 30 hops to cross the world, we could say that it would have 30 + 49 = 79.

Based on that we could reach 128 or 64 of ttl. In this case the most plausible option is ttl=64.

In cases where the ttl can be changed, thus making the analysis difficult.

Let's see the example:

root@example:~# cat /proc/sys/net/ipv4/ip_default_ttl

64
root@example:~#
Enter fullscreen mode Exit fullscreen mode
  • The /proc directory controls kernel properties.
  • If you change the value from 64 to 50, for example, the ttl of the packages will be set to 50.

Texto alternativo da imagem)

Top comments (0)