Provided by Colasoft Co., Ltd.

TELNET ( Virtual Terminal Connection Service )

Home > Protocols > TELNET Update: 2005-11-23 17:00:46    I have words to say about this protocol
On this page
SUMMARY
Protocol : Virtual Terminal Connection Service
Protocol suite : TCP/IP
Layer : Application Layer
Related protocols : TCP,
IP,
SMTP,
FTP
DESCRIPTION
TELNET is a third-level protocol, the function of which is to make a terminal (or process) at a using site appear to the system or a process at a serving site as logically equivalent to a terminal directly connected to the serving site. In performing this function, the protocol attempts to minimize the amount of information each host must keep about the characteristics of other hosts.

The purpose of the TELNET Protocol is to provide a fairly general, bi-directional, eight-bit byte oriented communications facility. Its primary goal is to allow a standard method of interfacing terminal devices and terminal-oriented processes to each other. It is envisioned that the protocol may also be used for terminal-terminal communication and process-process communication (distributed computation).

In providing services the TELNET protocol will use established network conventions, specifically the Network Control Program, and Initial Connection Protocol referenced in the above definitions.

The TELNET protocol provides for a Network Virtual Terminal (NVT) through which users may transmit and receive data over connections between the using site and the serving site. The code of the NVT will be full ASCII. The seven-bit code will be transmitted in eight-bit bytes, the high order bit set to zero. It will be the responsibility of the using site to provide its users with a means of producing all 128 ASCII codes, as well as a selected set of special TELNET control signals

The ASCII character ESC will be employed by the user as an escape signal indicating that the next character(s) has special meaning. The meaning assigned to escape code will be serving site defined and therefore may not be consistant across the network.

It will be the responsibility of the serving site to specify for users how the NVT code will be used to represent the codes normally generated by a local terminal. The serving sites specification of this representation is expected, where reasonable, to map on a one-for-one basis for ASCII graphics and controls that are provided through local terminals. The serving site will also specify how the escape conventions will be interpreted by the system.

The end of a line will be represented in the NVT as carriage return followed by line feed. The protocol assumes that at initially the serving site will not provide any echo to the using site.

Each TELNET control signal for which code must be sent over the connection will be represented in the NVT by an eight-bit code, with the high order bit set to one.


Command structure
All TELNET commands consist of at least a two byte sequence - the Interpret as Command (IAC) escape character followed by the code for the command. The commands dealing with option negotiation are three byte sequences, the third byte being the code for the option referenced. This format was chosen so that as more comprehensive use of the data space is made - by negotiations from the basic NVT, of course - collisions of data bytes with reserved command values will be minimized, all such collisions requiring the inconvenience, and inefficiency, of escaping the data bytes into the stream. With the current set-up, only the IAC need be doubled to be sent as data, and the other 255 codes may be passed transparently.

The following are the defined TELNET commands. Note that these codes and code sequences have the indicated meaning only when immediately preceded by an IAC.

NameCodeMeaning
SE240End of subnegotiation parameters.
NOP241No operation.
Data Mark242The data stream portion of a Synch. This should always be accompanied by a TCP Urgent notification.
Break243NVT character BRK.
Interrupt Process244The function IP.
Abort output245The function AO.
Are You There246The function AYT.
Erase character247The function EC.
Erase Line248The function EL.
Go ahead249The GA signal.
SB250Indicates that what follows is subnegotiation of the indicated option.
WILL (option code)251Indicates the desire to begin performing, or confirmation that you are now performing, the indicated option.
WON"T (option code)252Indicates the refusal to perform, or continue performing, the indicated option.
DO (option code)253Indicates the request that the other party perform, or confirmation that you are expecting the other party to perform, the indicated option.
DON"T (option code)254Indicates the demand that the other party stop performing, or confirmation that you are no longer expecting the other party to perform, the indicated option.
IAC255Data Byte 255.



