📜 ⬆️ ⬇️

If the ping ya.ru team seems too long ...

In this article, it was remarkably noticed how to check connectivity with the Network using ping , if you have a broken DNS and a set of familiar
ping ya.ru
no longer helps. If DNS still works, then, as it turned out from the comments, some use it for ping www.ru www.ru or google.com , but most still prefer ya.ru simply because they have less letters to write. It turns out that thanks to sunny Uzbekistan and Turkmenistan, you can write even less letters.

All sorts of "smart" solutions like the establishment of some alias
alias p='ping somehost.com'
or the author immediately rejects adding hosts with names from one letter to /etc/hosts . This is not bad for your own computer, but it doesn’t work if you have hundreds of machines under MS Windows, Linux, MacOS and you don’t know which of them will have to run ping next time.
But you can just ping the 2-letter TLDs of those countries that have the corresponding A-record in the DNS (command in the tcsh syntax):

% foreach host ( uz tm pn io ac cm pw ai mn bi )
foreach? ping -qc5 $host
foreach? end
PING uz (195.158.1.25): 56 data bytes

--- uz ping statistics ---
5 packets transmitted, 4 packets received, 20% packet loss
round-trip min/avg/max/stddev = 53.388/83.926/160.753/44.644 ms
PING tm (193.223.78.213): 56 data bytes

--- tm ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 67.435/68.101/68.830/0.523 ms
PING pn (80.68.93.100): 56 data bytes

--- pn ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 69.189/70.391/71.634/0.860 ms
PING io (193.223.78.212): 56 data bytes

--- io ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 66.764/67.755/68.713/0.711 ms
PING ac (193.223.78.210): 56 data bytes

--- ac ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 67.331/68.218/68.734/0.523 ms
PING cm (195.24.192.17): 56 data bytes

--- cm ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 188.291/188.460/188.711/0.141 ms
PING pw (203.199.114.33): 56 data bytes

--- pw ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 214.316/215.609/216.963/1.059 ms
PING ai (209.59.119.34): 56 data bytes

--- ai ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 263.953/288.325/320.875/24.148 ms
PING mn (202.131.0.65): 56 data bytes

--- mn ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 430.495/433.266/436.007/2.267 ms
PING bi (196.2.8.205): 56 data bytes

--- bi ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 802.482/815.234/824.431/7.371 ms


Depending on the OS and the resolver settings, the names without any dots may be interpreted incorrectly (the “default domain” will automatically be added to them). In this case, you have to write as much as a whole letter more and add to the 2-letter names at the end point. For example, under MS Windows:
for %h in ( uz tm pn io ac cm pw ai mn bi ) do ping -n 2 %h.
(note the extra point at the end after% h). Under Windows, for unexplained reasons, the host mn. did not rebel And under FreeBSD it resolves without problems. As for the host uz. , then, as you can see, the Uzbeks do not respond to 100% of the echo requests. But there is still Turkmenistan, Jordan and others.

')

Source: https://habr.com/ru/post/57309/


All Articles