Telnet
TErminaL NETwork
TELNET is a general-purpose client-serverapplication program
TELNET enables the establishment of aconnection to remote system in such way thatthe local terminal appears to be terminal at theremote system.TELNET enables the establishment of aconnection to remote system in such way thatthe local terminal appears to be terminal at theremote system.
Login
Local
Remote
 Local login
 Remote login
Network Virtual Terminal(NVT)
Universal interface character set
TELNET client translates characters (data orcommands) that come from the local terminal intoNVT form and delivers them to the network.TELNET client translates characters (data orcommands) that come from the local terminal intoNVT form and delivers them to the network.
TELNET server translates data and commandsfrom NVT form into the form acceptable by theremote computer.TELNET server translates data and commandsfrom NVT form into the form acceptable by theremote computer.
Concept of NVT
NVT Character Set
Data Characters
Control Characters
Both are 8 bit bytes
Data Characters
Use NVT ASCII
7 lower order are same as US ASCII
Higher order one is 0
Control Characters
8 bit character set with highest orders bit set
Some NVT control charactersSome NVT control characters
Embedding
The same connection is used by TELNET forsending both data and control characters.TELNET accomplishes this by embedding thecontrol characters in the data stream.The same connection is used by TELNET forsending both data and control characters.TELNET accomplishes this by embedding thecontrol characters in the data stream.
Each sequence of control characters is precededby special control character called Interpret ascontrol(IAC)Each sequence of control characters is precededby special control character called Interpret ascontrol(IAC)
An example of embedding
Options
TELNET lets the client and server negotiateoptions before or during the use of the service.TELNET lets the client and server negotiateoptions before or during the use of the service.
Options are extra features available to userwith more sophisticated terminal.Options are extra features available to userwith more sophisticated terminal.
Binary : This option allows the receiver to interpret every 8bit character received as binary data except IAC
Echo : This options allows the server to echo data receivedfrom the client. This means every character sent by theclient to the sender will be echoed back to the screen ofthe client terminal. Client terminal will not echo characters
Suppress go- ahead : suppresses go-ahead(GA) character
Status: to get status of the options being enabled at theserver site.
Timing mark: allows one party to issue a timing mark thatindicates all previously received data has been processed
Terminal Type: client to send its terminal type
Terminal Speed: client to send its terminal speed
Line mode: enable to switch to line mode
Option Negotiation
To use any of the options first requires optionnegotiation between the client and the server.Four control characters are used for thispurposeTo use any of the options first requires optionnegotiation between the client and the server.Four control characters are used for thispurpose
Offer to enable an option
Request to enable an option
Offer to disable an option
 Request to disable an option
Example 1: Echo option
Controlling the server
Control characters can be used to control the remoteserver.Control characters can be used to control the remoteserver.
Escape character
When user wants characters interpreted bythe client instead of the server, he can use anescape character, normally Ctrl+]When user wants characters interpreted bythe client instead of the server, he can use anescape character, normally Ctrl+]
shown as ^]shown as ^]
Mode of Operation
Most TELNET implementations operate in oneof three modes:Most TELNET implementations operate in oneof three modes:
1)default mode1)default mode
2)character mode2)character mode
3)line mode3)line mode
Default Mode
In this mode echoing is done by the client
Will not sent to the server until a whole line iscompleted
After sending client wait for the go-aheadcommand from the server before accepting anymore from clients
Operation is half duplex
Character mode
Each character typed is sent  by the client to server
Server echo the character
TCP segments must send for each character
Line Mode
Client send one line
Line editing is possible( echoing, character erasing , lineerasing,)
Full duplex mode
Will not wait for go-ahead
User interface
The operating system (UNIX, for example)defines an interface to TELNET with user-friendly commands. The interface isresponsible for translating the user-friendlycommands to the TELNET commands.The operating system (UNIX, for example)defines an interface to TELNET with user-friendly commands. The interface isresponsible for translating the user-friendlycommands to the TELNET commands.