5.2 Application Layer
5.2 Application Layer
Prepared By:
Bhupendra Panchal
Asst. Professor, CSE
Prepared and compiled by
Bhupendra Panchal, Asst. Professor, CSE
DNS: Domain Name System
DNS in Networking-
Purpose-
Need-
The need for Domain Name Service arises due to the following reasons-
Point-01:
Point-02:
Step-01:
• A user program sends a name query to a library procedure called the
resolver.
Step-02: Resolver looks up the local domain name cache for a match.
• If a match is found, it sends the corresponding IP Address back.
• If no match is found, it sends a query to the local DNS server.
Step-04:
• After receiving a response, the DNS client returns the resolution result to
the application.
Prepared and compiled by
Bhupendra Panchal, Asst. Professor, CSE
Example of using the DNS service
Features-
In the Internet, the domain name space (tree) is divided into three different
sections: generic domains, country domains, and the inverse domain.
DNS has two types of messages: query and response.. Both types have the same
format. The query message consists of a header and question records; the
response message consists of a header, question records, answer records,
authoritative records, and additional records.
Purpose-
• It is mainly used for the retrieval of data from websites throughout the
internet.
• It works on the top of TCP/IP suite of protocols.
Working-
Then-
• HTTP opens a connection between the client and server through TCP.
• HTTP sends a request to the server which collects the requested data.
• HTTP sends the response with the objects back to the client.
• HTTP closes the connection.
HTTP Connections-
Non-persistent HTTP connection that is used for Persistent HTTP connection is one that can be used
serving exactly one request and one response. for serving multiple requests.
Suppose a request has been made for a HTML Suppose a request has been made for a HTML
page that contains 10 images (called objects). page that contains 10 images (called objects).
Then, Then,
With non-persistent connection, all the 11 objects With persistent connection, all the 11 objects (1
(1 page + 10 images) will be sent one by one. page + 10 images) will be sent one after the other
For getting each object, a new separate connection using a single TCP connection.
will be opened and used. Prepared and compiled by
Bhupendra Panchal, Asst. Professor, CSE
Hyper Text Transfer Protocol- Features
• Any service which does not use TCP should have the inbuilt facility for
providing reliability.
• HTTP clients uses port 80 to send and receive requested web pages from
a HTTP server. Similarly, HTTP server responds to all the requests at port
80.
When the sender and the receiver of an e-mail are on the same
system, we need only two user agents.
When the sender and the receiver of an e-mail are on different systems,
we need two UAs and a pair of MTAs (client and server).
Working-
• SMTP is a push protocol. We can not use SMTP at the receiver’s side. At
receiver’s side, a pull protocol like POP3, IMAP is needed.
Purpose-
• It is a message access protocol.
• It enables the clients to receive or download the emails from their remote
mail server.
• POP version 3 (POP3) is the most popularly used version.
Working-
• To retrieve a message from the mail server-
• Client establishes a TCP connection using port 110.
• Client identifies itself to the server.
• Client issues a series of POP3 commands
Characteristics of IMAP-
Purpose-
• It is used for exchanging files over the internet.
• It enables the users to upload and download the files from the internet.
• Transferring files from one computer to another is one of the most
common tasks expected from a networking or internetworking
environment. As a matter of fact, the greatest volume of data exchange in
the Internet today is due to file transfer..
Working-
FTP establishes two TCP connections between the client and the server.
• One connection is used for transferring data.
• Other connection is used for transferring control information.
• FTP uses TCP at the transport layer. Thus, FTP is a connection oriented
protocol.
• FTP uses port number 21 for control connection and 20 for data
connection
• FTP uses persistent TCP connections for control connection and non-
persistent connections for data connection.
• Emails can’t be sent using FTP. This is because-
• FTP requires the connection establishment between the client and
server before transferring the files. So, both have to be online at the
same time.
• FTP can transfer one file at a time.
• FTP is a stateful protocol.
Prepared and compiled by
Bhupendra Panchal, Asst. Professor, CSE
Remote Logging: Telnet
SNMP defines a manager, usually a host, that controls and monitors a set
of agents, usually routers.
MIB is a component used in network management. Each agent has its own MIB, a
collection of all the objects that the manager can manage.