RFC 137

Telnet Protocol - a proposed document

๐Ÿ“… published April 1971, from ietf

About This RFC ๐Ÿ’–

Okay bestie, this one is RFC 137, written by T. C. O'Sullivan of Raytheon and dated 30 April 1971 ๐ŸŽ€. It's filed under the Network Working Group as NIC 6714, and it's a request for comment, which means it's a draft shared early so people can review it before the official document comes out. It doesn't say it obsoletes or updates any other RFC, so as far as this doc is concerned, it's standing on its own โœจ.

It's also shared so the installations planning to build early versions of TELNET have a common basis to work from. ๐Ÿงš

The proposal is the work of a whole committee. It's the TELNET protocol the committee felt was adequate for initial implementation ๐Ÿ’…. A few recent suggestions from committee members and others got folded in too. Those weren't fully cleared with everyone, but the chairman felt they clarified the protocol or would make implementation simpler, without really changing the agreed approach ๐Ÿซถ.

TELNET Protocol ๐ŸŒธ

A Proposed Document ๐Ÿฆ‹

Prepared by: T. O'Sullivan for the TELNET Committee

               Will Crowther                 BBN
               Bob Long                      SDC
               John Melvin                   SRI-ARC
               Bob Metcalf                   Harvard
               Ed Meyer                      MAC
               Tom O'Sullivan (Chairman)     Raytheon
               Joel Winett                   MIT-LL

Background Reading ๐Ÿ“š

