INTERNET-DRAFT Network Working Group Glen Clark Request for Comments: nnnn ESDL, Inc. Category: Standards Track November 1996 Revision: 0003 Telnet Comport Control Option Preamble: This document is an Internet-Draft. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet- Drafts as reference material or to cite them other than as "work in progress." To learn the current status of any Internet-Draft, please check the "1id-abstracts.txt" listing containing in the Internet- Drafts Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast). Status Section: This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. Introduction Section: This memo proposes a protocol to allow greater use of modems attached to a network. Increased needs for "off network" communications has increased the need for modems. Increasing the functionality of Telnet increases the functionality of network attached modems. For example, the ability to send a FAX via a network attached modem. This memo addresses configuration of the comport to which the modem is attached. It does not address the internal configuration of the modem itself. Clark Page [1] RFC: NNNN Telnet Comport Control Option November 1996 Table of Contents 1. Negotiation of the Comport Control Option Protocol .................. 2 2. Comport Configuration Commands .................. 3 Version Baud Rate Data Bit Size Parity Stop Bit size 3. Special Comport Control Commands .................. 6 XON/XOFF Flow Control HARDWARE Flow Control BREAK Signal DTR Signal RTS Signal 4. Notification of Comport and .................. 7 Modem Line Changes 5. Flow Control .................. 8 6. Security Considerations .................. 9 Command Names and Codes: COMPORT-OPTION 40 QUERY-VERSION 0 SET-BAUDRATE 1 SET-DATASIZE 2 SET-PARITY 3 SET-STOPSIZE 4 SET-CONTROL 5 NOTIFY-LINESTATE 6 NOTIFY-MODEMSTATE 7 FLOWCONTROL-SUSPEND 8 FLOWCONTROL-RESUME 9 1. Negotiation of the Comport Control Option Protocol The negotiation of the comport control option protocol uses the standard Telnet negotiation protocol mechanism. IAC WILL COMPORT-OPTION The sender of this command is willing to send comport control option commands. IAC WONT COMPORT-OPTION The sender refuses to send comport control option commands. IAC DO COMPORT-OPTION The sender of this command is willing to accept comport control option commands. IAC DONT COMPORT-OPTION The sender of this command refuses to accept comport control options commands. Typically a client will use WILL and WONT, while a host will use DO and DONT. Clark Page [2] RFC: NNNN Telnet Comport Control Option November 1996 2. Comport Configuration Commands Once DO and WILL have been negotiated, the client may send any of the following commands. The client can send these commands at any time and multiple times throughout the Telnet session. Each command transmitted from the client to the host is acknowledged with a confirmation of the command and the actual value set. The client should expect a response within a reasonable time (such as twice the delay acknowledgment timer). The client may wish to resend any command which is not acknowledged, however the client may also ignore the failure to receive an acknowledgment. Though the commands may be sent from the client to the host in any sequence, there are sequences which may result in invalid configurations for the comport (for example: EVEN parity is only valid if the data size is set to less than 8 bits). Thus it is recommended that commands be issued in the following sequence: 1. SET-BAUDRATE 2. SET-DATASIZE 3. SET-PARITY 4. SET-STOPSIZE Discussion: RFC 1696 [5] refers to "baud rate" as "modulation speed". "Baud" and "baud rate" are used in this document for clarity. Discussion: As initially proposed, comport configuration commands are only sent from the client to the host. There is no current vision that the host would initiate the use a comport configuration command. Host initiated comport configuration commands could easily be included in the protocol. It would require that a response command have a different value than an initiate command. For example: Command Initiate Value Response Value SET-BAUDRATE 1 101 SET-DATASIZE 2 102 SET-PARITY 3 103 SET-STOPSIZE 4 104 SET-CONTROL 5 105 Discussion: The prompt response mechanism suggested here allows the protocol to be used to query the values at the host as well as set the values. The use of this mechanism provides more functionality than a simple ACK/NAK protocol. Clark Page [3] RFC: NNNN Telnet Comport Control Option November 1996 IAC SB COMPORT-OPTION QUERY-VERSION IAC SE This command is sent by the client to the host to query the version of the COMPORT-OPTION protocol supported by the host. The value is one octet (byte). When sent by the client the value indicates the version supported by the client. When returned by the host, the value indicates the version supported by the host. This exchange allows both parties to know the capabilities supported by the other and make appropriate modifications in the commands and responses. The value is an index into the following value table: Value Version 0 Draft Version 1 Initial Approved Version 2-127 Available for Future Use IAC SB COMPORT-OPTION SET-BAUD IAC SE This command is sent by the client to the host to set the baud rate of the comport. The value is four octets (4 bytes). This value is represented in network standard format. The value is the baud rate being requested. A special case is the value 0. If the baud rate is zero the client is questing the current baud rate of the comport. Discussion: Though baud rates used today form a very sparse space, and the initial version of the option used an index based baud rate table, after much discussion with a number of groups it has been determined that the actual baud rate should be used. There are two main reasons. 1) It limits the number of updates to the option as faster baud rates come into use, 2) It provides the greatest amount of flexibility in the selection of the baud rate. Clark Page [4] RFC: NNNN Telnet Comport Control Option November 1996 IAC SB COMPORT-OPTION SET-DATASIZE IAC SE This command is sent by the client to the host to set the data bit size. The command can also be sent to query the current data bit size. The value is one octet (byte). The value is an index into the following value table: Value Data Bit Size 0 Request Current Data Bit Size 1 Available for Future Use 2 Available for Future Use 3 Available for Future Use 4 Available for Future Use 5 5 6 6 7 7 8 8 9-127 Available for Future Use Discussion: There are only eight possible values for the data bit size, only four have ever been used historically and only two are commonly used today. The use of the command-value format is recommended to preserve consistency with other commands. It also reduces the number of commands defined in the protocol, and allows for future expansion. IAC SB COMPORT-OPTION SET-PARITY IAC SE This command is sent by the client to the host to set the parity. The command can also be sent to query the current parity. The value is one octet (byte). The value is an index into the following value table: Value Parity [1] 0 Request Current Data Size 1 NONE 2 ODD 3 EVEN 4 MARK 5 SPACE 6-127 Available for Future Use Discussion: There are only five possible values for parity commonly used today. The use of the command-value format is recommended to preserve consistency with other commands. Clark Page [5] RFC: NNNN Telnet Comport Control Option November 1996 IAC SB COMPORT-OPTION SET-STOPSIZE IAC SE This command is sent by the client to the host to set the number of stop bits. The command can also be sent to query the current stop bit size. The value is one octet (byte). The value is an index into the following value table: Value Stop Bit Size 0 Request Current Data Size 1 1 2 2 3 1.5 4-127 Available for Future Use Discussion: Stop bit 1.5 is supported by most comport hardware only if data size is set to 5 bits. It is not commonly used. 3. Special Comport Control Commands The client can send this command to the host at any time and multiple times throughout the Telnet session. Each command transmitted from the client to the host is acknowledged with a confirmation of the command and the actual value set. The client should expect a response within a reasonable time (such as twice the delay acknowledgment timer). The client may wish to resend any command which is not acknowledged, however the client may also ignore the failure to receive an acknowledgment. IAC SB COMPORT-OPTION SET-CONTROL IAC SE This command is sent by the client to the host to set special comport options. The command can also be sent to query the current option value. The value is one octet (byte). The value is an index into the following value table: Value Control Commands 0 Request Comport Flow Control Setting (outbound/both) 1 Use No Flow Control (outbound/both) 2 Use XON/XOFF Flow Control (outbound/both) 3 Use HARDWARE Flow Control (outbound/both) 4 Request BREAK State 5 Set BREAK State ON 6 Set BREAK State OFF 7 Request DTR Signal State 8 Set DTR Signal State ON 9 Set DTR Signal State OFF 10 Request RTS Signal State 11 Set RTS Signal State ON 12 Set RTS Signal State OFF 13 Request Comport Flow Control Setting (inbound) 14 Use No Flow Control (inbound) 15 Use XON/XOFF Flow Control (inbound) 16 Use HARDWARE Flow Control (inbound) 17-127 Available for Future Use Clark Page [6] RFC: NNNN Telnet Comport Control Option November 1996 Discussion: Outbound is defined as flow of data from the modem to the dialed up host. Inbound is defined as flow of data from the dialed up host and the modem. Discussion: Flow control options were divided into inbound and outbound to take full advantage of existing programming interfaces and modem sharing devices (Telnet host). Discussion: The outbound values should set flow control for both outbound and inbound. If inbound is to be, or can be, set separately it should be done after the setting of the outbound value. Discussion: If the Telnet host is not able to set inbound flow control differently from the outbound flow control, it should ignore the inbound flow control commands and set the flow control option based on the outbound flow control commands only. 4. Notification of Comport and Modem Line Changes The host can send these commands to the client any time and multiple times throughout the Telnet session. The host should send the appropriate command to the client as soon as the comport or modem line changes occurs. The client does not issue a response to these commands. IAC SB COMPORT-OPTION NOTIFY-LINESTATE IAC SE The value is one octet (byte). The value is a bit level composition made up from the value table below. Multiple bit values may be set in a single transmission. The values are based on the most popular UART (comport control chip) in use. [1] Bit Position Value Meaning 7 128 Time-out Error 6 64 Transfer Shift Register Empty 5 32 Transfer Holding Register Empty 4 16 Break-detect Error 3 8 Framing Error 2 4 Parity Error 1 2 Overrun Error 0 1 Data Ready Clark Page [7] RFC: NNNN Telnet Comport Control Option November 1996 IAC SB COMPORT-OPTION NOTIFY-MODEMSTATE IAC SE The value is one octet (byte). The value is a bit level composition made up from the value table below. Multiple bit values may be set in a single transmission. The values are based on the most popular UART (comport control chip) in use. [1] Bit Position Value Meaning 7 128 Receive Line Signal Detect (also known as Carrier Detect) 6 64 Ring Indicator 5 32 Data-Set-Ready Signal State 4 16 Clear-To-Send Signal State 3 8 Delta Receive Line Signal Detect 2 4 Trailing-edge Ring Detector 1 2 Delta Data-Set-Ready 0 1 Delta Clear-To-Send 5. Flow Control The client and/or host can send these commands any time and multiple times throughout the Telnet session. IAC SB COMPORT-OPTION FLOWCONTROL-SUSPEND IAC SE Sender of this command is requesting that the receiver suspend transmission of both data and commands until the FLOWCONTROL-RESUME is transmitted by the sender. IAC SB COMPORT-OPTION FLOWCONTROL-RESUME IAC SE Sender of this command is requesting that the receiver resume transmission of both data and commands. Discussion: Established Telnet sessions are initially in a resume state between the client and Telnet host and the Telnet host and the client. There is no need to send the resume command during session initialization. Discussion: Multiple concurrent suspend commands may be sent. Secondary suspend commands can be ignored. Transmission will resume with the sending of a single resume command. Clark Page [8] RFC: NNNN Telnet Comport Control Option November 1996 Discussion: The flow control option is designed to handle client to Telnet host flow control for the Telnet session. This option has been added in deference to RFC 1372: Telnet Remote Flow Control Option [2]. RFC 1372 uses simple character XON/XOFF technology to implement flow control. This can lead to two problems. First, the flow control characters may be valid data values. Second, the flow control characters may be used for end to end flow control (client application to remote dialup host). 6. Security Considerations There are two security issues to discuss; authentication and resetting resources. Authentication can follow either the Kerberos authentication protocol established in RFC 1411 [3] or the SPX authentication protocol established in RFC 1412 [4]. The Telnet host should ensure the connection to the dialed up host is disconnected and the com port geometry (baud rate, data size, stop bits, parity, and flow control) is reset to a factory or administrator defined configuration. Discussion: Resetting resources is needed to ensure that each session begins with the same configuration. This will make operation more predicable and avoid problems which might occur from starting with different configurations. Clark Page [9] RFC: NNNN Telnet Comport Control Option November 1996 Author Address: Glen Clark, Chief Architect Enterprise Solutions Development Laboratories, Inc. 15127 NE 24th Street, Suite 157 Redmond, WA 98052 Internet: glenc@esdl.com WEB: www.esdl.com CompuServe: 73750,1607 Reference Section: [1] Joe Campbell. C Programmer's Guide to Serial Communications, Second Edition. Indianapolis: SAMS Publishing, 1993. 213-224. [2] Internet Engineering Task Force, Telnet Working Group, C. Hedrick and D. Borman, "Telnet Remote Flow Control Option", RFC 1372, Cray Research, Inc., October 1992. [3] Internet Engineering Task Force, Telnet Working Group, D. Borman, "Telnet Authentication: Kerberos Version 4", RFC 1411, Cray Research, Inc., January 1993. [4] Internet Engineering Task Force, Telnet Working Group, K. Alagappan, "Telnet Authentication: SPX", RFC 1412, Digital Equipment Corporation, January 1993. [5] Internet Engineering Task Force, Telnet Working Group, J. Barnes, et. al., "Modem Management Information Base (MIB) using SMIv2", RFC 1696, Xylogics, Inc., August 1994. Clark Page [10]