Telnet is a command-line tool that provides access to a command-line interface on a remote host. It may also be used to test Transmission Control Protocol (TCP) connectivity. These activities will show you how to use Telnet to test an HTTP connection.
To prepare for this activity:
- Start Windows.
- Log in if necessary.
- Install the Telnet Client
Activity 1 - Test an HTTP Connection
To test an HTTP connection:
- Open a command prompt.
- Type telnet <http server> <port>, where <http server> is the name or IP address of the http server to test and <port> is the port number the HTTP server is using. The default HTTP port is 80. For example, to test a connection to www.google.com, type telnet www.google.com 80. Then press Enter.
- If the connection is successful, you will see a blank screen waiting for input. Press <Ctrl>C to close the connection. You will see HTML error content indicating that the web server did not understand your request, however, the appearance of HTML content indicates a successful TCP connection to the HTTP server was made.
- Close the command prompt to complete this activity.