THINK Home Digital Archive Search Feedback

 

THINK  ARPANET

This paper explores the development and design issues relating to the conception and implementation of an effective and useful Telnet protocol, during the first years of it's existence within the ARPANET. The paper assumes a general understanding of ARPANET protocol layers but also provides a basic overview for the reader. Assistance with terminology is provided throughout the document by following the links. Much of the specific Telnet terminology can be found in RFC 854.


Introduction

Telnet is defined by the IEEE as, "the remote terminal access protocol of the Internet Protocol Suite." [The DARPA Internet Protocol Suite] Today, we have two such protocols: rlogin and Telnet, where both provide a remote login to a server to run programs on that server. Yet rlogin and Telnet are not the same. Rlogin assumes both sides of the connection are UNIX hosts and thus allows for only homogenous interaction. Telnet works across heterogeneous systems, where no host type assumptions are made. Today's Telnet provides option negotiation between the client and server, only adding capabilities if both sides support them. This provides a bare bones implementation as a standard default Telnet, and a feature incremented system for systems that support more advanced features. The Telnet protocol is full duplex, and is essentially based on three general ideas: that of a Network Virtual Terminal (NVT), negotiated options and the symmetry of processes.

Telnet operates as follows:

  • The user sits at a real computer terminal entering information into the Telnet module.
  • The Telnet module on the users computer translates that information to NVT information and sends it over the Internet to the server computer.
  • At the server computer, the server Telnet module translates the NVT information back to a form that programs at that computer expect from local terminals. This allows for dissimilar operating systems to communicate.
  • The information is then given to the program being run on the serving computer, and any responses are then sent back to the user via the reverse path, using the inverse series of translations.

The ideas defined as: the Network Virtual Terminal (NVT), negotiated options and the symmetry of processes, form a decisive blueprint for the practical implementation of the Telnet protocol. This is indicative of a truly significant effort, by a group of incredibly talented networking pioneers between the late 1960's and mid-1970's. Telnet was the very first service implemented in the DARPA network system. In the earliest design, the goal was to allow a user with an interactive terminal attached to one time-sharing computer to use another computer as if the terminal were connected. Telnet was developed to provide considerable computing power at both ends of a host-to-host connection. [Internet Applications Using the DARPA Internet Suite] A primary goal in the development of this paper is to demonstrate that the evolution of today's useful, easy-to-use and functional Telnet protocol was essentially brought about through cooperation, persistence and resolve.

Telnet's Early Design and Development

In April of 1969, RFC 1 written by Steve Crocker discussed the preliminary requirements for the host-host software. He documents the underlying goal of "finding a host level protocol capable of facilitating a connection between two hosts, where the remote host acts as if the user were sitting directly at that terminal." [RFC 1] The RFC outlines some basic requirements by documenting the desire for, "the use of a TTY-like connection and a file-like connection in order to facilitate a complete connection between two hosts and the need for error checking." Thus began the search for a sequence of protocols, and more specifically, the applications protocols that would evolve into Telnet and FTP.

Bolt, Baranek and Newman (BBN), a small acoustical consulting firm based in Cambridge, MA had won the contract to manufacture the first subnet routers (Interface Message Processors). BBN had assigned the responsibility of enabling the ARPA hosts to communicate with a remote host over the network to the host site teams. This collective, comprising mainly of graduate students under the supervision of Lawrence Roberts of Bolt, Baranek and Newman, was formally known as the Network Working Group (NWG), and they were faced with the daunting and heavily pressured task of designing and implementing specific protocols to provide user functionality to the newly forming ARPANET.

RFC 15 written by C. Stephen Carr of Utah in September 1969 reads, "In addition to user program access, a convenient means for direct network access from the terminal is desirable. A sub-system called "Telnet" is proposed which is a shell program around the network system primitives, allowing a teletype or similar terminal at a remote host to function as a teletype at the serving host."

Establishing A Connection