The Network Virtual Terminal
The Network Virtual Terminal (NVT) is a bi-directional character device. The NVT has a printer and a keyboard. The printer responds to incoming data and the keyboard produces outgoing data which is sent over the TELNET connection and, if echoes are desired, to the NVT's printer as well. Echoes will not be expected to traverse the network (although options exist to enable a remote echoing mode of operation, no host is required to implement this option). The code set is seven-bit USASCII in an eight-bit field, except as modified herein. Any code conversion and timing considerations are local problems and do not affect the NVT.

  • Transmission of data
    Although a TELNET connection through the network is intrinsically full duplex, the NVT is to be viewed as a half-duplex device operating in a line-buffered mode. That is, unless and until options are negotiated to the contrary.


  • Standard representation of control functions
    The primary goal of the TELNET protocol is the provision of a standard interfacing of terminal devices and terminal-oriented processes through the network. Early experiences with this type of interconnection have shown that certain functions are implemented by most servers, but that the methods of invoking these functions differ widely. For a human user who interacts with several server systems, these differences are highly frustrating. TELNET, therefore, defines a standard representation for five of these functions, as described below. These standard representations have standard, but not required, meanings (with the exception that the Interrupt Process (IP) function may be required by other protocols which use TELNET); that is, a system which does not provide the function to local users need not provide it to network users and may treat the standard representation for the function as a No-operation. On the other hand, a system which does provide the function to a local user is obliged to provide the same function to a network user who transmits the standard representation for the function.


    • Interrupt Process (IP)
      Many systems provide a function which suspends, interrupts, aborts, or terminates the operation of a user process. This function is frequently used when a user believes his process is in an unending loop, or when an unwanted process has been inadvertently activated. IP is the standard representation for invoking this function. It should be noted by implementers that IP may be required by other protocols which use TELNET, and therefore should be implemented if these other protocols are to be supported.


    • Abort Output (AO)
      Many systems provide a function which allows a process, which is generating output, to run to completion (or to reach the same stopping point it would reach if running to completion) but without sending the output to the user's terminal. Further, this function typically clears any output already produced but not yet actually printed (or displayed) on the user's terminal. AO is the standard representation for invoking this function.


    • Are You There (AYT)
      Many systems provide a function which provides the user with some visible (e.g., printable) evidence that the system is still up and running. This function may be invoked by the user when the system is unexpectedly silent for a long time, because of the unanticipated (by the user) length of a computation, an unusually heavy system load, etc. AYT is the standard representation for invoking this function.


    • Erase Character (EC)
      Many systems provide a function which deletes the last preceding undeleted character or print position from the stream of data being supplied by the user. This function is typically used to edit keyboard input when typing mistakes are made. EC is the standard representation for invoking this function.


    • Erase Line (EL)
      Many systems provide a function which deletes all the data in the current line of input. This function is typically used to edit keyboard input. EL is the standard representation for invoking this function.


  • The TELNET Synch signal
    Most time-sharing systems provide mechanisms which allow a terminal user to regain control of a runaway process; the IP and AO functions described above are examples of these mechanisms. Such systems, when used locally, have access to all of the signals supplied by the user, whether these are normal characters or special out of band signals such as those supplied by the teletype BREAK key or the IBM 2741 ATTN key. This is not necessarily true when terminals are connected to the system through the network; the network's flow control mechanisms may cause such a signal to be buffered elsewhere, for example in the user's host.

    To counter this problem, the TELNET Synch mechanism is introduced. A Synch signal consists of a TCP Urgent notification, coupled with the TELNET command Data Mark. The Urgent notification, which is not subject to the flow control pertaining to the TELNET connection, is used to invoke special handling of the data stream by the process which receives it. In this mode, the data stream is immediately scanned for interesting signals as defined below, discarding intervening data. The TELNET command Data Mark (DM) is the synchronizing mark in the data stream which indicates that any special signal has already occurred and the recipient can return to normal processing of the data stream.


  • The NVT printer and keyboard
    The NVT printer has an unspecified carriage width and page length and can produce representations of all 95 USASCII graphics (codes 32 through 126). Of the 33 USASCII control codes (0 through 31 and 127), and the 128 uncovered codes (128 through 255), the following have specified meaning to the NVT printer:


  • NameCodeMeaning
    NULL (NUL)0No Operation.
    BELL (BEL)7Produces an audible or visible signal (which does NOT move the print head).
    Back Space (BS)8Moves the print head one character position towards the left margin.
    Horizontal Tab (HT)9Moves the printer to the next horizontal tab stop. It remains unspecified how either party determines or establishes where such tab stops are located.
    Line Feed (LF)10Moves the printer to the next print line, keeping the same horizontal position.
    Vertical Tab (VT)11Moves the printer to the next vertical tab stop. It remains unspecified how either party determines or establishes where such tab stops are located.
    Form Feed (FF)12Moves the printer to the top of the next page, keeping the same horizontal position.
    Carriage Return (CR)13Moves the printer to the left margin of the current line.

    In addition to these codes, the NVT keyboard shall be capable of generating the following additional codes which, except as noted, have defined, but not reguired, meanings. The actual code assignments for these characters are in the TELNET Command section, because they are viewed as being, in some sense, generic and should be available even when the data stream is interpreted as being some other character set.

    • Synch
      This key allows the user to clear his data path to the other party. The activation of this key causes a DM to be sent in the data stream and a TCP Urgent notification is associated with it. The pair DM-Urgent is to have required meaning as defined previously.


    • Break (BRK)
      This code is provided because it is a signal outside the USASCII set which is currently given local meaning within many systems. It is intended to indicate that the Break Key or the Attention Key was hit. Note, however, that this is intended to provide a 129th code for systems which require it, not as a synonym for the IP standard representation.


    • Interrupt Process (IP)
      Suspend, interrupt, abort or terminate the process to which the NVT is connected. Also, part of the out-of-band signal for other protocols which use TELNET.


    • Abort Output (AO)
      Allow the current process to (appear to) run to completion, but do not send its output to the user. Also, send a Synch to the user.


    • Are You There (AYT)
      Send back to the NVT some visible (i.e., printable) evidence that the AYT was received.


    • Erase Character (EC)
      The recipient should delete the last preceding undeleted character or print position from the data stream.


    • Erase Line (EL)
      The recipient should delete characters from the data stream back to, but not including, the last CR LF sequence sent over the TELNET connection.


