0% found this document useful (0 votes)
6 views24 pages

Lecture 2 Appliction Layer

The document outlines the application layer protocols in computer networks, focusing on HTTP and DNS. It explains the concept of protocols, their types (push and pull), and details the functioning of HTTP for data transfer and DNS for hostname to IP address translation. Additionally, it covers the hierarchical structure of DNS and the types of DNS queries (recursive and iterative).

Uploaded by

blind98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views24 pages

Lecture 2 Appliction Layer

The document outlines the application layer protocols in computer networks, focusing on HTTP and DNS. It explains the concept of protocols, their types (push and pull), and details the functioning of HTTP for data transfer and DNS for hostname to IP address translation. Additionally, it covers the hierarchical structure of DNS and the types of DNS queries (recursive and iterative).

Uploaded by

blind98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Application Layer Protocols

Course Title: Computer Networks

Dept. of Computer Science


Faculty of Science and Technology

Lecturer No: Week No: Semester:


Lecturer: Dr. Md. Sohidul Islam
Lecture Outline

1. Different layers of Protocol


2. Protocol Types
3. HTTP
4. DNS
What is Protocol?

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.)

▪ GET: It is a client request for data.


▪ A web browser sends the GET message to request
pages from a web server.
▪ As shown in Figure, when the server receives the GET
request,
▪ It responds with a status line, such as HTTP/1.1 200
OK, and a message of its own,
▪ The body of which can be the requested file, an
error message, or some other information.

Application Layer Protocol:HTTP (cont.)

• POST and PUT are used to send messages that upload


data to the web server.
• For example, when the user enters data into a form
embedded in a web page, POSTincludes
the data in the message sent to the server.
• PUT uploads resources or content to the web server.
Application Layer Protocol: HTTPruns on TCP
▪ The transfer protocol used throughout the World Wide Web
is HTTP (Hyper Text Transfer Protocol).
▪ TCP provides a reliable data transfer service to HTTP, using
TCPport 80.
▪ This implies that each HTTP request message emitted by a
client process eventually arrives in tact at the server;
similarly, each HTTP response message emitted by the server
process eventually arrives in tact at the client.
▪ HTTP need not worry about lost data, or the details of how
TCP recovers from loss or reordering of data within the
network.
Application Layer Protocol:DNS

Domain Name Service (DNS):DNS is a host name to IP address translation


service. DNS is a distributed database implemented in a hierarchy of name servers.
It is an application layer protocol for message exchange between clients and
servers.
Every host is identified by the IP address but remembering numbers
is very difficult for the people and also the IP addresses are not static
therefore a mapping is required to change the domain name to IP
address. So DNS is used to convert the domain name of the websites
to their numerical IP address.
There are three types of name servers:
 Root nameservers
 Local name server
 Authoritative nameservers
DNS Contd..
DNSHierarchy
Root name servers –
▪ It is contacted by name servers that can not resolve the name.
▪ It contacts authoritative name server if name mapping is not
known.
▪ It then gets the mapping and return the IP address to the host.

Top level server –


▪ It is responsible for com, org, edu etc and all top level
country domains like uk, fr, ca, in etc.
▪ They have information about authoritative domain servers
and know names and IP addresses of each authoritative name
server for the second level domains.
Authoritative name servers
▪ This is organization’s DNS server, providing
authoritative host Name to IP mapping for
organization servers.
▪ It can be maintained by organization or service
provider.
▪ In order to reach cse.dtu.in we have to ask the root
DNS server, then it will point out to the top level
domain server and then to authoritative domain
name server which actually contains the IP
address.
▪ So the authoritative domain server will return the
associative ip address.
Internet Domain Names

➢As an example, consider a namespace with names of the form:


◦ local. site

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

1. Data Communications and Networking, B. A. Forouzan,


McGraw-Hill, Inc., Fourth Edition, 2007, USA.
2. https://www.geeksforgeeks.org/basics-computer-networking/
3. https://www.tutorialspoint.com/computer_fundamentals/co
mputer_networking.htm
Books

1. Data Communications and Networking, B. A. Forouzan, McGraw-Hill, Inc.,


Fourth Edition, 2007, USA.
2. Computer Networking: A Top-Down Approach, J. F., Kurose, K. W. Ross,
Pearson Education, Inc., Sixth Edition, USA.
3. Official Cert Guide CCNA 200-301 , vol. 1, W. Odom, Cisco Press, First
Edition, 2019, USA.
4. CCNA Routing and Switching, T. Lammle, John Wily & Sons, Second
Edition, 2016, USA.
5. TCP/IP Protocol Suite, B. A. Forouzan, McGraw-Hill, Inc., Fourth Edition,
2009, USA.
6. Data and Computer Communication, W. Stallings, Pearson Education, Inc.,
10th Education, 2013, USA.

You might also like