Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 41

DHCP SERVER AND CLIENT

IP address lease renewal procedure using


DHCP
IP Address Release Procedure
TELNET:
A user is logged in to the local system, and invokes a
TELNET program (the TELNET client) by typing

telnet xxx.xxx.xxx

where xxx.xxx.xxx is either a host name or an IP address.

The TELNET client is started on the local machine (if it


isn't already running). That client establishes a TCP
connection with the TELNET server on the destination
system.

Once the connection has been established, the client


program accepts keystrokes from the user and relays them,
generally one character at a time, to the TELNET server.

The server on the destination machine accepts the


characters sent to it by the client, and passes them to a
terminal server.

A "terminal server" is just some facility provided by the


operating system for entering keystrokes from a user's
The terminal server treats the remote user as it would any
other user logged in to the system, including relaying commands to
other applications.

The terminal server passes outputs back to the TELNET


server, which relays them to the client, which displays them on the
user's screen.

In general, a TELNET server is implemented as a master server with some


number of slave servers. The master server listens for service requests from
clients.

When it hears one, it spawns a slave server to handle that specific request,
while the master goes back to listening for more requests.
The only thing that makes TELNET hard to implement is the heterogeneity of
the terminals and operating systems that must be supported.
Not all of them use the same control characters for the same purposes.

To accommodate this heterogeneity, TELNET defines a Network Virtual


Terminal (NVT).
It is the responsibility of the client program to translate user keystrokes from
the actual terminal type into NVT format, and of the server program to translate
NVT characters into the format needed by the destination host.

For data sent back from the destination host, the translation is the reverse.

NVT format defines all characters to be 8 bits (one byte) long. At startup, 7 bit
US ASCII is used for data; bytes with the high order bit = 1 are command
sequences.

The 128 7-bit long US ASCII characters are divided into 95 printable
characters and 33 control codes.

NVT maps the 95 printable characters into their defined values - decimal 65 =
"A", decimal 97 = "a", etc.
The 33 control codes are defined for NVT
ASCII Code Decimal value Meaning
NUL 0 NO - OP
BEL 7 Ring "terminal bell"
BS 8 Backspace; move cursor left
HT 9 Horizontal tab; move cursor right
LF 10 Line feed; move down one line;
stay in same column
VT 11 Vertical tab; move cursor down
FF 12 Form Feed
CR 13 Carriage return; move cursor to
beginning of current line
all others NO - OP
TELNET Operation
The TELNET protocol is based on three ideas:
o The Network Virtual Terminal (NVT) concept. An NVT is an imaginary
device having a basic structure common to a wide range of real terminals.
Each host maps its own terminal characteristics to those of an NVT, and
assumes that every other host will do the same.
o A symmetric view of terminals and processes .
o Negotiation of terminal options. The principle of negotiated options is
used by the TELNET protocol, because many hosts wish to provide additional
services,
beyond those available with the NVT. Various options may be negotiated.
Server and client use a set of conventions to establish the operational
characteristics of their TELNET connection via the ``DO, DON'T, WILL,
WON'T'' mechanism discussed later in this document.
The two hosts begin by verifying their mutual understanding. Once this
initial negotiation is complete,
they are capable of working on the minimum level implemented by the
NVT.
After this minimum understanding is achieved,
they can negotiate additional options to extend the capabilities of the NVT
to reflect more accurately the capabilities of the real hardware in use.
Because of the symmetric model used by TELNET,
both the host and the client may propose additional options to be used.
The set of options is not part of the TELNET protocol,
so that new terminal features can be incorporated without changing the
TELNET protocol (mouse?).
All TELNET commands and data flow through the same TCP
connection.
Commands start with a special character called the Interpret as
Command escape character (IAC).
The IAC code is 255.
If a 255 is sent as data - it must be followed
by another 255
Each receiver must look at each byte that
arrives and look for IAC. If IAC is found and the next
byte is IAC - a single byte is presented to the
application/terminal.
If IAC is followed by any other code - the
TELNET layer interprets this as a command.
The NVT (Network Virtual Terminal)
concept
The NVT has a "printer" (or display) and a "keyboard".
The keyboard produces outgoing data, which is sent over the
TELNET connection.

The printer receives the incoming data.


The basic characteristics of an NVT, unless they are modified by
mutually agreed options are:
o The data representation is 7-bit ASCII transmitted in 8-bit bytes.
o The NVT is a half-duplex device operating in a line-buffered mode.
o The NVT provides a local echo function.
All of these may be negotiated by the two hosts.
An NVT Printer has an unspecified carriage width and page
length. It can handle printable ASCII characters (ASCII code 32 to
126) and understands some ASCII control characters such as:
The Telnet Network Virtual Terminal (NVT) is a uniform data representation that
ensures the compatibility of communication between terminals and hosts that
may use very different hardware, software and data formats.

The Telnet client translates user input from the terminals native form to NVT for
transport to the Telnet server, where it is converted to the hosts internal format.
The process is reversed for output from the host to the user.
The Telnet Network Virtual Terminal (NVT) is a uniform data representation that
ensures the compatibility of communication between terminals and hosts that
may use very different hardware, software and data formats.

The Telnet client translates user input from the terminals native form to NVT for
transport to the Telnet server, where it is converted to the hosts internal format.
The process is reversed for output from the host to the user.
Telnet defines NVT to describe the capabilities of the data sources and
destinations.

It consists of a virtual keyboard which generates only specific characters and a


virtual printer which can only display specific characters.

In either client or server side, the data (either input or output) is originally in
client or server system's format.

The data is mapped to NVT format before it is transferred through the network
(TCP connection).

Before it can be used by the other side, that side's application program has to
change the data to its own system's format.

This means that both sides have to implement this mapping function. As a
result, Telnet can be used to connect to various servers which use different
operating systems.

You might also like