0% found this document useful (0 votes)
14 views3 pages

Telnet

Uploaded by

crescentyousuf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views3 pages

Telnet

Uploaded by

crescentyousuf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Telnet Protocol

The early developers of TCP/IP internetworking technologies identified two overall application needs for
networks to fill: enabling direct access and indirect access to resources. FTP was created for indirect
access, by allowing a user to retrieve a resource from a remote host, use it locally, and if desired, copy it
back to its source. Telnet was designed for direct access: to let a user access a remote machine and use
it as if he or she were connected to it locally.

Fundamental Telnet Concepts


The protocol is built upon a foundation of three main concepts:
o The Network Virtual Terminal (NVT): Telnet defines a standardized, fictional terminal called
the Network Virtual Terminal (NVT) that is used for universal communication by all devices. A
Telnet client takes input from a user and translates it from its native form to the NVT format to
send to a Telnet server running on a remote computer; the server translates from NVT to
whatever representation the computer being accessed requires. The process is reversed when
data is sent from the remote computer back to the user. This system allows clients and servers to
communicate even if they use entirely different hardware and internal data representations.
Special Telnet commands are interspersed with the data to allow the client and server devices to
perform various functions needed to manage the operation of the protocol.
o Options and Option Negotiation: Having Telnet clients and servers act as NVTs avoids
incompatibilities between devices, but does so by stripping all terminal-specific functionality to
provide a common base representation that is understood by everyone. Since there are many
cases where more intelligent terminals and computers may wish to use a more advanced
communication feature or service, Telnet defines a rich set of options and a mechanism by which
a Telnet client and server can negotiate their use. If the client and server agree on the use of an
option it can be enabled; if not, they can always fall back on the NVT to ensure basic
communication.
o Symmetric Operation: While Telnet is a client/server protocol, it is specifically designed to not
make assumptions about the nature of the client and server software. Once a Telnet session is
established, they can each send and receive data as equals. They can also each initiate the
negotiation of options. This makes the protocol extremely flexible, and has led to its use in a
variety of places, as we will discuss in a moment.

Telnet Applications
Telnet is most often associated with remote login, which is its most common traditional use. A user
typically uses a Telnet client program to open a Telnet connection to a remote server, which then treats
the Telnet client like a local terminal, allowing the user to log in and access the server’s resources as if he
or she were using a directly-attached terminal.
Since Telnet doesn’t make assumptions about what a client is and what a server is, any program
orapplication can use it. Many of the file and message transfer applications, include FTP, SMTP, NNTP
and HTTP, communicate through the sending of text commands and messages, and use the Telnet’s
NVT specification to ensure the compatibility of communication between devices. They don’t actually
establish Telnet sessions or use features like option negotiation, they just send data in a manner
consistent with how Telnet works.

Usually, the Telnet client is a piece of software that acts as an interface to the user, processing
keystrokes and user commands and presenting output from the remote machine. The Telnet server is a
program running on a remote computer that has been set up to allow remote sessions.

TCP Sessions and Client/Server Communication


Telnet is used for the interactive communication of data and commands between client and server over a
prolonged period of time, and is thus strongly based on the concept of a session. For this reason, Telnet
runs over the connection-oriented Transmission Control Protocol (TCP). Telnet servers listen for
connections on well-known TCP port number 23. When a client wants to access a particular server, it
initiates a TCP connection to the appropriate server, which responds to set up a TCP connection using
the standard TCP three-way handshake.
The TCP connection is maintained for the duration of the Telnet session, which can remain alive for
hours, days, or even weeks at a time. The quality of service features of TCP guarantee that data is
received reliably and in order, and ensures that data is not sent at too high a rate for either client or
server.
A machine offering Telnet service can support multiple simultaneous sessions with different users,
keeping each distinct by identifying it using the IP address and port number of the client.

By default, both devices begin by using the standard Telnet Network Virtual Terminal (NVT) method for
encoding data and control commands. They can also negotiate the use of Telnet options to provide
greater functionality for the session.

Use of Telnet To Access Other Servers


The Telnet NVT representation is used by a variety of other protocols such as SMTP and HTTP. This
means that the same Telnet client that allows you to access a Telnet server can be used to directly
access other application servers. All you need to do is specify the port number corresponding to the
service. For example, this command will allow you to directly interface to a Web server:
telnet www.someserversomewhere.org 80
You will not receive a login prompt, but instead the server will wait for you to send an HTTP Request
message, as if you were a Web browser. If you enter a valid request, the server will send you an HTTP
Response message. Used in this way, Telnet can be very valuable as a diagnostic tool.

Telnet Communications Model and the Network Virtual Terminal (NVT)


At its heart, Telnet is a rather simple protocol. Once a TCP connection is made and the Telnet session
begins, the only real task that the client and server software has is to capture input and output, and
redirect it over the network. So, when the user types a key on his local terminal, the Telnet client software
captures it and sends it over the network to the remote machine. There, the Telnet server software sends
it to the operating system, which treats it as if it had been typed locally. When the Operating
system produces output, the process is reversed: Telnet server software captures the output and sends it
over the network to the user’s client program, which displays it on the printer or monitor.

To invoke two well-known clichés, I could say that this “looks good on paper”, but that “the devil is in the
details”. This simplified implementation would only work if every computer and terminal used the exact
same hardware, software and data representation. Of course, this is far from the case today, and was
even worse when Telnet was being developed.

The Network Virtual Terminal


All Telnet clients and servers agree to send data and commands that adhere to a fictional, “virtual”
terminal type call the Network Virtual Terminal (NVT). The NVT defines a set of rules for how information
is formatted and sent, such as character set, line termination, and how information about the Telnet
session itself is sent.
Each Telnet client running on a terminal understands both its native language and NVT. When
information is entered by the user on his or her local terminal, it is converted to NVT for transmission over
the network in NVT form. When the Telnet server receives this information, it translates it from NVT to the
format that the remote host expects to receive it. The identical process is performed for transmissions
from the server to the client, in reverse. This is illustrated in Figure 320.
Figure 320: Telnet Communication and the Network Virtual Terminal (NVT)
Telnet uses the Network Virtual Terminal (NVT) representation to allow a user terminal and remote host
that use different internal formats to communicate.

The NVT is defined to consist of a logical “keyboard” for input and a logical “printer” for output; decades
ago there were no monitors, all output was on paper).

NVT uses the 7-bit United States ASCII (USASCII) character set. Each character is encoded using one 8-
bit byte.

Another artifact of the age of Telnet is that for maximum compatibility, the Network Virtual Terminal
specification is designed under the assumption of half-duplex operation: only one device can transmit at a
time. A device that is sending data is supposed to end its transmission with the special Telnet Go
Ahead command, telling the other device that it may now transmit. Of course, modern networks operate in
a full-duplex mode, and using half-duplex communication would be needlessly inefficient. In most cases
the Telnet client and server agree to use an option (Suppress Go Ahead) that eliminates the need to send
this command. However, having this as the default is a good example of how NVT acts as a “least
common denominator” in Telnet, in case the simpler operating mode is needed by either device.

You might also like