How Telnet works
The Network Virtual Terminal
Use the Network Virtual Terminal model to understand how different local terminals exchange characters and control functions.
8 minute lesson
Telnet had a hard problem to solve. In the 1970s, every vendor’s terminal behaved differently. Different character sets, different line endings, different control keys. Connecting any terminal to any host would have required a translator for every pair of devices.
Telnet’s answer is an imaginary terminal called the Network Virtual Terminal, or NVT. Neither side has to understand the other’s hardware. Each side translates between its local terminal behavior and this common network representation.
The client does not need to know every detail of the server terminal, and the server does not need to know every client device. Each machine only needs two translations: local-to-NVT on the way out, NVT-to-local on the way in. This is the same trick as an intermediate representation in a compiler, or a common data format between services.
What the base NVT looks like
The base NVT uses seven-bit US-ASCII values inside eight-bit bytes. A carriage return followed by line feed represents a new line. A carriage return that should not move to a new line is followed by a zero byte:
new line: CR LF (bytes 13 10)
carriage return: CR NUL (bytes 13 0)
The CR NUL form looks odd today, but it existed for printers, where “return to column one without advancing the paper” was a real operation. The rule that matters: on an NVT connection, a bare CR is never sent alone. It is always followed by LF or NUL.
You have already seen this in practice. When the lab server logged 68656c6c6f0d0a for the word hello, the 0d0a at the end was the NVT new line: CR LF.
The NVT also defines a small set of control functions, like interrupting a process or erasing a character. Those travel as IAC commands, which the next module covers in detail.
The starting point, not the ceiling
Later options can agree on richer behavior: eight-bit data, terminal types, window sizes. The simple NVT is the starting point when a connection opens, before either side assumes those options.
This default matters for robustness. Two implementations that share nothing else can still talk, because both are required to speak plain NVT until negotiation says otherwise.
Lesson completed