The Penguin's Practical Network Troubleshooting Guide, Part 2 - page 3
Tracking Down Network Congestion
Firefox has a slick add-on feature called Live HTTPHeaders. Just click on the installation link to install it, restart Firefox, and click on Tools -> Live HTTP Headers.
There are options to replay or save your capture. This is a great feature that will help you quickly pinpoint Web server problems.
A powerful command-line program with similar features is curl. curl is one of those amazing tiny programs that can do great feats, if only you can figure out how. This command fetches the HTTP headers only, using the -I flag:
$ curl -I webserver.com HTTP/1.1 200 OK Date: Wed, 03 May 2006 00:39:20 GMT Server: Apache/2.0.54 (Ubuntu) Content-Type: text/html; charset=UTF-8
curl does a tcpdump-type capture:
$ curl --trace trace.txt webserver.com
Open the trace.txt file to see what curl captured. This is a great way to make sure your SSL is working as it's supposed to:
$ curl --trace trace.txt https://webserver.com
curl has many more uses, such as testing LDAP and FTP servers. If the stars line up correctly, someday a detailed curl howto might appear here.
The netstat command is invaluable for testing and troubleshooting services. This particular incantation gives a detailed picture of which services are running, and which ports they are listening to:
# netstat -plunte
This is especially valuable on a multi-homed system, as it shows which interfaces your services are listening on, and the program names and process IDs. You need this information to test your application-level security, to ensure that no LAN services are exposed to the Internet.
The first step to repairing any sort of network troubles is diagnosing the problem. With these two articles you're well-equipped to diagnose most common network troubles.
Resources
- Spy on Yourself with tcpdump
- Spy on the Spyware with tcpdump
- Chapter 20 of the Linux Cookbook goes into detail on using telnet to test mail servers
- RFC 821 - Simple Mail Transfer Protocol
- RFC 2616 - Hypertext Transfer Protocol - HTTP/1.1
This article originally appeared on Enterprise Networking Planet, a JupiterWeb site.
Skip Ahead
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.