logoalt Hacker News

ButlerianJihad • today at 4:43 AM • 4 replies • view on HN

> 1.1.1.1

Pinging such an address is inherently a troublesome practice. This address, like many public DNS servers (resolvers as well as root and authoritative ones), uses "anycast" routing methodology.

https://en.wikipedia.org/wiki/Anycast

Pinging an anycast address will yield a cornucopia of different results. Of course, people who naïvely "ping" a recognizable or easy-to-type IPv4 address get what they deserve, especially when they enshrine it into software, unit tests, or the LLM coughs up such tokens on their behalf.

Fundamentally, the question is "what do you really want to test?" by pinging a particular IPv4? Do you want to test Layer 3 connectivity? Test your ISP's backbone and connectivity? Test only your upstream router? Test the existence of ICMP in your stack and theirs?

... the possibilities are endless. Your router can do anything. Ping zombo.com.


Replies

QuantumNomad_ • today at 5:06 AM

I ping 1.1.1.1 to see if my internet is working or not after a couple of websites don’t load. I reboot the router. I keep the terminal where I’m pinging 1.1.1.1 open until I start seeing responses and then I know my internet is back. Then I continue my web browsing and other online activities.

➕ show 3 replies
zettabomb • today at 7:05 AM

Why is pinging an anycast address an issue? Most people, myself included, ping addresses like 1.1.1.1 to check for internet connectivity. It's a perfectly valid check, you don't need a fine grained test all the time. If it fails, then I go looking in detail. Most of the time it will pass.

Pinging a domain name could fail for a variety of other reasons, particularly if it's not a reliable site. Cloudflare's business is being reliable; few sites would be a better choice.

➕ show 1 reply
ffaccount2 • today at 7:55 AM

Fun fact, ping is the standard windows way to wait a given number of seconds[0]. You're supposed to ping 127.0.0.1, but I saw a lot of scripts pinging 1.1.1.1 or 8.8.8.8

[0]: https://stackoverflow.com/questions/1672338/how-to-sleep-for...

Hikikomori • today at 7:15 AM

Why would it matter?

➕ show 1 reply