6.1 The Basics of Services

6.1 The Basics of Services

TCP services are among the easiest to understand because they are simple, uninterrupted data streams. For example, you can talk directly to a Web server on TCP port 80 to get an idea of how data comes across the connection. Run the following command to connect to a Web server:

 telnet www.nytimes.com 80 

You should get a response like this:

 Trying some address... Connected to www.nytimes.com. Escape character is '^]'. 

Now type this:

 GET / 

Press ENTER twice. The server should send a bunch of HTML text as a response, and then terminate the connection.

There are two important lessons here:

  • The remote host has a Web server process listening on TCP port 80.

  • telnet was the client that initiated the connection.


telnet is a program originally meant to enable logins to remote hosts . Although the non-Kerberos telnet remote login server is completely insecure (as you will learn later), the telnet client is useful for debugging remote services. telnet does not work with UDP or any other transport layer other than TCP. See Section 6.5.3 for information on netcat , a powerful general-purpose network client.

How Linux Works
How Linux Works: What Every Superuser Should Know
ISBN: 1593270356
EAN: 2147483647
Year: 2004
Pages: 189
Authors: Brian Ward

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net