Telnet protocol specification (Chinese version)

zhaozj2021-02-08  232

Telnet protocol specification

The host on the ARPA Internet is required to adopt and implemented this standard. Describe the purpose of Telnet Protocol to provide a relatively universal, two-way, an eight-bit byte communication method. Its main goal is to allow the standard method of the interface terminal device and the interaction of the terminal. It can be foreseen that can also be used to communicate with the terminal to the terminal to process communication (distributed calculation). A Telnet connection is generally considered is a transfer data for transmitting control protocols. The Telnet protocol is built in the following three ideas: first is the concept of network virtual terminals; secondly, the method of dialogue option; finally the coordination of terminals and processing.

When a Telnet connection is established, each end is assumed to use a network virtual terminal, that is, NVT. NVT is a representative of an imaginary standard device universal device. This eliminates the characteristics of the "server" and "user" machines to understand the other machine terminal, and the terminal can directly process the dialogue. All hosts, clients, and server-ended, their own local device features, can therefore be used as an NVT process on the network, and any one can think that the other party is using the same feature. NVT tends to be much more limited (providing a character set that is more abundant to the local device), nor includes everything (it requires the user to use the appropriate terminal). Note: The user machine is usually a host connected to the processing terminal, and the server is usually a machine that provides some service. From another point, on the communication to the terminal or process to the process, the user machine is a machine that initiates communication. The principles of the provisions will take the following facts, many machines hope to provide additional services on the current NVT, most users have a more complex terminal, and they want a relatively complete rather than the smallest service. Independent, but different options that exist in Telnet protocols support these requirements, they use "Do, Don't, Will, WON n't" structure to allow user machines and servers to establish a more intrigant Telnet session connection. This option includes changing a character set, a response mode, and more. The basic policy of setting option is either party (or both) initialization requires a request to take effect. The other party can accept it or reject this request. If the request is accepted, this option takes effect immediately; if it is rejected, the connection still maintains the basic NVT connection properties. Obviously, one party can reject the next request to enable an option, but cannot reject the other party to make a request for failure, because both parties must support NVT. The establishment of the dialog option syntax makes the other party to request a request for a certain entry into force, and the other can directly think that the confirmation information received by the other party. This symmetric conversational syntax potentially causing a non-terminating confirmation ring - any party regards the received confirmation information as a request, not a confirmation information. In order to prevent the appearance of this cycle, there is a rule:

Any party can only require changes to the option status: For example, one party cannot issue a request, just explain what it is in what option. If one party receives a message, the request is requested to enter a state that has been entered, this information will be seen as a confirmation message. This non-response is essentially a cycle of non-terminating dialogue. If a request to change the state is required, even if the status does not change. Whenever, one party sends an option command to the other, whether as a request or a confirmation message, the use of the option will have an impact on the transmitted data processing, so that the command should be inserted into the data point in the data stream that happen. prior to. (It should be noted that there is a certain time interval between the transfer request and the confirmation message, which is passive. Therefore, a host wants to cache data after requesting an option until it knows whether it is acceptable, so This segment can be not visible to the user.) The request can be exchanged frequently when establishing a Telnet connection, because each party wants to get better service from the other party. In addition, options can also be dynamically changed during connection on the continuation process to adapt to changes in local machine conditions. For example, NVT (which will be explained in detail later) for many "one line" application, such as Basic is very applicable, but for the "one word" app for NLS, it is not easy to use. The server may be selected as "one word" rule to adapt to the local process running it, which will initiate a dialog to achieve the appropriate option status. However, relative to this excess processing burden is permanently; it can pass the session, return to the NVT status without such an option. The request initiated by a process can result in a non-terminating request loop, if this process responds to a denial requiring this option again. In order to prevent the occurrence of such cycles, the rejected request cannot be repeated before changes in other things. This may mean that the process runs another program, or the user sends additional commands, or the user changes to the environment or option. A preferred method is that the prequel request should occur as the result of sending information by the other end, or occurs due to human intervention. The designer of the option should not feel the feet because of the limitations of the option session. The purpose of the general grammar is to be more easily posted - because it is also easy to indicate neglecting them. If a specific option requires a richer structure other than "Do, Don't, Will, WON't", the correct policy is to use "do, don't, will, won't" to create a connection to explain this New structure, when this explanation works, it is free to use this new structure. For example, one may send a request to change (or establish) the length of each row. If these, different syntax can be represented using different row lengths of the conversation - "sub-dialog" can include a domain representing the maximum allowable, minimum allowed and desired length. The important concept is that this expansion session should be processed until both parties have established standard sessions and can explain this expanded syntax. In general, when the WILL XXX is sent, the part wants to execute the option XXX, DO XX, and Don't XXX as the determined uncertain response; Similarly, the DO XXX is sent to the other as a request to the other party to start the option XXX, WILL XXX and WON 'will be responded as determined and uncertain. Because NVT is the result when there is no option, the Don't and Won't responses will ensure that the connection will eventually remain in this state without any options. Therefore, all hosts do not support the options that do not understand, it only needs to return this option to request.

