Network Working Group J. Postel
Request for Comments: 857 J. Reynolds
ISI
Obsoletes: NIC 15390 May 1983
TELNET ECHO OPTION
1. Command Name and Code
ECHO 1
2. Command Meanings
IAC WILL ECHO
3. Default
WON'T ECHO4. Motivation for the Option Postel & Reynolds [Page 1]
RFC 857 May 1983
The NVT has a printer and a keyboard which are nominally interconnected so that "echoes" need never traverse the network; that is to say, the NVT nominally operates in a mode where characters typed on the keyboard are (by some means) locally turned around and printed on the printer. In highly interactive situations it is appropriate for the remote process (command language interpreter, etc.) to which the characters are being sent to control the way they are echoed on the printer. In order to support such interactive situations, it is necessary that there be a TELNET option to allow the parties at the two ends of the TELNET connection to agree that characters typed on an NVT keyboard are to be echoed by the party at the other end of the TELNET connection.
5. Description of the Option
When the echoing option is in effect, the party at the end performing the echoing is expected to transmit (echo) data characters it receives back to the sender of the data characters. The option does not require that the characters echoed be exactly the characters received (for example, a number of systems echo the ASCII ESC character with something other than the ESC character). When the echoing option is not in effect, the receiver of data characters should not echo them back to the sender; this, of course, does not prevent the receiver from responding to data characters received.
<----------------
Process 1 Process 2
---------------->
Neither end echoes
<----------------
\
Process 1 / Process 2
---------------->
One end echoes for itself
Postel & Reynolds [Page 2]
RFC 857 May 1983
<----------------
\
Process 1 / Process 2
---------------->
One end echoes for the other
<----------------
\ /
Process 1 / \ Process 2
---------------->
Both ends echo for themselves
<----------------
\ /
Process 1 / \ Process 2
---------------->
One end echoes for both ends
This option provides the capability to decide on whether or not either end will echo for the other. It does not, however, provide any control over whether or not an end echoes for itself; this decision must be left to the sole discretion of the systems at each end (although they may use information regarding the state of "remote" echoing negotiations in making this decision).
Postel & Reynolds [Page 3]
RFC 857 May 1983
Implementations of the echo option, as implementations of all other TELNET options, must follow the loop preventing rules given in the General Considerations section of the TELNET Protocol Specification. Also, so that switches between echo and non-echo mode can be made with minimal confusion (momentary double echoing, etc.), switches in mode of operation should be made at times precisely coordinated with the reception and transmission of echo requests and demands. For instance, if one party responds to a DO ECHO with a WILL ECHO, all data characters received after the DO ECHO should be echoed and the WILL ECHO should immediately precede the first of the echoed characters.
6. A Sample Implementation of the Option
The following is a description of a possible implementation for a simple user system called "UHOST".
Postel & Reynolds [Page 4]
RFC 857 May 1983
If while a connection is open, the UHOST terminal user changes either the P-bit or D-bit, the UHOST will repeat the above tests and send off a DO ECHO or DON'T ECHO, if necessary. When the connection is closed, the UHOST would reset the A-bit to indicate UHOST echoing.