1. Telnet
• To Understand how TELNET works
• To Understand the role of NVT in a TELNET communication
• To Know how control characters are used
• To Know the TELNET modes of operation
Objectives
2. TELNET is a general-
purpose
client-server application
program.
3. CONCEPT
TELNET enables the establishment of a connection
to a remote system in such a way that the local
terminal appears to be a terminal at the remote
system.
6. NETWORK VIRTUAL
TERMINAL (NVT)
Via a universal interface
called the Network Virtual Terminal (NVT)
character set,
the TELNET client translates characters (data or
commands) that come from the local terminal into
NVT form and delivers them to the network.
The TELNET server translates data and
commands from NVT form into the form acceptable
by the remote computer.
8. NVT CHARACTER SET
NVT uses two sets of characters, one for data and
one for control. Both are 8-bit bytes.
The topics discussed in this section include:
Data Characters
Control Characters
11. EMBEDDING
The same connection is used by TELNET for
sending both data and control characters. TELNET
accomplishes this by embedding the control
characters in the data stream.
13. OPTIONS
TELNET lets the client and server negotiate
options before or during the use of the service.
Options are extra features available to a user with a
more sophisticated terminal.
15. OPTION NEGOTIATION
To use any of the options first requires option
negotiation between the client and the server. Four
control characters are used for this purpose.
The topics discussed in this section include:
Enabling an Option
Disabling an Option
Symmetry
19. Figure 1 shows an example of option negotiation. In this
example, the client wants the server to echo each character
sent to the server. In other words, when a character is typed at
the user keyboard terminal, it goes to the server and is sent
back to the screen of the user before being processed. The echo
option is enabled by the server because it is the server that
sends the characters back to the user terminal. Therefore, the
client should request from the server the enabling of the option
using DO. The request consists of three characters: IAC, DO,
and ECHO. The server accepts the request and enables the
option. It informs the client by sending the three character
approval: IAC, WILL, and ECHO.
Example 1
See Next Slide
22. MODE OF OPERATION
Most TELNET implementations operate in one of three
modes:
Default mode
Character mode
Line mode
23. In this example, we use the default mode to show the
concept and its deficiencies even though it is almost obsolete
today. The client and the server negotiate the terminal type and
terminal speed and then the server checks the login and
password of the user (see Figure 2).
Example 2
See Next Slide
25. In this example, we show how the client switches to the
character mode. This requires that the client request the server
to enable the SUPPRESS GO AHEAD and ECHO options (see
Figure 3).
Example 3
See Next Slide
27. USER INTERFACE
The operating system (UNIX, for example) defines an
interface to TELNET with user-friendly commands. The
interface is responsible for translating the user-friendly
commands to the TELNET commands.
30. WHAT IS FTP?
• FTP works on the client/server principle. A client
program enables the user to interact with a server in
order to access information and services on the
server computer.
The FTP is a command- Response protocol.
• Files that can be transferred are stored on computers
called FTP servers. To access these files, an FTP
client program is used. This is an interface that
allows the user to locate the file(s) to be transferred
and initiate the transfer process.
• The original specification for the File Transfer
Protocol was written by Abhay Bhushan and
published as RFC 114 on 16 April 1971
31. MODE OF TRANSFER
• There are two modes of transfer in FTP: ascii and
binary.
• ASCII is used only for files saved in ASCII format (this
includes Postcript files)
• Binary is used for files that are formatted and saved
using a wordprocessing software like WordPerfect (.txt),
spreadsheets (.xls), images (.jpg, .gif), and many
executable programs (.exe) and videos (.avi).
32. BASIC STEPS TO USE FTP
• Connect to the FTP server
• Navigate the file structure to find the file you
want
• Transfer the file
• The specifics of each step will vary, depending
on the client program being used and the type
of Internet connection.
33. Usage of Port
• uses two TCP Ports
– one for control
– one for data transfers
34. Active Mode FTP
• Client connect from a random unprivileged port (n > 1023) to the
servers command port (21) and sends port command to tell server
to connect to n+1 then listens on the next higher unprivileged port
(n+1) for server responses. The server connects from it’s data port
(20) to the client data port (n+1)
Client
Server
20 21 1026 1027
1
2
3
4
35. Passive Mode FTP
• Client opens two random unprivileged ports ( n > 1023 and n+1; ex
1026 and 1027) and connects the first port (n) to server command
port 21 and issues a pasv command (server sends port to use for
data); client connects to servers specified data port, server
completes connection.
Client
Server
20 21 1026 1027
1
2
2024
3
4
36. File Structures
• Operating System store files in different structures
• FTP defined file structures for transporting files
– File F Unstructured, sequence of bytes
– Record R Series of records
– Page P Series of data blocks (pages)
• Default file structure is File (F)
• File Structure specified using STRU command
37. Transmission Modes
• Mode is used to specify additional coding or sequencing
performed on data
• independent of data type and file structure
– Stream S stream of bytes, if record structure
EOF sent as record indication;
if file eof indicated by closing
stream
– Block B file sent as sequence of blocks
preceded by header info allows restart
of an interruped transfer
– Compressed C data compressed using run length
encoding
38. FTP Commands
• USER User name, userid for access control
• PASS Password for access control
• ACCT Account info
• CWD Change working directory
• CDUP Change to parent directory
• SMNT Structure mount, mount a different file
system
• QUIT informs server that client wants out
• REIN restarts session at authentication phase
• PORT Host addr and data port to use
39. FTP Commands (more)
• PASV Passive; informs server that client will
contact to set up data connections, ask
server to sent port info
• TYPE Data type, type of subsequent transfers
• STRU File structure
• MODE Transfer mode
• RETR Retrieve, download the file from server
• STOR Store, upload the specified to server
• STOU Store unique, same as store but server
picks unique file name
40. FTP Commands (more)
• APPE Append, upload file to server, if file name
exists, append the upload
• ALLO Allocate, sometimes used to preallocate space
• REST Restart, restart an interrupted transfer
• RNFR Rename file from filename
• RNTO Rename file to
• ABOR Abort, ask server to abort last command
• DELE Delete specified file
• RMD Remove directory
• MKD Make directory
41. FTP Commands (more)
• PWD Print working directory
• LIST Request directory listing
• NLST Request just a file name list
• SITE Site parameters, allow client to specify
site specific options and parameters
• SYST request server operating system
• STAT Request server to send status of current
xfr
• HELP general and command specific
• NOOP ask server to send a positive reply
42. FTP TERMINOLOGY
• ASCII - American Standard Code for Information Interchange) -- Standard for the
code numbers used by computers to represent all the upper and lower-case Latin
letters, numbers, punctuation, tec. There are 128 standard ASCII codes each of
which can be represented by a 7 digit binary number: 0000000 through 1111111.
• BINARY - Used for files that are formatted and saved using a wordprocessing
software like WordPerfect, spreadsheets, images, and many executable
programs.
• BROWSER - A program which allows a person to read hypertext. The browser
gives some means of viewing the contents of nodes, and of navigating from one
node to another.
• FTP - (File Transfer Protocol)-a client program that enables the user to send files
from one computer to another via the telephone network with the aid of the
internet.
• LOCAL PC - your desktop computer that you will transfer files to.
• HOST - Any computer on a network that is a repository for services available to
other computers on the network..
• LOGIN - The account name used to gain access to a computer system, or the act
of entering into a computer system.
• NAVIGATION - The process of moving from one node or host to another through
the hypertext web. This is normally done by following links.
43. FTP TERMINOLOGY
• NODE - Any single computer connected to a network.
• PROTOCOLS - sets of communication rules that allow clients and servers
to communicate accurately with each other.
• MAIL ADDRESS - your complete e-mail address.
• SERVER - A computer, or a software package, that provides a specific kind
of service to client software running on other computers.
• INTERNET - The vast collection of inter-connected networks that all use the
TCP/IP protocols and that evolved from the ARPANET of the late 60’s and
70’s.
• TCP/IP - Transmission Control Protocl/Internet Protocol -- /tus us te syute if
oriticiks that defines the Internet. To be truly on the Internet, your computer
must have TCP/IP software.
• ANONYMOUS FTP - Allows a user to retrieve documents, files, programs,
and other archived data from anywhere in the Internet without having to
establish a userid and password. By using the special userid of
“anonymous” the network user will bypass local security checks and will
have access to publicly accessible files on the remote system.
44. FTP TERMINOLOGY
(CONT.)
• VIRUS PROGRAMS -viruses are small, invasive programs that are
designed to create havoc within your computer systems. There is software
to protect your computer from viruses. If you plan to swap disks with others,
the first software program you should install should be a virus protection
program.
• TELNET - The command and program used to login from one Internet site
to another. The telnet command/program gets you to the “login” prompt of
another host.
• CLIENT - A software program that is used to contact and obtain data from a
Server software program on another computer, often across a great
distance. Each Client program is designed to work with one or more
specific kinds of Server programs, and each Server requires a specific kind
of Client.
• VIRUS - A program which replicates itself on computer systems by
incorporating itself into other programs which are shared among computer
systems.
• ARCHIVE SITE - A machine that provides access to a collection of files
across the Internet.
• USER ID - On most host systems, the first time you connect you are asked
to supply a one-word user name. This can be any combination of letters
and numbers. This is usally also your e-mail name.
45. FTP QUESTIONNAIRE
( & ANSWERS)
• Define FTP
• File Transfer Protocol - the ability to send files from one computer to another via the
telephone network with the aid of the internet.
• What is the command in FTP to change directories?
cd or lcd
• What is the command to list your files?
dir or ls
• What is the difference between ASCII and Binary files?
ASCII is used only for files saved in ASCII format and Binary is used for files that are
formatted and saved using a Word Processing software.
• What type of file is a file with the extension:
.exe? executable
.txt? text
.jpg? picture
.avi? video/movie
.zip? compressed
• What do you enter as your password when logging in as “Anonymous”?
Your total e-mail address
• What safety measures should you take before downloading files from the Internet?
Be sure to have virus detection software loaded on your computer before downloading
files to be sure you don’t infect your computer with a virus.