As much as possible, Telnet protocol is used as a server-user symmetry, so it can process the user-user and server-server more easily and naturally. Use option to extend this feature is desired, but not necessary. In any case, the symmetry is a running criterion rather than a fixed criterion multiple times. A comparative document, "Telnet Option Description", can be used to establish a reference to the new option process information. Network Virtual Terminal Network Virtual Terminal (NVT) is a two-way character device. NVT has a display device and a keyboard. Displays the data reached by the device, the keyboard is responsible for sending data through the Telnet connection, and should be displayed on the NVT display device if needed. For emergencies on the network (although this "remote" back display option is true, the host must implement this option). The character set is composed of seven ASCII, and saved in the eight-bit domain. The conversion and timing considerations of any character are local problems, which does not affect the work of NVT. Data transfer, although the Telnet connection is a full-duplex, NVT is a half-duplex device in a line buffer state. Transfer Data Although Telnet connection is a full-duplex, in line buffer mode, NVT is used as a half-duplex device. This signal can be generated by a process or user. This rule cost is high for some host processing network input interrupts or hosts description with the default. Therefore, some data caching in the source point is reason. Some systems do not use some operations in each input line (even if the printer or card machine is often used), which can be sent at each line. On the other hand, the user or process can sometimes make it useful to provide data that is not uninterrupted, and it is necessary; therefore, it should also be implemented locally to identify such signals and immediately send these data immediately. Method and mechanism. . When a process has completed the sending data to the other party's display device, the process must send a Telnet Go Ahead (GA) command. This rule is not asking Telnet Ga commands to be sent by both ends, as server hosts typically do not require a specific signal to continue the process. However, this command is designed to help users operate a physically half-duplex terminal, which has a lockable keyboard like IBM2741. Description of this type of terminal helps explain the correct use of the GA command. The connection of the terminal and computer is always under the control of the computer or user. No party is implicitly implicitly controlled from the other party; the control must explicitly transfer from one party to the other. At the end, set the hardware to abandon the control at each line (for example, when the user presses the Enter key). When this happens, the local computer handles input data and determines whether or not, if not, the control is sent back to the terminal. If an output is required, the computer will hold control power until the output data is sent. The difficulty of using this terminal on the network is obvious. "Local" computer does not know if it should continue to maintain control when reading the undiscore; the decision of this issue is far from the computer. Therefore, the Telnet GA command provides a mechanism to allow remote computers to notify the local computer to transfer control to the user terminal. This signal should only be sent at this time when the user needs to control. Note: The GA command will be sent prematurely to block the output data because the user can assume that the transfer system is suspended, so the line cannot be ended. Of course, the aforementioned content cannot be used for communication in terms of user to server. In this regard, the GA command can be sent at any time, which can be used at all. Similarly, if the Telnet connection is used for communication to the process, it is not necessary to send a GA command.

