3 ms·
I don't typically go to a specific page to test my connectivity. I go straight to whatever task I set out to do, then if that doesn't work, I do the following:
by bradleyland 16y ago
I don't typically go to a specific page to test my connectivity. I go straight to whatever task I set out to do, then if that doesn't work, I do the following:
1. Fire up Terminal
2. Check loopback
$ ping localhost
3. Identify default gateway
$ netstat -nr | grep '^default'
4. Ping whatever gateway I find
$ ping 172.20.1.254
5. Try a known good IP address
$ ping 4.2.2.2
6. Check to see if the resolver is working (get root servers)
$ dig
7. Check to see if I can resolve specific hostnames (try a known good one first)
$ dig google.com
8. Check the specific hostname I'm trying to reach (but failed)
$ dig bradlanders.com
9. Try a name server other than the one I'm using
$ dig @4.2.2.2 bradlanders.com
10. Test IP routing to the destination IP
$ mtr 69.163.164.23
10. Assuming each of these passes, you can safely say the target service is down
Each successive step is taken only if the preceding fails.
- tzs 16y ago# netstat -nr | grep '^default' Am I correct in inferring that you have used Unix for a very very long time? The ^ stopped being a magic character in Unix shells a long time ago, but many old-timers (myself included) still sometimes quote it out of habit.
- bradleyland 16y agoI've only been using Unix for about 10 years, but I quote arguments to grep out of habit. I find it easier (probably mental laziness) to just single quote everything I feed to grep, rather than mentally parsing what I'm about to type and deciding whether it requires quotes. So basically, I've substituted an extra two characters for my ever decreasing mental acuity :)