When the ARPANET finally became a reality on October 1st 1969, Bill Duval, a Stanford Researcher, had written a very specific interim solution for the SDS 940 to display the most recent data sent to it by a remote host to which it was connected. Researchers at UCLA using a Sigma 7 machine and by directly dialing into the SRI host using a modem and a teletype, had by this time familiarized themselves with the SRI's time sharing system to prepare themselves for the first demonstrated login session. Summarizing this initial development process in RFC 1000, Reynolds and Postel wrote, "Lawrence Roberts and Barry Wessler came by for a visit on November 21, and we actually managed to demonstrate a Telnet-like connection to SRI."

By December, the network had expanded to four IMPs and these were connected between the Stanford Research Institute host (SDS 940), UCLA host (Sigma 7), the University of Santa Barbara host (IBM 360/75) and the University of Utah host (DEC PDP-10). A rudimentary implementation of the 'Telecommunications Network' protocol, essentially the first network application, was demonstrated on the four-IMP network installed in December 1969. The NWG, feeling the strain to show something to ARPA, demonstrated a patched protocol that allowed for remote logins. According to Reynolds and Postel in RFC 1000, "only asymmetric, user-server relationships were supported." This indicates that the functions and mechanisms for controlling the network connection were used in only one direction between the two hosts. However, Telnet was a way to use the network, and not a lower level building block. Telnet allowed one terminal to reach multiple computers, but a remote login program by itself did not solve the problem of letting two computers work together. This patched version of Telnet had been implemented even before an official host-host protocol had been defined, and as such took on much of the responsibilities that would be assumed by the forthcoming NCP.

Patching Telnet using the NCP (1970)

It was a year later, in the summer of 1970, that a host-to-host communications protocol known as the Network Control Protocol (NCP) was completed. The NCP encapsulated the ideals Steve Crocker had essentially foreseen and documented in the first RFC, and those ideals Lawrence Roberts of BBN had envisioned and implemented through the Network Working Group. NCP originally meant the program within the operating system that managed connections. The layering approach to protocol design, put forth by Roberts, foresaw the separation of the user level protocols from the host layer, so as to separate applications from the operating system functions as much as possible.

The Spring Joint Computer Conference in 1970 documented the way connectivity between Telnet processes interacting with the NCP were established via system calls. The NCP to NCP processes were connected across a link interacting via control commands, and as such they were able to perform their primary function to establish, break and switch connections and control flow between hosts. An NCP connection was simplex so that two connections were needed if two processes were to converse in two directions. One such command initiated the connection to a process listening for login requests, termed a 'logger'. This 'logger' was a set of processes in the serving system, listening on socket zero, that responded to the ICP and performed the initial interactions between user and server. (See the ICP protocol paper for a more in depth discussion of the socket switching process)

An Example of Early Telnet