The readers are referred to these earlier releases of information, which are the previous pieces you'll want to have open:

  1. Conventions for Using an IBM 2741 Terminal or a User Console for Access to Network Server HOSTS Joel Winett, RFC 110 (NIC #5809)
  2. Level III Server Protocol for the Lincoln Laboratory 360/67 HOST Joel Winett, RFC 109 (NIC #5808)
  3. First Cut at a Proposed TELNET Protocol J. Melvin, D. Watson, RFC 97 (NIC #5740)
  4. ASCII Format for Network Interchange V. Cerf, RFC 20 (NIC# 4722)

Another RFC is going out before the Atlantic City meetings, and it's going to have a lot of the arguments backing up this proposal ๐Ÿ”ฅ.

Introduction ๐Ÿงš

TELNET is a third-level protocol. Its whole job is to make a terminal (or process) at a using site look, to the system or a process at a serving site, logically equivalent to a terminal "directly" connected to the serving site ๐Ÿ’…. While it does this, it tries to keep the amount of information each HOST has to store about the other HOSTS as small as possible โœจ.

Definitions ๐Ÿ’œ

Protocol Levels (see Figure 1) ๐Ÿ“

Level 1

HOST-IMP protocol, specified by BBN in NIC 5735, Specifications for the Interconnection of a HOST, and an IMP (BBN Report 1822) ๐Ÿ›ฐ๏ธ

Level 2

HOST-HOST protocol performed by NCPs, as described in Document Number 1 (NIC 5413) and subsequent amendments, see RFC 107 (NIC #5806) ๐Ÿ”—

One way to think about the NCP's function: it takes information from the net and routes it to receiving processes through mechanisms internal to each HOST. Going the other way, processes use the NCP, through internal system calls, to have information routed to other processes in the net (via the other processes' NCPs). It's giving switchboard operator ๐Ÿ“ž

Level 3 (see Figure 2) ๐Ÿ‘‘

Level 3 is, by definition, the place to which and from which the NCP communicates internally in its own host.

This level may be equivalent to the user process level in some systems, but this may not be the case in all systems. At using sites, the TELNET process operates at this level. At serving sites, the TELNET server operates at this level ๐ŸŒˆ.

Initial Connection Protocol (ICP) ๐Ÿค

An agreed-upon sequence of level 3 exchanges between two processes, which is generally used to synchronize the dialogue between the processes, e.g., RFC 80 (NIC #5608) #1 โœจ.

Serving Site ๐Ÿ 

The HOST into which the TELNET process is directing the user's keyboard input, and from which the TELNET process is receiving control information and data that affects the user's terminal. At the serving site, a TELNET server is executing ๐Ÿ’ป.

Using Site ๐ŸŽ€

The HOST in which the TELNET process is executing ๐Ÿซง.

Sending Site ๐Ÿ“ค

The HOST transmitting data. It could be either the using site or the serving site ๐Ÿ’Œ.

Receiving Site ๐Ÿ“ฅ

The converse of the sending site ๐Ÿ”.

User ๐Ÿ™‹โ€โ™€๏ธ

The person or process "driving" the TELNET process ๐Ÿš—.

Services and Conventions ๐ŸŒท

In providing services, the TELNET protocol will use established network conventions. Specifically, it uses the Network Control Program and the Initial Connection Protocol, both referenced in the definitions above ๐Ÿ’….

The Network Virtual Terminal ๐Ÿ–ฅ๏ธ

The TELNET protocol provides for a Network Virtual Terminal (NVT), which is how users 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, with the high order bit set to zero ๐Ÿ”ข.

It's the responsibility of the using site to give its users a way to produce all 128 ASCII codes, as well as a selected set of special TELNET control signals (see Figure 3) ๐ŸŽน.

The ASCII character ESC will be used by the user as an escape signal, which tells you the next character(s) has special meaning ๐Ÿšจ. The meaning given to the escape code is defined by the serving site, so it may not be consistant across the network ๐ŸŒ€.

It's 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 site's 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 a carriage return followed by a line feed โ†ฉ๏ธ.

The protocol assumes that, at first, the serving site will not provide any echo to the using site ๐Ÿ™ˆ.

Control Codes ๐Ÿ’…

Each TELNET control signal that needs its code sent over the connection will be represented in the NVT by an eight-bit code, with the high order bit set to one ๐ŸŽ€. Here are the special codes established so far. (U) means that in most implementations the user would be expected to be able to signal the TELNET process from their terminal to start the code ๐Ÿš€.

Code X'A0'

   Source:  Both Sites (U)
   Meaning: A DATA TYPE[1] signal indicating that code will be
            transmitted by NVT, i.e., using the seven-bit ASCII
            conventions.

Code X'80'

   Source:  Using Site (U)
   Meaning: Order using site NCP to send an INS and insert X'80' in
            data stream.

Code X'81'

   Source:  Using Site (U)
   Meaning: Break or Attention

Code X'82'

   Source:  Serving System
   Meaning: Reverse Break

Code X'83'

   Source:  Both Sites
   Meaning: I Echo

Code X'84'

   Source:  Both Sites
   Meaning: You Echo

Code X'85'

   Reserved

Code X'86'

   Reserved

Code X'87'

   Source:  Both Sites
   Meaning: This site has not implemented the following control code.

Code X'88'

   Source:  Both Sites
   Meaning: [2]Return to control mode, i.e. next byte will be a
            control signal, possible a new DATA TYPE.

Local Control Signals ๐ŸŽ›๏ธ

Some special TELNET control signals are required to let the user on some systems send control information to the using site TELNET process. These don't need a matching control code for transmission. The local TELNET control signals are:

  1. Transmit all data to this point.
  2. Suppress transmission of end of line, send all other data.

Data is to be forwarded to the NCP for transmission as convenient, but at least at the end of line, end of line suppression, and transmit signals ๐Ÿšš. If the normal line length of the sending site is greater than the allocation given by the receiving site, the sending site's TELNET process or TELNET server will be responsible for breaking the line into convenient lengths and handing them over to the NCP for transmission โœ‚๏ธ.

Future Data Types ๐Ÿ”ฎ

This document will be revised as necessary to provide conventions for data types, in addition to the NVT ASCII type ๐ŸŒŸ.

Part 1 is done! Part 2 brings the footnotes, the figures, and the rest of the ASCII table, and it's where the footnotes [1] and [2] get explained ๐ŸŽ€.

Okay bestie, here's the rest of the chart ๐Ÿงš๐Ÿ’… Table one first, then the full grid of codes.

| I  +---+---+---+---+------+----+----+----+----+----+----+----+----+
+  T | b | b | b | b |\COL->|    |    |    |    |    |    |    |    |
\   S| 4 | 3 | 2 | 1 | \    |    |    |    |    |    |    |    |    |
 \   |   |   |   |   | |\   | 0  | 1  | 2  | 3  | 4  | 5  | 6  | 7  |
  \  | | | | | | | | | v \  |    |    |    |    |    |    |    |    |
   \ | v | v | v | v |ROW \ |    |    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 0 | 0 | 0 |   0  |NUL |DLE | SP | 0  | @  | P  | \  | p  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 0 | 0 | 1 |   1  |SOH |DC1 | !  | 1  | A  | Q  | a  | q  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 0 | 1 | 0 |   2  |STX |DC2 | "  | 2  | B  | R  | b  | r  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 0 | 1 | 1 |   3  |ETX |DC3 | #  | 3  | C  | S  | c  | s  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 1 | 0 | 0 |   4  |EOT |DC4 | $  | 4  | D  | T  | d  | t  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 1 | 0 | 1 |   5  |ENQ |NAC | %  | 5  | E  | U  | e  | u  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 1 | 1 | 0 |   6  |ACK |SYN | &  | 6  | F  | V  | f  | v  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 1 | 1 | 1 |   7  |BEL |ETB | '  | 7  | G  | W  | g  | w  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 0 | 0 | 0 |   8  | BS |CAN | (  | 8  | H  | X  | h  | x  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 0 | 0 | 1 |   9  | HT | EM | )  | 9  | I  | Y  | i  | y  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 0 | 1 | 0 |  10  | LF |SUB | *  | :  | J  | Z  | j  | z  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 0 | 1 | 1 |  11  | VT |ESC | +  | ;  | K  | [  | k  | {  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 1 | 0 | 0 |  12  | FF | FS | ,  | <  | L  | \  | l  | |  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 1 | 0 | 1 |  13  | CR | GS | -  | =  | M  | ]  | m  | }  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 1 | 1 | 0 |  14  | S0 | RS | .  | >  | N  | ^  | n  | ~  |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 1 | 1 | 1 |  15  | S1 | US | /  | ?  | O  | _  | o  |DEL |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
         Code Structure      8   7   6   5   4   3   2   1
                        --- --- --- --- --- --- --- --- --- ---

Now table two, the upper-half codes ๐Ÿฆ‹โœจ

+---------------------------+----+----+----+----+----+----+----+----+
|\ b8  ->                   | 1  | 1  | 1  | 1  | 1  | 1  | 1  | 1  |
| \ b7  ->                  | 0  | 0  | 0  | 0  | 1  | 1  | 1  | 1  |
|  \ b6  ->                 | 0  | 0  | 1  | 1  | 0  | 0  | 1  | 1  |
|B  \ b5  ->                | 0  | 1  | 0  | 1  | 0  | 1  | 0  | 1  |
| I  +---+---+---+---+------+----+----+----+----+----+----+----+----+
+  T | b | b | b | b |\COL->|    |    |    |    |    |    |    |    |
\   S| 4 | 3 | 2 | 1 | \    |    |    |    |    |    |    |    |    |
 \   |   |   |   |   | |\   | 8  | 9  | 10 | 11 | 12 | 13 | 14 | 15 |
  \  | | | | | | | | | v \  |    |    |    |    |    |    |    |    |
   \ | v | v | v | v |ROW \ |    |    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 0 | 0 | 0 |   0  |'80'|    |'A0'|    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 0 | 0 | 1 |   1  |'81'|    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 0 | 1 | 0 |   2  |'82'|    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 0 | 1 | 1 |   3  |'83'|    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 1 | 0 | 0 |   4  |'84'|    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 1 | 0 | 1 |   5  |'85'|    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 1 | 1 | 0 |   6  |'86'|    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 0 | 1 | 1 | 1 |   7  |'87'|    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 0 | 0 | 0 |   8  |'88'|    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 0 | 0 | 1 |   9  |    |    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 0 | 1 | 0 |  10  |    |    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 0 | 1 | 1 |  11  |    |    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 1 | 0 | 0 |  12  |    |    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 1 | 0 | 1 |  13  |    |    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 1 | 1 | 0 |  14  |    |    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+
     | 1 | 1 | 1 | 1 |  15  |    |    |    |    |    |    |    |    |
     +---+---+---+---+------+----+----+----+----+----+----+----+----+

Quick note, the 'XX' codes are the HEX designations for the TELNET Control Signals ๐Ÿ’œ

Figure 3. Official Network Virtual Terminal Code ๐ŸŽ€

[This RFC was put into machine readable form for entry] [into the online RFC archives by Sergio Kleiman, 8/01]

๐Ÿ“ฆ where this page comes from