Command Line Network Troubleshooting
- websterboose
- Mar 18
- 2 min read
Troubleshooting your non-functional internet connection may be annoying, but if your computer can boot into an OS, you already have some great tools to figure out quite a bit. Just so long as you can get to the terminal.
Ping
Ping sends packets to get a response from the machine that you send them to. I generally, for internet connection diagnostic purposes, tend to use ping 8.8.8.8. It’s the IP address of Google, so if you think it’s up, you are almost always right. You could use ping google.com and get the same result.

That being said, nslookup or ping /a could be used to see if you had any DNS (Dynamic Name Server) problems.

Tracert (Traceroute for Linux or MacOs)
Tracert gets you the number of “hops” between you and your destination. It also times how long those transfers take. This can help you map the devices between you and the target. For example, if your ping wasn’t successful, then tracert could help you discover where in your network, or out of it, the first point of failure occurs. Maybe I can’t reach google because my router has been accidentally unplugged. Tracert could help me find that. Maybe my friend and I are trying to play Diablo II, but one of use is very laggy. tracert could help me find which device between us is causing high latency.

Ipconfig
Ipconfig gets you your current network configuration. Unless you’re on Linux or Mac, then you need to use ifconfig. In any case, ipconfig /all is generally what I use, because it gives you all your configuration details. Does your IPv4 look something like 169.254.***.***? DHCP (Dynamic Host Configuration Protocol) disabled? Looks like you need to figure out why you haven’t been issued a useable IP address from a DHCP server. Maybe your default gateway doesn’t look quite right for your network. Am I sure that's what my sub-net mask is supposed to be? Lots of stuff you can find with this.

Basic, yes, but the basics are the basics for a reason. Have fun!
Comentarios