2 comments

[ 2.8 ms ] story [ 14.7 ms ] thread
While the article seems to be focused on lower-level stuff, I feel like Charles (http://www.charlesproxy.com/) is worth mentioning when the discussion of diagnosing/debugging the network comes up. A startling number of network requests are now going over HTTP (all those apps using HTTP endpoints, the huge influx of web apps in the last few years, etc.). Charles is probably the easiest way to debug (and simulate other network environments) that I've used.
lsof is an expensive command to run.. if you're looking specifically for TCP/UDP socket descriptors better to drill down to the specifics with lsof -nP -a -i then listing all active file descriptors and grepping.

I prefer to use netcat(1),nc(1) to test port firewall traversal then telnet. assuming i don't have nmap/hping etc.. around.

  dbsd:~ $ nc -vz www.google.com 80
  Connection to www.google.com 80 port [tcp/http] succeeded!