Ask HN: How do you troubleshoot network problems?
After reading this recent thread [0] I have to wonder how the heck would I troubleshoot this!?
I know the basics: - check if the NIC module is loaded - check if you have an IP - check that you can ping the gateway - check that you can ping the your target - check that you can telnet to port - check iptables (or temporarily flush all and set default to accept) - try to see something that stands out in wireshark
But how do you go from there?
For example, one friday ago, during wee hours I lost connection to the target host. I was ssh multi hopping and for some reason my immediate thought was "the target host 'died'". "But wait a sec, let's go one step at a time".
It was in fact the connection to my first hop at our local network. So I went to the physical machine. I had an IP. And every time I restarted the network I always got an IP. But I was unable to ping the gateway... 90% of the times. Then it came to me that some months ago other people on the same subnetwork had complained in the past about temporary network loss. I restarted the switch but it didn't help. My current theory is that of a faulty network switch, but this is yet to be confirmed.
The problem I had/have? looks to be way simpler than the one mentioned in [0], but networks feel a bit like some dark magic.
So any advices on improving your network detective skills?
[0] https://news.ycombinator.com/item?id=9555057