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

Application Layer Protocols

Simple Network Management Protocol


(SNMP)
• SNMP is an application layer protocols used to monitor the network, detect
network faults and sometimes even used to configure remote devices.
• SNMP components –
There are 3 components of SNMP:
• SNMP Manager –
It is a centralised system used to monitor network. It is also known as Network
Management Station (NMS)
• SNMP agent –
It is a software management software module installed on a managed device.
Managed devices can be network devices like PC, router, switches, servers etc.
• Management Information Base(MIB) –
MIB consists of information of resources that are to be managed. These
information is organized hierarchically. It consists of objects instances which are
essentially variables.
Simple Network Management Protocol
SNMP Architecture
SNMP Services
• GetRequest –
SNMP manager sends this message to request data from SNMP agent. It is simply
used to retrieve data from SNMP agent. In response to this, SNMP agent
responds with requested value through response message.
• GetNextRequest –
This message can be sent to discover what data is available on a SNMP agent.
The SNMP manager can request for data continuously until no more data is left.
In this way, SNMP manager can take knowledge of all the available data on SNMP
agent.
• GetBulkRequest –
This message is used to retrieve large data at once by the SNMP manager from
SNMP agent. It is introduced in SNMPv2c.
SNMP Services
• SetRequest –
It is used by SNMP manager to set the value of an object instance on the SNMP agent.
• Response –
It is a message send from agent upon a request from manager. When sent in response to
Get messages, it will contain the data requested. When sent in response to Set message,
it will contain the newly set value as confirmation that the value has been set.
• Trap –
These are the message send by the agent without being requested by the manager. It is
sent when a fault has occurred.
• InformRequest –
It was introduced in SNMPv2c, used to identify if the trap message has been received by
the manager or not. The agents can be configured to set trap continuously until it
receives an Inform message. It is same as trap but adds an acknowledgement that trap
doesn’t provide.
SNMP Services
SNMP Services
• SNMP versions –
There are 3 versions of SNMP:
• SNMPv1 –
It uses community strings for authentication and use UDP only.
• SNMPv2c –
It uses community strings for authentication. It uses UDP but can be configured
to use TCP.
• SNMPv3 –
It uses Hash based MAC with MD5 or SHA for authentication and DES-56 for
privacy.This version uses TCP. Therefore, conclusion is the higher the version of
SNMP, more secure it will be.
File Transfer Protocol(FTP)
• File Transfer Protocol(FTP) is an application layer protocol which
moves files between local and remote file systems. 
• To transfer a file, 2 TCP connections are used by FTP in parallel:
control connection and data connection.
• Control Connection :For sending control information like user
identification, password, commands to change the remote directory,
commands to retrieve and store files, etc., FTP makes use of control
connection. The control connection is initiated on port number 21.
•  Data Connection :For sending the actual file, FTP makes use of data
connection. A data connection is initiated on port number 20
File Transfer Protocol(FTP)

File Transfer Protocol(FTP)
File Types: FTP can transfer one of the following file types across the
data connection:
• ASCII file.
• EBCDIC
• Image file.
• Data Structures : FTP allows three types of data structures :
• File Structure – In file-structure there is no internal structure and
the file is considered to be a continuous sequence of data bytes.
• Record Structure – In record-structure the file is made up of
sequential records.
• Page Structure – In page-structure the file is made up of
independent indexed pages.

