200
Of course, this is how a system running POP3 or SMTP is supposed to work. If it works this way, any subsequent problems are probably with the client, and you need to turn to the client documentation.
You can confirm this with packet capture software. If your system doesnt work properly, the problem could be with the server software or with communications. You might try logging onto the server and
verifying that the appropriate software is listening, using ps, or, if it is started by inetd, using netstat. Or you might try using telnet to connect to the server directly from the server, i.e.,
telnet localhost 25
. If this succeeds, you may have routing problems, name service problems, or firewall problems. If it fails, then look to the documentation for the software you are using on the
server. The commands used by most email protocols are described in the relevant RFCs. For SMTP, see RFC
821; for POP2, see RFC 937; for POP3, see REF 1939; and for IMAP, see RFC 1176.
10.1.2 HTTP
HTTP is another protocol that is based on commands in NVT ASCII sent over a TCP session. It can be fairly complicated to figure out the correct syntax, but even an error message will tell you that the
server is running and the connection works. Try typing
HEAD HTTP 1.0
followed by two carriages returns. Here is an example:
bsd2 telnet localhost http Trying 127.0.0.1...
Connected to localhost.lander.edu. Escape character is ].
HEAD HTTP 1.0 HTTP1.1 200 OK
Date: Sun, 22 Apr 2001 13:27:32 GMT Server: Apache1.3.12 Unix
Content-Location: index.html.en Vary: negotiate,accept-language,accept-charset
TCN: choice Last-Modified: Tue, 29 Aug 2000 09:14:16 GMT
ETag: a4cd3-55a-39ab7ee8;3a4a1b39 Accept-Ranges: bytes
Content-Length: 1370 Connection: close
Content-Type: texthtml Content-Language: en
Expires: Sun, 22 Apr 2001 13:27:32 GMT Connection closed by foreign host.
In this example, Ive checked to see if the server is responding from the server itself. In general, however, using telnet is probably not worth the effort since it is usually very easy to find a working
web browser that you can use somewhere on your network.
Most web problems, in my experience, stem from incorrectly configured security files or are performance problems. For security configuration problems, youll need to consult the appropriate
documentation for your software. For a quick performance profile of your server, you might visit Patrick Killeleas web site,
http:patrick.net . If you have problems, you probably want to look at his
book, Web Performance Tuning.
10.1.3 FTP and TFTP
201
FTP is another protocol that uses NVT ASCII and can be checked, to a very limited extent, with telnet. Here is a quick check to see if the server is up and can be reached:
lnx1 telnet bsd2 ftp Trying 172.16.2.236...
Connected to bsd2.lander.edu. Escape character is ].
220 bsd2.lander.edu FTP server Version 6.00LS ready. user jsloan
331 Password required for jsloan. pass xyzzy
230 User jsloan logged in. stat
211- bsd2.lander.edu FTP server status: Version 6.00LS
Connected to 172.16.3.234 Logged in as jsloan
TYPE: ASCII, FORM: Nonprint; STRUcture: File; transfer MODE: Stream No data connection
211 End of status quit
221 Goodbye. Connection closed by foreign host.
Once you know the server is up, youll want to switch over to a real FTP client. Because FTP opens a reverse connection when transferring information, you are limited with what you can do with telnet.
Fortunately, this is enough to verify that the server is up, communication works, and you can successfully log on to the server.
Unlike FTP, TFTP is UDP based. Consequently, TCP-based tools like telnet are not appropriate. Youll want to use a TFTP client to test for connectivity. Fortunately, TFTP is a simple protocol and
usually works well.
10.1.4 Name Services