The Wayback Machine - https://web.archive.org/web/20230310183607/https://www.geeksforgeeks.org/introduction-to-telnet/
Skip to content
Related Articles
Open in App
Not now

Related Articles

Introduction to TELNET

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 14 Feb, 2023
Improve Article
Save Article

TELNET stands for Teletype Network. It is a type of protocol that enables one computer to connect to local computer. It used as a standard TCP/IP protocol for virtual terminal service which is provided by ISO. The computer which starts the connection is known as the local computer. The computer which is being connected to i.e. which accepts the connection known as the remote computer. During telnet operation, whatever is being performed on the remote computer will be displayed by the local computer. Telnet operates on client/server principle. The local computer uses telnet client program and the remote computers uses telnet server program. 

TELNET Commands : 
Commands of Telnet are identified by a prefix character, Interpret As Command (IAC) with code 255. IAC is followed by command and option codes. Basic format of the command is as shown in the following figure : 


Figure – Telnet command format 

Following are some of the important TELNET commands : 

Character 
 
Decimal 
 
Binary 
 
Meaning 
 
WILL251111110111. Offering to enable. 
2. Accepting a request to enable. 
 
WON’T252111111001. Rejecting a request to enable. 
2. Offering to disable. 
3. Accepting a request to disable. 
 
DO25311111101`1. Approving a request to enable. 
2. Requesting to enable. 
 
DON’T254111111101. Disapproving a request to enable. 
2. Approving an offer to disable. 
3. Requesting to disable. 
 

Following are some common options used with the telnet : 
 

Code 
 
Option 
 
Meaning 
 
0BinaryIt interpret as 8-bit binary transmission.
1EchoIt will echo the data that received on one side to the other side.
3Suppress go aheadIt will suppress go ahead signal after data.
5StatusIt will request for the status of TELNET.
6Timing markIt define the timing marks.
8Line widthIt specifies the line width.
9Page sizeIt specifies the number of lines in a page.
24Terminal typeIt set the terminal type.
32Terminal speedIt set the terminal speed.
34Line modeIt will change to the line mode.

Modes of Operation : 
Most telnet implementations operate in one of the following three modes : 

Default mode
Character mode
Line mode

Default Mode : 

  • If no other modes are invoked then this mode is used.
  • Echoing is performed in this mode by the client.
  • In this mode, user types a character and client echoes the character on the screen but it does not send it until whole line is completed.

Character Mode : 

  • Each character typed in this mode is sent by client to server.
  • Server in this type of mode is normally echoes character back to be displayed on the client’s screen.

Line Mode :  

  • Line editing like echoing, character erasing etc. is done from the client side.
  • Client will send the whole line to the server.
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!