Top of Page

EXAMPLES

Top of Page


PROTOCOL RELATIONS
Parent layer
Child layer
TCP
Telnet
Top of Page

GLOSSARY
AO
Abort Output (AO). Many systems provide a function which allows a process, which is generating output, to run to completion (or to reach the same stopping point it would reach if running to completion) but without sending the output to the user's terminal. Further, this function typically clears any output already produced but not yet actually printed (or displayed) on the user's terminal.

ASCII
ASCII (American Standard Code for Information Interchange) is the most common format for text files in computers and on the Internet. In an ASCII file, each alphabetic, numeric, or special character is represented with a 7-bit binary number (a string of seven 0s or 1s). 128 possible characters are defined.

Unix and DOS-based operating systems use ASCII for text files. Windows NT and 2000 uses a newer code, Unicode. IBM's S/390 systems use a proprietary 8-bit code called EBCDIC. Conversion programs allow different operating systems to change a file from one code to another.

ASCII was developed by the American National Standards Institute (ANSI).

Bit
Bit (binary digit), the smallest unit of information on a machine, a leading statistician and adviser to five presidents. A single bit can hold only one of two values: 0 or 1. More meaningful information is obtained by combining consecutive bits into larger units. For example, a byte is composed of 8 consecutive bits.

Byte
Byte (binary term) is a unit of storage capable of holding a single character. On almost all modern computers, a byte is equal to 8 bits. Large amounts of memory are indicated in terms of kilobytes (1,024 bytes), megabytes (1,048,576 bytes), and gigabytes (1,073,741,824 bytes).

Code
Written computer instructions. The term code is somewhat colloquial. For example, a programmer might say: "I wrote a lot of code this morning" or "There's one piece of code that doesn't work."

Code can appear in a variety of forms. The code that a programmer writes is called source code. After it has been compiled, it is called object code. Code that is ready to run is called executable code or machine code.

Collision
The situation that occurs when two or more devices attempt to send a signal along the same channel at the same time. The result of a collision is generally a garbled message. All computer networks require some sort of mechanism to either prevent collisions altogether or to recover from collisions when they do occur.

Command
Command is an instruction to a computer or device to perform a specific task. Commands come in different forms. They can be: special words (keywords) that a program understands, function keys
choices in a menu and buttons or other graphical objects on your screen

Every program that interacts with people responds to a specific set of commands. The set of commands and the syntax for entering them is called the user interface and varies from one program to another.

Connection
A logical communication path identified by a pair of endpoints.

In dbAnywhere, a connection refers to the connection to the SQL Anywhere database.

Data
* Distinct pieces of information, usually formatted in a special way. All software is divided into two general categories: data and programs. Programs are collections of instructions for manipulating data. Data can exist in a variety of forms -- as numbers or text on pieces of paper, as bits and bytes stored in electronic memory, or as facts stored in a person's mind. Strictly speaking, data is the plural of datum, a single piece of information. In practice, however, people use data as both the singular and plural form of the word.

* The term data is often used to distinguish binary machine-readable information from textual human-readable information. For example, some applications make a distinction between data files (files that contain binary data) and text files (files that contain ASCII data).

* In database management systems, data files are the files that store the database information, whereas other files, such as index files and data dictionaries, store administrative information, known as metadata.