Finally, for the communication of the terminal to the terminal, the GA command can be required at both ends, or may be required at one end or both ends. If the host wants to support the terminal to the terminal, the communication host should provide a way to freely send the GA commands freely; however, this is not necessary for a Telnet process. Note: The symmetry requirements for Telnet mode are conceptual, at least one NVT at least one end in both ends. The standard of control function indicates that the Telnet protocol is the purpose of the Telnet protocol to provide a standard interface to the terminal process and terminal devices on a network. This type of interconnected previous experience tells us that similar functions have been implemented on many hosts, their implementation is very different. These differences will be headaches for users who contact these systems. Therefore, Telnet defines five standard representations. This standard represents a certain meaning of standards, but this is not necessary (exception is the interrupt handler function to do other protocols using Telnet); this is to say that the system does not provide local users can not Provided to remote users, it can represent standards as non-operational features. On the other hand, the system that provides this functionality to the local user must also provide this functionality to the remote user represented by this feature. Interrupt Processing (IP) Some systems provide functions that can be paused, interrupt, abandoned, or terminating user process operations. This feature is often used when the user determines that its process is in an inable loop, or when it is not intentionally activated. IP is a standard representation using this feature. Implementors should note that IP may also be required to use other protocols using Telnet, so IP should be implemented if other protocols need to be supported. Abandoning Output (AO) Many systems provide this feature, which allows the output to generate the output to reach the point of the similar operation, without transmitting the output to the user's terminal. Deep one, this feature usually clears all the generated outputs without displaying the user's terminal. AO is a standard representation using this feature. For example, some subsystems may usually accept user commands, transmit long text strings to user terminals, and finally send a prompt user to allow a prompt to the user terminal to the user terminal. If the AO command is received during the transfer of the text string, the remaining strings will no longer be sent, and the direct display prompt informs the user to enter the next command. (This may be different from the operation after receiving IP; IP will give up the remaining string and exit subsystem.) It should be noted that the external buffer (in network and user local host) when using a server system that provides this feature The above) is also cleared; the correct way to complete is to send the "SYNCH" signal to the user system. Have you here (ayt) Many systems provide users with such a function, so that the user knows whether it is running. This feature is initiated by the user because the system is not predictable, or when the system load is not responded. AYT is a standard representation using this feature. Deleting Characters (EC) Many systems provide this feature to delete the nearest neighboring "display position" that provides data streams. This feature is usually used to edit the input of the keyboard error. EC is a standard representation using this feature. Note: "Display position" may include more than one character, which is too much result or string in the following format: BS ... Delete Row (EL) Many systems provide this feature for use Delete all the data in the current input line. This feature is usually used to edit the keyboard input. EL is a standard representation using this feature. Telnet's "SYNCH" signal Most time division systems provide a mechanism that allows end users to re-acquire out-of control process; the above IP and AO functions are an example of this mechanism.

These systems, when used locally, access all signals provided by the user, whether this signal is the general character or the "BREAK" or "ATTN" key in the IBM 2741 in the "BREAK" or IBM 2741. This situation is not necessarily accurate when the system is connected through the network; the network traffic control mechanism may cause a signal being cached in a network, such as in the host. In order to overcome this problem, the "SYNCH" mechanism of Telnet is introduced. A SYNCH signal includes a TCP emergency signal and a telnet command Data Mark. Emergency signal, it is not limited to limit Telnet traffic control, which can receive a specific data processing in receiving the process. In this mode, this data stream is immediately regarded as "there is a significant meaning", and other data is discarded. The Telnet Command Data Mark (DM) is a synchronization flag in the data stream that indicates that any particular signal has occurred, and the reception can return to the state of normal processing other data. SYNCH is completed by the TCP sending operation, it and the emergency flag and the last DM mark. The emergency signal may be submerged when some SYNCH signals are sent continuously. It is impossible to count the emergency signal, because this number may be less than or may be equal to the number already sent. When in normal mode, DM is not an operation; when it is in an emergency model, it indicates the end of emergency processing. If the TCP indicates that DM is found before the end of the emergency data, Telnet should continue the data stream until the DM is encountered. If TCP indicates another emergency data after DM, it can only be because it is a string SYNCH. Telnet should continue to operate the data stream until you encounter DM. The "meaningful" signal is defined as the Telnet standard definition of IP, AO and AYT (but not EC or EL); if any, the simulation of these standards; all other Telnet commands; other sites are defined Requires the signal of the data stream. Because another effect of the synch command is to abandon all characters outside the telnet command between the recipient and senders, this mechanism is specified as a standard method to clean the data path. For example, if an AO command is transmitted at the terminal, the server that receives this command (if this server provides this feature) should return a SYNCH to the user. Finally, as needed as a TCP emergency signal as a command for their use, other protocols using the Telnet protocol also need similar commands. This can be achieved by using [IP, SYNCH]. For example, suppose other other protocols using Telnet define a stop string of the AO command. Immends the user wants the server to handle the stop string, but the connection is blocked because the server is processing other commands. Users should make its system to do more:

