Table of Contents Client/Server Model
TCP/IP Tutorial and Technical Overview

4.2 TELNET




Figure: TELNET - Remote Login Protocol.

TELNET is a standard protocol with STD number 8. Its status is recommended. It is described in RFC 854 - TELNET Protocol Specifications and RFC 855 - TELNET Option Specifications.

The TELNET protocol provides a standardized interface, through which a program on one host (the TELNET client) may access the resources of another host (the TELNET server) as though the client were a local terminal connected to the server.

For example, a user on a workstation on a LAN may connect to a host attached to the LAN as though the workstation were a terminal attached directly to the host. Of course, TELNET may be used across WANs as well as LANs.


Figure: Remote Login using TELNET - TELNET allows the LAN-attached user to log in the same way as the local terminal user.

Most TELNET implementations do not provide you with graphics capabilities.

4.2.1 TELNET Operation

TELNET protocol is based on three ideas:

The two hosts begin by verifying their mutual understanding. Once this initial negotiation is complete, they are capable of working on the minimum level implemented by the NVT. After this minimum understanding is achieved, they can negotiate additional options to extend the capabilities of the NVT to reflect more accurately the capabilities of the real hardware in use. Because of the symmetric model used by TELNET, both the host and the client may propose additional options to be used.


Figure: The Symmetric TELNET Model - The negotiations start on the NVT basis.

4.2.1.1 Network Virtual Terminal

The NVT has a printer (or display) and a keyboard. The keyboard produces outgoing data, which is sent over the TELNET connection. The printer receives the incoming data. The basic characteristics of an NVT, unless they are modified by mutually agreed options are: All of these may be negotiated by the two hosts. For example, a local echo is preferred because of the lower network load and superior performance but there is an option for using a remote echo, although no host is required to use it.


Figure: Echo Option - The remote echo function can be used instead of the local echo if both parties agree.

An NVT Printer has an unspecified carriage width and page length. It can handle printable ASCII characters (ASCII code 32 to 126) and understands some ASCII control characters such as:




4.2.1.2 TELNET Options

There is an extensive set of TELNET options, and the reader should consult STD 1 - Official Internet Protocol Standards for the standardization state and status for each of them. At the time of writing, the following options were defined:


Table: TELNET Options (Part 1 of 2)




Table: TELNET Options (Part 2 of 2)

All of the standard options have a status of recommended and the remainder have a status of elective. There is an historic version of the TELNET Environment Option which is not recommended; it is TELNET option 36 and was defined in RFC 1408.

Full-Screen Capability

Full-screen TELNET is possible provided the client and server have compatible full-screen capabilities. For example, VM and MVS provide a TN3270-capable server. To use this facility, a TELNET client must support TN3270.

4.2.1.3 TELNET Command Structure

The communication between client and server is handled with internal commands, which are not accessible by users. All internal TELNET commands consist of 2 or 3-byte sequences, depending on the command type.

The Interpret As Command (IAC) character is followed by a command code. If this command deals with option negotiation, the command will have a third byte to show the code for the referenced option.


Figure: Internal TELNET Command Structure - This command proposes negotiation about terminal type.






4.2.1.4 Option Negotiation

Using internal commands, TELNET in each host is able to negotiate options. The starting base of negotiation is the NVT capability: each host to be connected must agree to this minimum. Every option can be negotiated by the use of the four command codes WILL, WON'T, DO, DON'T described above. In addition, some options have sub-options: if both parties agree to the option, they use the SB and SE commands to manage the sub-negotiation. Here is a simplified example of how option negotiation works.




The terminal types are defined in STD 2 - Assigned Numbers.

4.2.1.5 TELNET Basic Commands

The primary goal of the TELNET protocol is the provision of a standard interface for hosts over a network. To allow the connection to start, the TELNET protocol defines a standard representation for some functions:

IP
Interrupt Process
AO
Abort Output
AYT
Are You There
EC
Erase Character
EL
Erase Line
SYNCH
Synchronize

4.2.2 Implementations

4.2.2.1 VM

