The NVT provides only a minimum set of functionality. Many hosts would like to provide additional services. For example, in some cases it would be useful to turn remote character echo off (to save transmission bandwidth). In general terms, an option is any service or function the NVT does not perform by default.
Before using an option, the parties must negotiate to ensure that both ends support the option. This is done by exchanging ``option code sequences'', a type of in-band signaling. Telnet defines a special byte, the Interpret As Command (IAC) with the value 255. When IAC is received, the following byte(s) is interpreted as a Telnet Command. Table 2.1 lists all the commands defined in RFC 854 [2]. Note that in order to send the data byte 255, Telnet must send IAC IAC.
Option negotiation is performed with the WILL, WONT, DO and DONT commands, succeeded by a option code byte. The use of this scheme allows the telnet protocol to be easily extended with new options, without causing incompabilities between old and new Telnet implementations. The definition of the option commands means that if both parties tries to enable or disable an option at the same time, each side will see the other party's request as an acknowledge to its own request. Some options will require one or more arguments before the options can take effect. For instance a LINE_LENGTH option could have the length of the line as an argument. The Telnet protocol specification supports this with the sub-negotiation commands. These are the SB and SE commands which correspond to sub-negotiation BEGIN and sub-negotiation END. Enclosed within SB and SE are the option code byte followed by any number of argument bytes. Examples in section 2.1.4 show how these messages are sent.