Send a Telnet IP character; send a Telnet Sync string, which means that the DM is sent to the unique string under the TCP emergency mode transmission operation. Send a string STOP and send the type of other protocols in the Telnet DM command. User (or processes) must retransmit the Telnet Synch sequence as step 2 to ensure the Telnet IP to the server's Telnet interpreter. "Emergency" will wake up the Telnet process; IP should wake up more advanced processes. NVT display and keyboard NVT displays an unspecified line width and page size, and can generate characters representing the ASCII code. For 33 control characters and other characters that are not used, the specified gives the display: null (NUL) 0 has no operation; the LINE FEED (LF) 10 will move to the same vertical position of the next row. Carriage Return (CR) 13 will display the left boundary of the current line. In addition, you should also define the following characters (but this is not a must), and they also have functions on the display. Easia Telnet does not assume that the other party takes the following action when receiving or transmitting: Bell (Bel) 7 ring or gives a visual signal (this does not move the display position). Back Space (BS) 8 will display a location left. Horizontal Tab (HT) 9 will display the next chart. It is now not specified where any party determines where the appearance is in place. Horizontal Tab (HT) 9 will move to the next vertical section. It is now not specified where any party determines where the appearance is in place. FORM feed 12 moves the display to the lower page start position and maintain the same horizontal position. All current code does not make NVTs as actions. The CR LF sequence will make the display position on the left boundary of the next display line. However, many systems and terminals do not separate these two characters to do their work to simulate their role. (For example, some terminals are not independent of the LF CR, but can pass the function of the back button to simulate the function of the back button on these terminals.) Therefore, the CR LF sequence must use their composite functions as the new row mark; Cr NUL must be only Enter a carriage return; in other cases it should be avoided separately using Cr. This rule makes it possible to determine if a "new row" operating function or multiple retracted systems can ensure the operation of the Telnet stream behind the Cr in Cr, make the correct decision. Note: CR LF or CR NUL is required for both parties, which guarantees the symmetry of NVT. Even in some cases, you can know that the character is not sent to the actual terminal, however, the protocol requires a NUL if there is no LF after the consider considerations. Conversely, after receiving a NUL after the Cr, it should be discarded from the data stream without using it for the character mapping of NVT. There is a keyboard, a combination or key sequence on the NVT to generate all 128 characters. Note: Although some of them have no effect on NVT display, NVT also has the ability to generate them. In addition to these, the NVT keyboard should also be able to generate the following characters, but not required. The actual code of these characters is assigned to the Telnet command section because they are used as ordinary should be provided, even if the data stream is interpreted as some other character sets. SYNCH This button allows the user to clear the data channel to the other. The activation of this button causes the DM transmission, and also causes an emergency signal of TCP simultaneously. DM-emergency signals have the meaning as the previous definition. Break (brk) It is provided because it is not a member in the ASCII character set. It indicates that the BREAK button and the Attention key are pressed. However, please note: it is as a 129th code, not the IP standard definition.

转载请注明原文地址:https://www.9cbs.com/read-3075.html

New Post(0)