5 points · by rohanprabhu · 15y ago · 13 comments
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 downEach successive step is taken only if the preceding fails.
# 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.