To summarize the connection process, lets look at an example. If a user at the University of Utah wanted to connect to the remote system at SRI. The user signed onto the local host, (Utah's Honeywell PDP-10), and subsequently issues the run command to start up the Telnet subsystem. The word 'subsystem' is used to differentiate between the network level and the Telnet process built on top of the network level. Telnet made the appropriate system calls to the NCP process, indicating a desire to request a connection. At this point, the NCP process in the user host, attempted to establish a pair of connections to the SRI 'logger. At that stage, the user was now in a prelogged state analogous to the state after dialing into a computer and making a connection over a standard teletype. A user logged into the remote host at SRI with a login and password. Characters typed onto the users teletype were transmitted unaltered through the PDP-10 and onto SRI's 940. The PDP-10's Telnet subsystem would automatically switch to full duplex, and send information over the connection in character-by-character transmission mode, as the default mode of transmission dictated by SRI's 940 system. To send a file, the user on the PDP-10 could use the command NETWRK, then the name of the local file to send over the connection to the server's subsystem. Typing the break character (to switch back to the local system), followed by an additional character to the Telnet program, would result in the file being sent to the serving host. [Host-Host Communication Protocols in the ARPA Network]

It was clear that this kind of networking would present considerable problems where a high degree of interaction was required between the user and a particular subsystem on a foreign host. These problems were those due to heterogeneous consoles, local operating system overhead and network transmission delays. Problems were anticipated even for simple teletype displays, for example. One suggestion for resolving the problem of heterogeneous consoles was the adoption of a network-wide language for consoles, to provide for the distinct treatment of different classes of consoles. Each site would be responsible for writing interface programs to make them look like network standard devices.

 

A Telnet Protocol Proposal

The first written proposal of the Telnet protocol was published in RFC 97, entitled "A First Cut at a Proposed Telnet Protocol" and was written by J.T. Melvin and R.W. Watson of SRI. This RFC was released on February 15, 1971, almost eighteen months after the first preliminary network connections had been established. Melvin and Watson stated that the need to set specifications would allow online access to the Network Information Center. The idea was that by focusing on a connection to the network in the form of the NIC or NLS as it was also referred, "may force us toward a more standard way of handling terminals and their character streams in our monitors and our terminal control hardware." [RFC 97]

In defining basic assumptions about the functionality of making a terminal appear over a network, the first was that a user should be able to generate all the character codes that the serving system could generate. As the NIC was capable of 128 ASCII codes, this was set as the default requirement. There was a need for the user to be able to escape back to the local system from a server process running over the network and a call to standardize the interaction of systems using character-at-a-time systems and line-at-a-time systems. As the NIC used character-at-a-time, it is interesting to note that today's standard is indeed, character-at-a-time. RFC 97 states, "what characters are echoed for what keys struck is of no concern to the serving site." The serving site would assume that the user site, until "explicitly commanded otherwise" would perform echoing.

Also, there needed to be an escape mechanism for the user to be able to switch between character mode and control mode, effectively breaking out of the program on the serving host, and back into control of the actual remote process being handled on the local system. There was a call to define format control characters: HT (horizontal tab), VT (vertical tab), FF (form feed), LF (line feed) and CR carriage (return). The carriage return character would prove to be a particular difficulty over heterogeneous systems, because some systems echoed nothing, while others a CR or a CRLF, and some others would echo CR, CRLF or EOL (end of line). It was also noted that for character or line at a time systems, the Telnet process might need to recognize a character to define the end of stream, to signify the end of the transmission of characters entirely.

A Specific Telnet Protocol

It was not until April 3rd, 1972, that Telnet was specifically detailed as to its actual implementation in an RFC. This was RFC 318, written by Jon Postel of UCLA under pressure by the NWG to produce a document that, "clearly and succinctly specified the official Telnet protocol". Even at the time RFC 318 was written, Postel was aware that the specifics of the protocol laid out in the RFC were unclear and unspecific. Postel notes to the reader that the RFC, "presents my understanding of the Telnet protocol", and that, "there are many who have serious questions about this protocol."

Network Virtual Terminal

The Telnet Protocol in RFC 318 defined a Network Virtual Terminal (NVT), which was an imaginary standard reference terminal. One task of an implementation of Telnet was to translate the characteristics of a real terminal into the characteristics of the NVT. (And vice versa). The NVT approach required translations between each type of real terminal and the NVT to be implemented. Without this approach direct translations would be required between all pairs of types of real terminals. The original spectrum of host computers connected to the ARPANET were a motley crew: a variety of keyboards, character sets, display sizes, line lengths, speeds, and those were just the physical incompatibilities. The terminal sessions themselves were governed by time-sharing systems, each with their own peculiar ways of stopping and starting processes, controlling the flow of output, and so on. Rather than writing terminal drivers for each host system, the NVT provided a basis for exchanging information.

NVT was a bi-directional character device, representing characters as 7-bit ASCII codes, using an 8-bit field. Each implementation of Telnet had to provide a mapping from 7-bit ASCII to the local character set. The restricting of the character set to only 7 bits meant that some mappings would not be one-to-one. Control signals were used to synchronize state and also provided means to interrupt the machines and these signals used the 128-255 ASCII range. Some of the more prominent control codes are described below.

Control Codes and Issues Specifically Addressed

For situations in which the user required some mechanism for flagging attention, a set of 'special' characters was described. These were formed with the high order bit of the character set turned on. The input stream was scanned for these special characters, and if one was found then processing was stopped and the appropriate action would be taken. In the case where one side of the connection received too much information and its buffers filled up, the Telnet process would send an Interrupt on Send (INS) signal implemented by the Network Control Program that would stop the sender from overrunning the receiver's buffers. In the case where the sender wanted to give a special instruction, such as the BREAK character (129), the input stream was scanned for the control characters, but all but the attention characters were discarded. When the SYNCH condition was met (that is, as soon as the DATA MARK character (128) was seen), the receiver would resume its normal processing once more. In this manner, a control structure was built to handle interrupts.

Provision was made in RFC 318 for a HIDE YOUR INPUT code (133) to be a signal sent from the server to the user system echoing locally, to suppress echoing while the user was attempting to type something secret, such as a password. This code along with those for echoing would be the subject of much debate in subsequent RFC's. There were two options in terms of echoing, that of echoing locally or echoing remotely. In systems where echoing could not be turned off, his meant passwords would be echoed regardless of the users' wishes against doing so, and thus posing a security hazard. To solve this problem all Telnet implementations were required to echo locally and It was suggested that noise characters be used to cover sensitive information (such as passwords). ECHO and NOECHO were introduced as control commands to turn echoing on or off. RFC 318 also provided for Telnet to use additional data sets, rather than just ASCII. Using one of three signal codes, the user could specify: ASCII, Transparent or EBCDIC (used for IBM systems in particular). This too would be a controversial issue, but eventually lead to the standard ASCII data type.

The Network Virtual Terminal provided a printer and a keyboard. The printer responded to incoming data and the keyboard produced outgoing data. The printer responded to just eight of the control codes. These included line feed and carriage return and other general document formatting commands. No other ASCII codes (aside from actual character ASCII, i.e. 'a', 'b', 'c'.) had any effect on the NVT printer. The NVT keyboard however, was able to represent all 128 ASCII codes. Another issue NVT took care of was that of the end-of-line convention. The RFC states that an end of line for the Telnet protocol would be specified by a carriage return in addition to a line feed. (CRLF). This convention applied to both printer and keyboard. Systems having a problem with this convention were given suggestions for ways to interpret the end of line convention of CRLF. [RFC 318]

 

Standardization of the Protocol

The issue of standardization revolved around the formalization of the Telnet protocol. Almost as soon as RFC 318 was released, a number of issues were addressed, and can be seen in RFCs 328, 340 and 393, between April and October 1972. The protocol specified in RFC 318 had mentioned two implementations of Telnet. The first was defined as a minimum version and the second, a standard version. Each Telnet implementation had to support the minimum implementation, but it had been devised that Telnet could add features up to level a specified in a standard version. This resulted in a number of different implementations of Telnet being released, where an incompatibility of features existed across them. This effectively meant that the only stable Telnet protocol was that specified for the initial implementation, and the standard with the envisioned upgraded features was, to a great extent, useless.

A solution was first suggested and submitted by Jon Postel in RFC 328, which suggested that only one implementation be kept and it be the original basic standard. The protocol was also scrutinized, and its specifications defined more clearly, in several published conference papers, along with a plethora of suggested revisions, such as the suggestion to remove HIDE YOUR DATA and remove the provision for multiple character sets. Primarily however, the issues under discussion between 1972 and 1973 addressed three areas of concern: the standardization of the protocol, its asymmetry and an inadequate control structure.

Asymmetry and an Inadequate Control Structure

Bernie Cosell and Dave Walden at BBN in January 1973 released RFC 435. They outlined a solution for resolving the issue of asymmetry within the Telnet process. For example, to help solve the security problem of echoed passwords, a HIDE YOUR INPUT command had been defined, which instructed a system not to display characters. To turn it off, the ECHO command was used, and this actually turned echoing on, even if this was not the desired action. Moreover, some systems would send a character at a time over the connection, whereas others would buffer an entire line before sending it. In the original Telnet protocol, it was the end of line (CR followed by LF) that would signify when to send information in a line-at-a-time system. This caused a problem when a line-at-a-time mode was being used, since the user needed a reply from the server before the end of the line. Furthermore, even though the syntax of ECHO and NOECHO was symmetrical, their semantics were not. ECHO meant both ends could echo to each other, whereas NOECHO meant the other would not echo. Thus, there was also a problem with the control structure of the protocol.

The realization was that a different control structure might solve both the echoing and the character parsing problems. The focus became three main principles: default implementation, negotiated options and symmetry.

  • The distributed burden would be kept minimal if a basic default set of options were defined for all implementations of Telnet.
  • An attempt to get both parties to agree upon a set of negotiated options was a second focal point for discussion. The negotiated options idea called for a base level of capability as the default operation. Then enhancements would be negotiated via the exchange of requests between the two hosts. Abhay Bushan suggested that line-at-a-time and character-at-a -time mode should be one of these negotiated options.
  • By working on a principle of symmetry it would no longer be necessary to distinguish between the server and user while sending an option. This symmetry made both sides react and negotiate options in exactly the same way, to determine the abilities of each system. This means that the protocol functions and mechanisms may be used in either direction between the Telnet modules and this allows the protocol to be used to support user-user or process-process communication as well as the user-process communication most commonly implemented up to this point.

The Tenex group, and in particular, Thomas, Burchfiel and Tomlinson, proposed that a new syntax be introduced, where there would be four prefixes available to each command for negotiating NVT ASCII. These would be sufficient to ensure completely symmetric echoing. Options are negotiated via an exchange of commands between the Telnet modules. The commands would be DO, DONT, WILL and WONT. Since options would be applied to each direction of data flow separately, the use of the option for each direction would be negotiated separately. These would determine the status of the command, and in this manner the systems that were communicating would negotiate an agreeable status.

The commands have the following interpretations:

  • DO = Please begin performing the option
  • DONT = Stop performing or do not begin perform the option
  • WILL = I will begin performing the option
  • WONT = I will stop performing the option or will not begin performing the option

The adoption of symmetry meant that the previously defined DATA MARK / INS sequence which was used for interrupting a process, could no longer function between user and server. As this command essentially resulted in the flushing of the buffers from server to user, it was suggested that a CLEAR YOU BUFFER option be added.

Following these specifications, a meeting hosted at UCLA on March 5th, 1973 formulated the new specification for the Telnet protocol. All the major players of the NWG were in attendance. The group proposed two key dates for, 'phasing in' the new Telnet protocol. Between January 1st, 1973 and January 1st, 1974, sites would need to, "gradually implement and test the interpreter for the new commands." Sites would be able to use the new codes from the earlier date without experiencing errors, while the latter date signified when the old code for interpreting the old commands should be discarded. The new Telnet would be implemented through the TCP specification on January 1st, 1974, closely followed by the FTP switch in February of the same year. Jon Postel, commenting on the seamless rollout for integrating the new standard for networking, wrote in ARPANET news in November 1973, "the user sitting at his terminal should not notice the changeover, and will not have to do anything different." [Issue 9 page 26] This meeting also forwarded additional negotiable options that are still in use today. [RFC 495]

The final edition of the Telnet protocol took ten more years to fully develop, culminating in Internet Standard 8, in 1983. This was three years after the final TCP specification begun in 1973, was ratified in 1980. The complete Telnet Protocol Specification based on the Transmission Control Protocol, and formally constructed upon the three principles: the Network Virtual Terminal, the negotiated options and the symmetric view of terminals and processes, are laid out in RFC 854. Written in May 1983, this document specifies the standard for the Internet community.

Summary

Telnet's remarkable stability deserves close study. Simplicity alone is held up as a classic cause: the NVT is an artful balance of features that can span the range from half-duplex teletypes to cell phone-PCs. Option negotiation was a farsighted addition at the time it was devised, although it did not become a hallmark of IETF protocol design until the late Eighties. Many other systems had hooks for new headers, new verbs, and so on, but few planned ahead with administrative procedures for managing the option space.

As defined by RFC 97 in February 1971, the Network Information Center's NLS used character-at-a-time as the mode for sending characters across the Telnet connection, and was capable of 128 ASCII codes. It is interesting to note that today's standard is indeed, character-at-a-time and ASCII, by default. Steve Crocker has stated that, "As we gained experience with these initial protocols, the Host-Host protocol was seen as needing important changes, but the Telnet and FTP protocols remained relatively stable with only modest embellishments and changes over three decades." This comment would support the primary goal of this paper in that the evolution of today's useful, easy-to-use and functional Telnet protocol was essentially brought about through cooperation, persistence and resolve.

With hindsight, it seems apparent that Telnet actually progressed and evolved steadily by building upon the strengths of the last implementation. Crocker's statement is therefore indicative of a learning process and protocol development that evolved gracefully into the strong, user-friendly protocol utilized by computer scientists today.


Bibliography


Source Papers

RFC's

  • RFC 1 "Host Software"; S.Crocker; April 7, 1969
    (Discusses the IMP software and the implications on Host-Host Software)
  • RFC 15 "Network Subsystem for Time Sharing Hosts"; C.Carr; September 25, 1969

  • RFC 91 "A Proposed User-User Protocol"; G.Mealy; December 27,1970

  • RFC 97 "A First Cut at a Proposed Telnet Protocol"; J.T. Melvin and R.W. Watson, February 15 1971
    (Obtained by special request)

  • RFC 197 "Initial Connection Protocol"; A. Shoshani, E. Harslem July 14, 1971

  • RFC 318 "Telnet Protocol"; J.Postel; April 3, 1972

  • RFC 328 "Suggested Telnet Protocol Changes"; J. Postel; April 29, 1972.

  • RFC 340 "Proposed Telnet Changes"; T.O'Sullivan; May 15, 1972
  • RFC 393 "Comments on Telnet Protocol Changes"; J.Winett; October 3, 1972

  • RFC 435 "TELNET issues"; B. Cosell, D.Walden, January 5, 1973.

  • RFC 495 "Telnet Protocol Specification"; A.McKenzie, May 1, 1973

  • RFC 513 "Comments on the New Telnet Specification"; W.Hathaway; May 30, 1973
  • RFC 559 "Comments on the New Telnet Protocol and it's Implementation"; A.Bhushan, August 15, 1973

  • RFC 726 "Remote Controlled Transmission and Echoing Telnet Option"; J.Postel and D.Crocker; March 8, 1977
  • RFC 728 "A Minor Pitfall in the Telnet Protocol"; J.Day; April 1977
  • RFC 854 "TELNET Protocol Specification"; J. Postel, J.K. Reynolds; May 1, 1983.

  • RFC 855 "Telnet Option Specifications"; J.Postel and J.Roberts; May 1983

  • RFC 1000 "The Request For Comments Reference Guide"; J. Reynolds and J.Postel; August, 1987
       (A reference guide for the Internet community summarizing the RFCs issued between April 1969 and March 1987)
  • RFC 1123 "Requirements for Internet Hosts - Application and Support"; R.Braden; October 1989

 

 

Written by the THINK Protocols team, CS Dept, UT Austin
Please direct comments to Chris Edmondson-Yurkanan.

Tuesday, 11-Jun-2002 10:19:45 CDT.