linuxpineheadonly

Netstat: network analysis and troubleshooting, explained

The netstat command gives you a set of tools to answer the question “What in blazes is going on on my network?” when things go wrong. To be able to use it effectively at such an occasion, however, you might want to learn how it works right now, so you’ll be prepared. Besides, it never hurts to understand your network just a little better. Read on to find out exactly what netstat is, what you can use it for and how it can help you solve problems and understand your network.

A bundle of network tools
The netstat command doesn’t really do unique things. It can print network statistics, but ifconfig can do so, too. It can print routing tables, but route can do that, too. It can print open connections, but lsof does that, and more. So why use netstat at all? There are two main reasons:

  • netstat bundles a few often-used network analysis actions in a single command and
  • netstat is multi-platform.

(more…)