DistributedNetworks DistributedNetworks

Network Daemons  «Prev  Next»
Lesson 9 Inetd: the super server
Objective Describe how server processes start and stop under the control of inetd.

Clients, Servers, and Ports

There are many types of network services, but each service operates in a similar way. For example, let's consider the telnet service. This service allows a user logged in on one UNIX machine (say, machine A) to contact machine B, log on to that machine, and work on the remote machine.

Telnet model

For the connections, TELNET uses the TCP protocol. The TELNET service is offered in the host machine's TCP port 23. The user at the terminal interacts with the local telnet client. The TELNET client acts as a terminal accepting any keystrokes from the keyboard, interpreting them and displaying the output on the screen. The client on the computer makes the TCP connection to the host machine's port 23 where the TELNET server answers. The TELNET server interacts with applications in the host machine and assists in the terminal emulation.

Figure 4.2 Telnet Protocol Model

As the connection is setup, both ends of the TELNET connection are assumed to be originated and terminated at the (NVT) network virtual terminal. The NVT is a network wide terminal which is host independent so that both the server and the client in the connection may not need to keep any information about each others terminal's characteristics. Both sides see each other as a NVT terminal. As there are several types of terminals, which may be able to provide additional services from those provided by the NVT, the TELNET protocol contains a negotiation method for the user and the server to negotiate changes to the terminal provided in the NVT. Typically the client and the server stays in the NVT just as long as it takes to negotiate some terminal type to be emulated.

The SlideShow below describes how the telnet service works:

Telnet Service Example
In the most typical situation, each connection between two machines has an associated pair of client and server processes, with different client and server processes for each
  1. Client: (1) a process running on a host computer which requests services; (2) a computer running a client process.
  2. Server: (1) a process running on a host computer which supplies services in response to client requests. (2) a computer which runs server processes.
  3. process: A UNIX process is a running program.
  4. transaction. Now let's explore in more detail how these client/server transactions are set up under UNIX.