Sunteți pe pagina 1din 9

TCPIP Protocol Suite

Unit 6

Unit 6
Structure: 6.1 6.2 Introduction Telnet Telnet Operation Network Virtual Terminal Telnet Command Structure Option Negotiation Telnet Basic Commands 6.3

Remote Execution

Remote Execution Command Protocol (REXEC and RSH) Principle of Operation

6.4 6.5 6.6 6.7 6.8

Summary Terminal Questions Answers for Self Assessment Questions Answers for Terminal Questions Exercises

6.1 Introduction
One of the most fundamental mechanisms employed on networked computers is the ability to execute on the remote systems. That is, a user wants to invoke an application on a remote machine. A number of application protocols exist to allow this remote execution capability, most notably the Telnet protocol. Objectives: After the completion of this unit you will be able to understand: Network Virtual Concepts. OPTION negotiation in TELNET Structure of TELNET command
Page No. 150

Sikkim Manipal University

TCPIP Protocol Suite

Unit 6

6.2 Telnet
Telnet is a standard protocol with STD number 8. Its status is recommended. It is described in RFC 854 Telnet Protocol Specifications and RFC 855 Telnet Option Specifications. The Telnet protocol provides a standardized interface, through which a program on one host (the Telnet client) can access the resources of another host (the Telnet server) as though the client were a local terminal connected to the server. See Fig. 6.1 for more details. For example, a user on a workstation on a LAN can connect to a host attached to the LAN as though the workstation were a terminal attached directly to the host. Of course, Telnet can be used across WANs as well as LANs.

Fig. 6.1: Telnet Operation

Most Telnet implementations do not provide you with graphics capabilities.

Sikkim Manipal University

Page No. 151

TCPIP Protocol Suite

Unit 6

6.2.1 Telnet Operation Telnet protocol is based on three ideas: 1. The Network Virtual Terminal (NVT) concept. An NVT is an imaginary device with a basic structure common to a wide range of real terminals. Each host maps its own terminal characteristics to those of an NVT and assumes that every other host will do the same. 2. A symmetric view of terminals and processes. 3. Negotiation of terminal options. The principle of negotiated options is used by the Telnet protocol, because many hosts want to provide additional services, beyond those available with the NVT. Various options can be negotiated. The server and client use a set of conventions to establish the operational characteristics of their Telnet connection through the DO, DONT, WILL, WONT mechanism discussed later in this chapter. The two hosts begin by verifying their mutual understanding. After this initial negotiation is complete, they are capable of working on the minimum level implemented by the NVT. After this minimum understanding is achieved, they can negotiate additional options to extend the capabilities of the NVT to reflect more accurately the capabilities of the real hardware in use. Because of the symmetric model used by Telnet (see Fig. 6.2), both the host and the client can propose additional options to be used.

Sikkim Manipal University

Page No. 152

TCPIP Protocol Suite

Unit 6

Fig. 6.2: Telnet Negotiations

6.2.2 Network Virtual Terminal The NVT has a printer (or display) and a keyboard. The keyboard produces outgoing data, which is sent over the Telnet connection. The printer receives the incoming data. The basic characteristics of an NVT, unless they are modified by mutually agreed options, are: The data representation is 7-bit ASCII transmitted in 8-bit bytes. The NVT is a half-duplex device operating in a line-buffered mode.

The NVT provides a local echo function. All of these can be negotiated by the two hosts. For example, a local echo is preferred because of the lower network load and superior performance, but there is an option for using a remote echo (see Fig. 6.3), although no host is required to use it.

Sikkim Manipal University

Page No. 153

TCPIP Protocol Suite

Unit 6

Fig. 6.3: Telnet: Echo Operation

An NVT printer has an unspecified carriage width and page length. It can handle printable ASCII characters (ASCII code 32 to 126) and understands some ASCII control characters. 6.2.3 Telnet Command Structure The communication between client and server is handled with internal commands, which are not accessible by users. All internal Telnet commands consist of 2- or 3-byte sequences, depending on the command type. The Interpret As Command (IAC) character is followed by a command code. If this command deals with option negotiation, the command will have a third byte to show the code for the referenced option. See Fig. 6.4 for more details.

Sikkim Manipal University

Page No. 154

TCPIP Protocol Suite

Unit 6

Fig. 6.4: Internal telnet command proposes negotiation about terminal type

Table 6.1 shows some of the possible command codes. Table 6.1: Some possible command codes

6.2.4 Option Negotiation Using internal commands, Telnet is able to negotiate options in each host. The starting base of negotiation is the NVT capability: Each host to be connected must agree to this minimum. Every option can be negotiated by
Sikkim Manipal University Page No. 155

TCPIP Protocol Suite

Unit 6

the use of the four command codes WILL, WONT, DO, and DONT. In addition, some options have suboptions. 6.2.5 Telnet Basic Commands The primary goal of the Telnet protocol is the provision of a standard interface for hosts over a network. To allow the connection to start, the Telnet protocol defines a standard representation for some functions: IP Interrupt Process AO Abort Output AYT Are You There EC Erase Character EL Erase Line SYNCH Synchronize Self Assessment Questions 1. State TRUE/FALSE: The Interpret As Command (IAC) character is followed by a command code. 2. All internal Telnet commands consist of ---------------- byte sequences, depending on the command type.

6.3 Remote Execution Command Protocol (REXEC and RSH)


Remote Execution Command Daemon (REXECD) is a server that allows the execution of jobs submitted from a remote host over the TCP/IP network. The client uses the REXEC or Remote Shell Protocol (RSH) command to transfer the job across to the server. Any standard output or error output is sent back to the client for display or further processing. 6.3.1 Principle of Operation REXECD is a server (or daemon). It handles commands issued by foreign hosts and transfers orders to subordinate virtual machines for job execution. The daemon performs automatic login and user authentication when a user ID and password are entered. The REXEC command is used to define the
Sikkim Manipal University Page No. 156

TCPIP Protocol Suite

Unit 6

user ID, password, host address, and the process to be started on the remote host. However, RSH does not require you to send a user name and password; it uses a host access file instead. Both server and client are linked over the TCP/IP network. REXEC uses TCP port 512 and RSH uses TCP port 514. See Fig. 6.5 for more details.

Fig. 6.5: REXEC: REXECD Principle

Self Assessment Questions 1. SH does not require you to send a user name and password; it uses a --------- instead. 2. State TRUE/FALSE: REXEC uses UDP port 512.

6.4 Summary
The Telnet protocol provides a standardized interface, through which a program on one host (the Telnet client) can access the resources of another host (the Telnet server) as though the client were a local terminal connected to the server. The communication between client and server is handled with internal commands, which are not accessible by users. Using internal commands, Telnet is able to negotiate options in each host.
Sikkim Manipal University Page No. 157

TCPIP Protocol Suite

Unit 6

6.5 Terminal Questions


1. State TRUE/FALSE: An NVT is an imaginary device with a basic structure common to a wide range of real terminals. 2. ---------- command shows refusal to use or continue to use options.

6.6 Answers for Self Assessment Questions


6.2 1) True 2) 2 or 3 6.3 1) host access file 2) False

6.7 Answers for Terminal Questions


1. True 2. WONT

6.8 Exercises
1. What do you mean by OPTION NEGOTIATION? Explain with an example. 2. Explain the principle of operation of REXEC protocol.

Sikkim Manipal University

Page No. 158

S-ar putea să vă placă și