If you have a website, sometimes it goes down, it goes out. Pinging seems old school when one can easily use one of those many “is it up” websites that check for you. The problem is, they check from their end and it’s not always reliable because they can be wrong, it’s not paid service, they’re doing a favor.
Ping is a command that you can use to test a website or IP’s latency and response to your ISP’s internet connection.
How to run? In windows it’s as simple as going to start -> All Apps -> Windows System -> Command Prompt -> type in ping
As shown below you’ll see how to use the ping command and the different settings you can use when you run ping.
It’s helpful because it is the basic tool in a system’s admins tookit as well as a network techs and if its their go-to, it should be yours as well. So in the screenshot when you run ping on a website or a IP, the standard packet that is sent is 32 bytes of data, mostly 0s and 1 sent in a protocol known as ICMP.
In this case I pinged my site, it shows the results in the rows that begin with “Reply from ..” The time is the round-trip time it took for your ping packet to travel from your computer to the endpoint and back from there to your computer. Generally speaking having this low generally indicates a faster, responsive webhost or endpoint. However if you want a theoretical answer, there is a baseline you can estimate; not account for router queue delays, webhosts using POPs affect the time, the formula is the (speed of light in fiber) * (the physical distance from A to B) X 2 (for round trip). The speed of light in fiber is approx. 2.04 X 10^8 m/s and the physical distance in km (ah units matter – what you think foo!) from the datacenter or network POP of your webhost to your physical address. If you’re not sure try a traceroute and ask your webhost if the endpoint or the last hop router listed in the traceroute is located in their specific datacenter or POP.
The TTL is set in the OS and when the IP packet is sent out, each router that it passes, decreases the TTL by one. The maximum TTL value you can set in your OS is 255 and for me, my Windows 10 has its TTL set at 64. So why is TTL important? On the web, each router connects to another router for linking and sometimes one of these routers can fail, or the routes can be set up incorrectly, and without a TTL these packets can travel in circle. By decrementing TTL by one until it gets a response from the endpoint or it reaches 0, it allows ping to not drain bandwidth and prevents routers from being overloaded. In our case I ran my ping from a Windows 10 and my site is 18 routers away (64 TTL – 51 TTL ) from my location.
I covered ping above as simple as possible, if you have questions and would like to know more comment below.
Default TTL values for OS: http://subinsb.com/default-device-ttl-values
Packets looping https://en.wikipedia.org/wiki/Routing_loop_problem