The TELNET client is a CMS program, that is, you must log on to a VM user ID running CMS to use it. The TELNET server runs in the TCP/IP virtual machine and uses the *CCS System service to create logical terminals for incoming TELNET clients. VTAM (GCS) is not required to use the TELNET protocol on a VM system.

Full-Screen Emulation

When you use the TELNET command to connect to a host, you have to choose the mode of operation. Line mode or transparent mode are the two possibilities. In line mode you will be connected as a start-stop TTY terminal. In transparent mode, the TELNET command supports IBM 3270-type display stations. Examples of stations are:

  • IBM 3278 Display Station Models 2, 3, 4, and 5
  • IBM 3279 Display Station Models 2, and 3.
  • The mode of operation depends on the ability of both hosts to agree on a terminal type.
    Translate Tables

    The translation tables used to convert EBCDIC data to ASCII do not always include desired characters. This becomes evident when you use the National Language Support Option (NLS) with your operating system. TCP/IP for VM provides standard tables. If needed, you can create and customize your own translate tables, without having to recompile the source. The TELNET CLIENT function only works in 7-bit mode. For more details, please refer to IBM TCP/IP Version 2 Release 3 for VM: Planning and Customization.

    Command Format
    TELNET ( foreignhost ( portnumber ))(( linemode ) translate filename ))
    
    Linemode
    makes line mode instead of full-screen mode of connection.
    Translate
    defines the translation table to be used.
    While in a TELNET session, you may invoke subcommands such as:
    AO
    stop display output
    AYT
    query connection
    HELP
    help
    IP
    interrupt process
    PA1
    send PA1 keystroke
    QUIT
    quit session
    SYNCH
    clear data path

    For more details, please refer to IBM TCP/IP Version 2 Release 3 for VM: User's Guide.

    4.2.2.2 MVS

    TELNET provides:

    1. Client and server 3270 full screen (transparent mode).
    2. Client and server line mode.
    3. Server for 3270 DBCS transfer mode which supports all full-screen access from a VT100 or VT282 remote TELNET client.
    4. Client VT100 and VT220 full-screen support with either Communication Subsystem For Interconnection (CSFI) from IBM or similar products from third-party vendors.
    TELNET functionality:

    VTAM and TSO (refer to IBM TCP/IP Version 3 Release 1 for MVS: Customization and Administration Guide for more details about the requirements) are required to use TELNET (both client and server).

    The capabilities of the TELNET function under MVS are the same as under VM.

    A programmable workstation may use either a TN3270 client or an rlogin client to reach OpenEdition MVS services.

    4.2.2.3 OS/400

    The OS/400 TELNET provides both client and server functions. The OS/400 TELNET supports negotiations of the data transmission in one of the following four operating modes: VT100 full-screen mode, ASCII line mode, 5250 full-screen mode (see RFC 1205 for details) or 3270 full-screen mode.

    4.2.2.4 AIX/6000

    AIX for RISC System/6000 supports both the TELNET client and server functions.

    The following options are supported:

  • Binary Transmission (used in TELNET 3270 sessions)
  • Suppress Go-Ahead (the RISC System/6000 system suppresses go-ahead)
  • Timing Mark (recognized, but has a negative response)
  • Extended Options List (recognized, but has a negative response)
  • Echo (a user-changeable command)
  • Term Type (allows the server to determine the terminal type used by the client)
  • SAK (Secure Attention Key)
  • NAWS (Negotiate About Window Size)
  • The telnetd server (also know as a daemon) is a subserver controlled by the inetd subsystem (also known as the super daemon).

    The telnet command is identical to the tn and the TN3270 commands. It operates in two different modes:

    The terminal-type negotiation will take place between the telnet command and the remote system when none of the following is used:

    1. The -e command line flag
    2. The emulate environment variable
    3. The TN3270 command
    The 3270, DEC VT100 and NONE (no emulation) terminal types are supported. In the case of 3270 emulation mode, keyboard remapping is supported.

    The rlogin command and the rlogind server (daemon) can also be used if both the local and the target hosts are AIX (or UNIX) systems. The rlogin and rlogind programs are considered as not-trusted because the remote host does not require password authentication when one or both of the following conditions is satisfied:

    1. The local host is included in the remote /etc/hosts.equiv file, the local user is not the root user, and the -l User flag is not specified.
    2. The local host and user name is included in the $HOME/.rhosts file in the remote user account.
    For security reasons, any $HOME/.rhosts file must be owned by either the remote user or root and should allow write access only by the owner.

    Since rlogin and rlogind are considered as not-trusted, they can be disabled by running the securetcpip command. The securetcpip command is used to enable additional TCP/IP security environment by disabling commands that are not trusted. The telnet command and the ftpd daemon are considered as trusted command and daemon, respectively. For more details, please refer to AIX Version 3.2 for RISC System/6000 Communication Concepts and Procedures.

    4.2.2.5 AIX/ESA

    AIX/ESA supports both client and server TELNET functions.

    The TELNET server supports the following options: binary, echo/no echo, suppress go ahead, timing mark and terminal type.

    The client function is implemented by the telnet and TN3270 commands. It operates in two modes: command mode and input mode. The type of input mode used is either character-at-a-time or line-by-line.

    If an HFT terminal is being used (the terminal supports the High-Function Terminal driver such as the PS/2 console), TELNET can emulate either a DEC VT100 terminal or an IBM 3270 terminal. The 3270 terminal types supported are: 3277-1, 3278-1, 3278-2, 3278-3, 3278-4 and 3278-5. If TELNET 3270 mode command is being used with a color display, then 3279 terminal type is supported.

    In addition, the rlogin command can also be used to log into an AIX/ESA or AIX/ESA-compatible system, if your local system is listed in the /etc/hosts.equiv file on the remote system, or your system and your user name are listed in the .rhosts file in your home directory on the remote system.

    Note: Any login operation is subject to the AIX/ESA security features in effect. For more details, please refer to AIX/ESA Security Features User's Guide.

    4.2.2.6 OS/2

    TCP/IP for OS/2 supports the following ASCII-based TELNET clients: TelnetPM, Telnet, Ansiterm, Telneto. The terminal types supported by these clients are VT220, VT100, ANSI, HFT and NVT. Supported 3270 terminal emulator TELNET clients are: PMANT, 3270 TELNET (PM) and TN3270. In addition, TN5250, which provides a PM-based 5250 emulation client, is supported.

    For any terminal type, a TELNET server must be running on the foreign host that supports that specific terminal type.

    TCP/IP V2.0 for OS/2 can be a TELNET server, supporting VT220, VT100, ANSITERM or TN clients. Note that TELNET users that log into an OS/2 TELNET server have the capability of running any applications with the exception of OS/2 Presentation Manager (PM) applications.

    4.2.2.7 DOS

    TCP/IP for DOS provides three TELNET client implementations:

    TCP/IP for DOS does not provide a TELNET Server implementation.

    The SETTERM command allows the configuration of a DOS TELNET client. This program is menu driven and allows the following settings:

    The modifications are stored in an ASCII file which can be referenced when the TELNET command is issued. It is possible to have different configuration files for different settings.

    TELNET offers four terminal emulators:

    Windows TELNET offers six terminal emulators:

    The terminal preference is generally handled through the SETTERM command but it can be specified with the TELNET command. All the TELNET sessions must be opened from a full-screen window.

    TELNET provides a menu-driven interface that makes it easy to supply the information needed to begin a TELNET session.

    When you TELNET to a remote host from a DOS workstation, at the same time you can initiate the TFTP server. Then from the remote host, you will be able to execute a TFTP session between that host and the PC running DOS. When a file transfer request is detected, the TFTP Request menu is displayed. You can now decide the appropriate action to take (accept this transfer, deny this transfer, accept all future transfers, deny all future transfers). TELNET also allows you to temporarily go back to a DOS shell.

    4.2.2.8 TELNET Server Client Cross Table




    Figure: TELNET Server and Client

    4.2.2.9 3270 Full-Screen Cross Table




    Figure: 3270 Full-Screen Server and Client

    TELNET Scenario


    Figure: TELNET Scenario

    Table of Contents Trivial File Transfer Protocol (TFTP)