ESC
ESC is a key on computer keyboards. In DOS and Windows environments, pressing the Escape key usually cancels or aborts the current operation.

Full duplex
Full duplex refers to the transmission of data in two directions simultaneously. For example, a telephone is a full-duplex device because both parties can talk at once. In contrast, a walkie-talkie is a half-duplex device because only one party can transmit at a time.

Half-duplex
Half-duplex refers to the transmission of data in just one direction at a time. For example, a walkie-talkie is a half-duplex device because only one party can talk at a time. In contrast, a telephone is a full-duplex device because both parties can talk simultaneously. Duplex modes often are used in reference to network data transmissions.

Host
Host is a computer system that is accessed by a user working at a remote location. Typically, the term is used when there are two computer systems connected by modems and telephone lines. The system that contains the data is called the host, while the computer at which the user sits is called the remote terminal.

Host can refer to a computer that is connected to a TCP/IP network, including the Internet. Each host has a unique IP address.

Host can refer to provide the infrastructure for a computer service too. For example, there are many companies that host Web servers. This means that they provide the hardware, software, and communications lines required by the server, but the content on the server may be controlled by someone else.

IP
The IP (Internet Protocol) is a protocol which uses datagrams to communicate over a packet-switched network. IP specifies the format of packets, also called datagrams, and the addressing scheme. Most networks combine IP with a higher-level protocol called Transmission Control Protocol (TCP), which establishes a virtual connection between a destination and a source.

IP by itself is something like the postal system. It allows you to address a package and drop it in the system, but there's no direct link between you and the recipient. TCP/IP, on the other hand, establishes a connection between two hosts so that they can send messages back and forth for a period of time.

The current version of IP is IPv4. A new version, called IPv6 or IPng, is under development.

Interrupt Process
Many systems provide a function which suspends, interrupts, aborts, or terminates the operation of a user process. This function is frequently used when a user believes his process is in an unending loop, or when an unwanted process has been inadvertently activated.

Keyboard
Keyboard is a set of typewriter-like keys that enables you to enter data into a computer. Computer keyboards are similar to electric-typewriter keyboards but contain additional keys. The keys on computer keyboards are often classified as follows:
*alphanumeric keys -- letters and numbers
*punctuation keys -- comma, period, semicolon, and so on.
*special keys -- function keys, control keys, arrow keys, Caps Lock key, and so on.

The standard layout of letters, numbers, and punctuation is known as a QWERTY keyboard because the first six keys on the top row of letters spell QWERTY. The QWERTY keyboard was designed in the 1800s for mechanical typewriters and was actually designed to slow typists down to avoid jamming the keys. Another keyboard design, which has letters positioned for speed typing, is the Dvorak keyboard.

There is no standard computer keyboard, although many manufacturers imitate the keyboards of PCs. There are actually three different PC keyboards: the original PC keyboard, with 84 keys; the AT keyboard, also with 84 keys; and the enhanced keyboard, with 101 keys. The three differ somewhat in the placement of function keys, the Control key, the Return key, and the Shift keys.

In addition to these keys, IBM keyboards contain the following keys: Page Up, Page Down, Home, End, Insert, Pause, Num Lock, Scroll Lock, Break, Caps Lock, Print Screen.

There are several different types of keyboards for the Apple Macintosh. All of them are called ADB keyboards because they connect to the Apple Desktop bus (ADB). The two main varieties of Macintosh keyboards are the standard keyboard and the extended keyboard, which has 15 additional special-function keys.

Network
Network is a group of two or more computer systems linked together. There are many types of computer networks, including:
LANs (local-area networks), WANs (wide-area networks), CANs (campus-area networks), MANs (metropolitan-area networks) and HANs (home-area networks).

In addition to these types, the following characteristics are also used to categorize different types of networks: Topology, protocol and architecture.

Service
The NAS provides a service to the dial-in user, such as PPP or Telnet.

Standard
Standard is a definition or format that has been approved by a recognized standards organization or is accepted as a de facto standard by the industry. Standards exist for programming languages, operating systems, data formats, communications protocols, and electrical interfaces.

TCP
TCP (Transmission Control Protocol) is one of the main protocols in TCP/IP networks. TCP is one of the main protocols in TCP/IP networks. Whereas the IP protocol deals only with packets, TCP enables two hosts to establish a connection and exchange streams of data. TCP guarantees delivery of data and also guarantees that packets will be delivered in the same order in which they were sent.

