Data Network Resource
       Earn on the Web


Telnet



Network Virtual Terminal (NVT)


Telnet is designed for terminal to terminal communication and distributed computer processing. Each host sets up a Network Virtual Terminal (NVT) and a host at one end assumes that an NVT has been set up at the other end. This saves having to share information about each other's terminals. There is the mechanism to negotiate options so that the hosts can operate a more elaborate interface at each end using different fonts etc. than the NVT. Each host has the right to reject requests to 'upgrade'. Option requests will fly back and forth until the optimum session is established. A request for an option that the other is already running, will not be responded to.

The User Host is the one that initiates a conversation whilst the Server Host is the one that is providing services.

The NVT is made up of a 'printer' that receives data, and the 'keyboard' that sends the data. Any local data can be 'echoed' to the 'printer'. The codes used are ASCII i.e. 7-bit codes in an 8-bit field where the MSB is set to 0. As a bare minimum, the NVT must understand the code 0 for NULL, 10 for Line Feed (LF) and 13 for Carriage Return (CR).

Local buffer space is used to store the local data until the end of the line is reached and there is a user or automated command to send the data.

There is the Telnet Go Ahead (GA) signal that is used by the server computer to tell the host that it is time to have control of the keyboard. This stems from the days of 'lockable' terminal keyboards that operate in half-duplex mode. Either the server or the host would control the keyboard, not both.

Negotiable Options and their RFCs


Decimal code Name RFC
1 Echo 857
3 Suppress Go Ahead 858
5 Status 859
6 Timing Mark 860
24 Terminal Type 1091
31 Window Size 1073
32 Terminal Speed 1079
33 Remote Flow Control 1372
34 Linemode 1184
36 Environment Variables 1408
38 Encryption 2946

Standard Control Functions


These include the following:
  • Interrupt Process (IP) - suspends, interrupts or aborts a user process.
  • Abort Output (AO) - clears output in the buffers which has not yet been acted on e.g. printing that has been sent but not printed.
  • Are You There (AYT) - a reminder to the user that the server is still up.
  • Erase Character (EC) - deletes a character that a user has put into the data stream to be sent.
  • Erase Line (EL) - deletes a whole line of input.
When there is a network between the user and the server, BREAK signals may be unable to reach signals that are buffered elsewhere. For this reason, the Synch signal is used as a TCP Urgent notification along with the Telnet's DATA MARK command. The DATA MARK sits within the data stream and indicates that a Special signal (TCP version of IP, AO and AYT) has gone by. When TCP has the Urgent Pointer set (see the TCP section), Telnet must perform special handling of the Data stream until the DM is found. At this point, normal handling of the data stream resumes.

Telnet Commands


Telnet commands are made up of two bytes containing an Interpret as Command (IAC) character followed by a command code byte. Option negotiations are made up of three bytes, the extra byte being for the option code, rather than use the second byte.

The codes are as follows:

240 SE - End of subnegotiation parameters
241 NOP - No operation
242 Data Mark - Data stream part of Synch, along with TCP Urgent Pointer set
243 Break - NVT character BRK
244 IP - Interrupt Process
245 AO - Abort Output
246 AYT - Are You There
247 EC - Erase character
248 EL - Erase Line
249 GA - Go ahead
250 SB Indicates that what follows is subnegotiation of the indicated option.
251 WILL (option code) Indicates the desire to begin performing the option, or the confirmation that you are now performing the option.
252 WON'T (option code) Indicates the refusal to perform the option, or to continue performing the option.
253 DO (option code) Indicates the request that the other party perform the option, or the confirmation that you are expecting the other party to perform the option.
254 DON'T (option code) Indicates the demand that the other party stop performing the option, or the confirmation that you are no longer expecting the other party to perform the option
255 IAC Interpret as Command

Telnet Connections


Connection is accomplished using TCP server port 23 and using many different client ports (> 1023) so that full duplex connections can occur between the server and many clients.

Typing telnet ip_address will open a connection to a telnet server. You can just type telnet on some routers and Unix boxes to give you more options e.g. open to open a connection. You will also see the Telnet option negotiations.

RFC 854 describes Telnet implementation and more details of the supported characters for the keyboard and printer.

RFC 2355 describes the IBM TN3270 enhancements.

Valid HTML 4.01 Transitional




Earn on the Web    


All rights reserved. All trademarks, logos, and copyrights are property of their respective owners.