Lecture 2 Appliction Layer
Lecture 2 Appliction Layer
Protocol:
▪ In computer networks, communication occurs between
entities in different systems.
▪ However, two entities can not simply send bit streams to each
other and expect to be understood.
▪ For communication to occur, the entities must agree on a
protocol.
▪ Aprotocol is a set of rules that govern data communications.
▪ A protocol defines what is communicated, how it is
communicated, and when it iscommunicated.
Example: HTTP,FTP,TCP,IPetc.
Different LayersProtocol
Protocol Types
▪ PUSH protocol:
▪ In push protocols, the client opens a connection to
the server and keeps it constantly active.
▪ The server will send (push) all new events to the
client using that single always-on connection.
▪ In other words, the server PUSHes the new events to
the client. Example: SMTP
PULL protocol:
▪ In pull protocols, the client periodically connects to
the server
▪ And checks for and gets (pulls) recent events and
then closes the connection and disconnects from the
server.
▪ The client repeats this whole procedure to get
updated about new events.
▪ In this mode, the clients periodically PULLs the new
events from the server. Example: HTTP
Application Layer Protocol:HTTP
• HTTP(Hypertext Transfer Protocol) is used across the world wide web
(www) for datatransfer and is one of the most used application
protocols.
• HTTP specifies a request/response protocol.
• When a client, typically a web browser, it sends a request message to a
server,
• The HTTP protocol defines the message types , the client uses to request
the web page and
• The message types the server uses to respond
• The three common message types are:
■ GET POST PUT
Application Layer Protocol:HTTP (cont.)
where site is the site name authorized by the central authority, local is the part
of a name controlled by the site, and (".") is a delimiter used toseparate them.
➢adding a group subdivision to names already partitioned by site produces the
following name syntax:
local. group. site
Internet DomainNames (cont.)
Example: cs .purdue .edu
contains three labels: cs, purdue, and edu. Any suffix of a label in a domain name is also called a domain. In
the above example the lowest level domain is cs .purdue. edu, (the domain name for the Computer Science
Department at Purdue University), the second level domain is purdue. edu (the domain name for Purdue
University), and the top-level domain is edu (the domain name for educational institutions). As the
example shows, domain names are written with the local label first and the top domain last.
The client machine sends a request to the local name
server, which , if root does not find the address in its
database, sends a request to the root name server ,
which in turn, will route the query to an intermediate
or authoritative name server.
The root name server can also contain some host
Name to IP address mappings. The intermediate name
server always knows who the authoritative name
server is. So finally the IP address is returned to the
local name server which in turn returns the IP address
to the host.
Different types of DNS queries
DNSqueries can be classified according the manner in which a complete request
isprocessed. Generally queries can be classified as follows.
1. Recursive query: A recursive query is a kind of query, in which the DNS
server, whoreceived the sender’s query will do all the job of fetching the
answer, and giving it back to the sender.
During this process, the DNS server might also query other DNS
server's in the internet of the sender’s behalf, for the answer.
2. Iterative query OR Nonrecursive query: In an iterative query, the
name server, will not go and fetch the complete answer for the
sender’s query, but will give back a referral to other DNS server's,
which might have the answer.
Recursivequery/ Iterative query
Fig: A query chain with iterative queries. Fig: A query chain with recursivequeries.
References