TELNET Negotiation
The TELNET protocol has following commands for negotiation between TELNET client and TELNET server.
TELNET Command | Code in decimals | Code in hexadecimals | Description |
---|---|---|---|
WILL | 251 | FB | The sender suggests it would like to use an available option. |
WON’T | 252 | FC | The sender informs the recipient it will not use that option. |
DO | 253 | FD | The sender instructs the recipient to use an available option. |
DON’T | 254 | FE | The sender instructs the recipient not to use that option. |
Following table lists some possible combinations of TELNET negotiations with above commands.
Sender | Receiver | Meaning |
---|---|---|
WILL | DO | Sender wants to enable an option with TELNET WILL command, and the receiver agrees to that by sending back a TELNET DO command. |
WILL | DON’T | Sender wants to enable an option with TELNET WILL command, and the receiver does not agrees to that by sending back a TELNET DON’T command. |
DO | WILL | Sender wants the receiver to enable an option with TELNET DO command, and the receiver agrees to that by sending back a TELNET WILL command. |
DO | WON’T | Sender wants the receiver to enable an option with TELNET DO command, and the receiver does not agrees to that by sending back a TELNET WON’T command. |
WON’T | DON’T | The sender wants not to use and option with TELNET WON’T command, and the receiver confirms to that by sending back a DON’T command. |
DON’T | WON’T | The sender wants the receiver not to use and option with TELNET DON’T command, and the receiver confirms to that by sending back a WON’T command. |
Examples of TELNET negotiation
To understand what is TELNET negotiation, lets us consider an example of negotiation between a TELNET server and a TELNET client, based on above table. Click the following links to learn what is IAC (Interpret as Command) and TELNET Commands and Options.
Case 1 - Server wants to enable Echo option
The reply can be either with a DO or DON’T.
Case 2 - Server wants the client to enable Echo option
The reply can be either with a WILL or WON’T.
Wireshark packet capture screenshots of TELNET negotiation
Following Wireshark packet capture screenshots show examples of negotiations.