Telnet helps us with remote connection, which is used on many platforms. Large Customer platforms such as the library. What is the structure of the Telnet service? This is also the basis to help us understand the use of this Protocol. So let's introduce it today. We know that the Telnet server software is the most commonly used remote login server software. It is a typical client/server model service that uses the Telnet protocol to work. so what is the Telnet protocol? What features does it have?
1. Basic Content
The Telnet service is a member of the TCP/IP protocol family and is the standard protocol for the Internet remote login service. the Telnet protocol can be used to convert the computer used by the local user into a terminal of the remote host system. it provides three basic services:
1) Telnet defines a network virtual terminal to provide a standard interface for the remote system. The client program does not have to have a detailed understanding of the remote system. They only need to construct a program using the standard interface;
2) Telnet includes a mechanism that allows the client and server to negotiate options, and it also provides a set of standard options;
3) Telnet performs symmetric processing on both ends of the connection, that is, Telnet does not force the client to input data from the keyboard, nor force the client to display the output on the screen.
2. Heterogeneous adaptation
To enable Telnet interaction between multiple operating systems, you must have a detailed understanding of heterogeneous computers and operating systems. for example, in some operating systems, each line of text needs to end with the ASCII carriage return controller CR), and in other systems, the ASCII line break LF is required ), there are also some systems that need to use a two-character sequence carriage return-line CR-LF); for example, most operating systems provide users with a shortcut to interrupt the program running, however, this shortcut key may be used by different systems using CTRL + C, while other systems using ESCAPE ). if the heterogeneity between systems is not taken into account, the characters or commands sent locally may be inaccurate or cause errors after being transferred to the remote and interpreted by the remote system. therefore, the Telnet protocol must solve this problem.
To adapt to heterogeneous environments, the Telnet service defines the transmission mode of data and commands over the Internet. This definition is called the network Virtual Terminal NVTNet Virtual Terminal). Its application process is as follows:
For the sent data: the client software converts the buttons and command sequences from the user terminal to the NVT format and sends them to the server. The server software will receive the data and commands, convert the NVT format to the format required by the remote system;
For the returned data, the remote server converts the data from the remote machine format to the NVT format, and the local client converts the received NVT format data to the local format.
If you are interested in the detailed definition of the NVT format, you can find the relevant information.
3 Send remote commands
We know that most operating systems provide various shortcut keys to implement corresponding control commands. When you type these shortcut keys on a local terminal, the local system will execute the corresponding control commands, instead of using these shortcut keys as input. so for Telnet, what does it use to implement remote transmission of control commands?
Telnet also uses NVT to define how to transmit control functions from the client to the server. we know that the USASCII character set includes 95 printable characters and 33 control codes. when you type a common character locally, NVT transfers it according to its original meaning. When you type a shortcut key combination, NVT transfers it to a special ASCII character over the network, and convert it to the corresponding control command after it reaches the remote machine. there are two main reasons for distinguishing the normal ASCII character set from the control command:
1) this distinction means that the Telnet service has more flexibility: It can transmit all possible ASCII characters and all control functions between the client and server;
2) This distinction allows the client to have no ambiguous specified signaling, without confusion between the control function and common characters.