File Transfer Protocol(FTP)
Transmission Mode :FTP can transfer a file across the data
connection using one of the following three transmission modes:
• Stream mode.
• Block mode.
• Compressed mode.
• File Transfer
• Retrieving:A file is to be copied from the server to the client.It is
done under the supervision of the RETR command.
• Storing:A file is to be copied from the client to the server.It is
done under the supervision of the STOR command.
• List:A list of directory or file names is to be sent from the server
to the client.This is done under the supervision of the LIST
command.FTP treats a list of directory or file names as a file.
File Transfer Protocol(FTP)
FTP Commands – Some of the FTP commands are :
•USER – This command sends the user identification to the server.
PASS – This command sends the user password to the server.
RMD – This command causes the directory specified in the path-name to
be removed as a directory.
MKD – This command causes the directory specified in the pathname to
be created as a directory.
PWD – This command causes the name of the current working directory
to be returned in the reply.
•ABOR – This command tells the server to abort the previous FTP service
command and any associated transfer of data.
QUIT – This command terminates a USER and if file transfer is not in
progress, the server closes the control connection.
File Transfer Protocol(FTP)
FTP Replies – Some of the FTP replies are
200 Command okay.
530 Not logged in.
331 User name okay, need a password.
225 Data connection open; no transfer in progress.
221 Service closing control connection.
551 Requested action aborted: page type unknown.
502 Command not implemented.
503 Bad sequence of commands.
Simple Mail Transfer Protocol (SMTP)
• SMTP is a push protocol and is used to send the mail whereas POP (post office
protocol) or IMAP (internet message access protocol) are used to retrieve those
mails at the receiver’s side. 
• SMTP is an application layer protocol. The client who wants to send the mail
opens a TCP connection to the SMTP server and then sends the mail across the
connection.
• The SMTP server is always on listening mode. As soon as it listens for a TCP
connection from any client, the SMTP process initiates a connection on that port
(25).
• After successfully establishing the TCP connection the client process sends the
mail instantly. 
Simple Mail Transfer Protocol (SMTP)
Simple Mail Transfer Protocol (SMTP)
Simple Mail Transfer Protocol (SMTP)
• In the SMTP model user deals with the user agent (UA) for example Microsoft
Outlook, Netscape, Mozilla, etc.
• In order to exchange the mail using TCP, MTA is used. The users sending the mail
do not have to deal with the MTA it is the responsibility of the system admin to
set up the local MTA.
• The MTA maintains a small queue of mails so that it can schedule repeat delivery
of mail in case the receiver is not available.
• The MTA delivers the mail to the mailboxes and the information can later be
downloaded by the user agents.
SMTP Commands
• HELO – Identifies the client to the server, fully qualified domain name, only sent
once per session
• MAIL(From Address/sender ) – Initiate a message transfer, fully qualified domain of
originator
• RCPT(To address/ receiver) – Follows MAIL, identifies an addressee, typically the
fully qualified name of the addressee and for multiple addressees use one RCPT for
each addressee
• DATA – send data line by line
• “. “ indicate last message(null)
• RSET
• QUIT
Simple Mail Transfer Protocol (SMTP)
SMTP Responses
• 211 System Status
• 214 Help
• 220 Service Ready
• 221 Service Closing
• 250 Ok
• 421 Service NA
• 450 Mailbox NA
• 451 Command Aborted
• 500 Syntax Error
• 554 Transaction Failed
Simple Mail Transfer Protocol (SMTP)
1.Connection Establishment
Simple Mail Transfer Protocol (SMTP)
2.Message Transfer
Simple Mail Transfer Protocol (SMTP)

3.Connection Termination
Simple Mail Transfer Protocol (SMTP)
• Communication between sender and the receiver  
The senders, user agent prepare the message and send it to the MTA. The MTA
functioning is to transfer the mail across the network to the receivers MTA. To
send mail, a system must have the client MTA, and to receive mail, a system
must have a server MTA. 
Simple Mail Transfer Protocol (SMTP)
Sending Email
•Mail is sent by a series of request and response messages between the client and
a server.
•The message which is sent across consists of a header and the body.
•A null line is used to terminate the mail header.
•Everything which is after the null line is considered as the body of the message
which is a sequence of ASCII characters.
•The message body contains the actual information read by the receipt. 
Simple Mail Transfer Protocol (SMTP)
Receiving Email
•The user agent at the server-side checks the mailboxes at a particular time of
intervals.
•If any information is received it informs the user about the mail.
•When the user tries to read the mail it displays a list of mails with a short
description of each mail in the mailbox.
• By selecting any of the mail user can view its contents on the terminal.
Telnet
• TELNET stands for TErminaL NETwork/Telecommunication.
• It is a type of protocol that enables one computer to connect to local computer.
• It is a used as a standard TCP/IP Protocol for virtual terminal service which is given
by ISO.
• Computer which starts connection known as the local computer. Computer which is
being connected to i.e. which accepts the connection known as remote computer.
• When the connection is established between local and remote computer. During
telnet operation whatever that is performing on the remote computer will be
displayed by local computer.
• Telnet operates on client/server principle. Local computer uses telnet client program
and the remote computers uses telnet server program.
Modes of Operation
• Default Mode
• If there is no other modes are invoked then this mode is used.
• Echoing is performed in this mode by client.
• In this mode, user types a character and client enchoes the character on the
screen but it does not send it until whole line is completed.
• Character Mode
• Each character typed in this mode is sent by client to server.
• Server in this type of mode is normally enchoes character back to be displayed on
the client’s screen.
Modes of Operation
• Line Mode
• Line editing like echoing, character erasing etc is done from the client side.
• Client will send the whole line to the server.

You might also like