TELNET
Telnet is a terminal emulation program for TCP/IP networks such as the Internet. The Telnet program runs on your computer and connects your PC to a server on the network. You can then enter commands through the Telnet program and they will be executed as if you were entering them directly on the server console. This enables you to control the server and communicate with other servers on the network. To start a Telnet session, you must log in to a server by entering a valid username and password. Telnet is a common way to remotely control Web servers.

USASCII
US-ASCII (7-Bit American Standard Code for Information Interchange) is defined in Standard ANSI X3.4-1986, US-ASCII. The 7-bit version of ASCII, which preceded (and is the basis for) 8-bit versions such as Latin-1, MacASCII and later, even larger coded character sets such as Unicode.

Virtual Terminal
Virtual Terminal allows you to manually process credit card transactions from any computer with an Internet connection in the world. You simply login to a secure website with a login and password and you are able to charge cards, perform authorizations, and even process credits. In addition, you have complete online reporting of all your transactions and orders.

Top of Page

REFERENCES


Top of Page

OTHER PROTOCOLS OF TCP/IP SUITE
AARP   RRP   RTP Video   RTP Audio   RTP   COPS   Gopher   HSRP   ICP   MPLS   IEEE 802.2   CIP   FTP - Data   FTP - Ctrl   IMAPS   IP Fragment   LDAPS   PUP   MSSQL   RSH   SQL   POP3s   RTELNET   RSVP   STP   VLAN   MSN   H.323   MSRDP   HTTPS   WINS   LPD   GTP   ICMPv6   POP   TELNET   H.225   VRRP   PIM   RARP   SAP   OSPF   RLOGIN   SCTP   SIP   RTCP   PPPoE   Mobile IP   IMAP3   WhoIs   SLP   NCP   PPTP   MGCP   LDAP   L2TP   Kerberos   IPv6   GRE   Ethernet SNAP   AFP   CIFS   IEEE 802.3   Finger   NBDGM   NetBEUI   NBSSN   ESP   EIGRP   EGP   DHCP   CGMP   CDP   BOOTP   AH   NBNS   EthernetII   ICQ   PPP   ARP   RIP   IPX   IGRP   IGMP   SSH   RPC   NetBIOS   TFTP   SNMP   SNA   SMB   RADIUS   NTP   NNTP   UDP   TCP   BGP   DNS   SOCKS   IMAP   RTSP   NFS   ICMP   IP   FTP   Telnet   POP3   SMTP   HTTP  
Search RFCs:

Advanced Search
Search Glossary:
Exact search
Fuzzy search


All Protocols
Submit a Request

Recommend an Article

 Layer 7 Application Layer
  AFP
  BOOTP
  CIFS
  CIP
  COPS
  DHCP
  DNS
  Finger
  FTP
  FTP - Ctrl
  FTP - Data
  Gopher
  HSRP
  HTTP
  HTTPS
  ICP
  ICQ
  IMAP
  IMAP3
  IMAPS
  Kerberos
  LPD
  MGCP
  MSN
  MSRDP
  MSSQL
  NCP
  NFS
  NNTP
  NTP
  POP
  POP3
  POP3s
  RADIUS
  RLOGIN
  RRP
  RSH
  RTCP
  RTELNET
  RTP
  RTP Audio
  RTP Video
  RTSP
  SAP
  SIP
  SLP
  SMB
  SMTP
  SNA
  SNMP
  SOCKS
  SSH
  Telnet
  TELNET
  TFTP
  WhoIs
  WINS
 Layer 6 Presentation Layer
  NBNS
  NBSSN
  NCP
  NetBIOS
 Layer 5 Session Layer
  LDAP
  LDAPS
  NCP
  NetBEUI
  RPC
 Layer 4 Transport Layer
  H.225
  H.323
  NBDGM
  NetBEUI
  PUP
  SCTP
  TCP
  UDP
 Layer 3 Network Layer
  AARP
  AH
  BGP
  EGP
  EIGRP
  ESP
  GRE
  GTP
  ICMP
  ICMPv6
  IGMP
  IGRP
  IP
  IP Fragment
  IPv6
  IPX
  Mobile IP
  MPLS
  OSPF
  PIM
  PPPoE
  RIP
  RSVP
  STP
  VRRP
 Layer 2 Data Link Layer
  ARP
  CDP
  CGMP
  Ethernet SNAP
  EthernetII
  IEEE 802.2
  IEEE 802.3
  L2TP
  PPP
  PPTP
  RARP
  SQL
  VLAN
 Layer 1 Physical Layer
© 2006 - 2007 - 2007 Colasoft Co., Ltd. All rights reserved.