0% found this document useful (0 votes)
20 views62 pages

CN Unit V

The application layer facilitates user access to network services such as email, file transfer, and web browsing through client-server and peer-to-peer models. The client-server model features asymmetric roles where the server responds to client requests, while the peer-to-peer model allows nodes to act as both clients and servers. Additionally, the Domain Name System (DNS) translates domain names into IP addresses and organizes names using hierarchical and flat naming systems to ensure uniqueness and manageability.

Uploaded by

akshaya7754
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)
20 views62 pages

CN Unit V

The application layer facilitates user access to network services such as email, file transfer, and web browsing through client-server and peer-to-peer models. The client-server model features asymmetric roles where the server responds to client requests, while the peer-to-peer model allows nodes to act as both clients and servers. Additionally, the Domain Name System (DNS) translates domain names into IP addresses and organizes names using hierarchical and flat naming systems to ensure uniqueness and manageability.

Uploaded by

akshaya7754
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/ 62

Application layer

■ The application layer enables the user, whether


human or software, to access the network.
■ It provides user interfaces and support for
services such as
Electronic mail
File access and transfer
Access to system resources
Surfing the world wide web
Network management
Application layer paradigms

Client server model

Peer 2 peer model

26.3
Client server model

It is a best model for network applications

This model provides asymmetric roles(client,


server) for two processes for a single task.

In this model server stores the data ,listens


and accept the request issued by the client
and client waits for a response.

26.4
26.5
26.6
■ The server waits until it receives a client
request on the other hand the client
doesn’t send any further request to server
until it receives the response for its
previous request.

■ Client server model is essential in many


distributed applications and it can be
applies in many internet services like
HTTP,FTP,DNS,TELNET .etc

26.7
Peer 2 peer

■ In this communication model each node has


same capabilities and either nodes can
initiate a communication session.

■ Unlike client server model, this model allows


each node to function as both client and
server

26.8
26.9
Domain Name System

26.10
■ It is an Internet service that translates domain
names into IP addresses.
■ Because domain names are alphabetic, they're easier
to remember.
■ The Internet however, is really based on IP addresses

and cant understand the Domain language


■ Every time you use a domain name, therefore, a DNS
service must translate the name into the corresponding
IP address.
For example, the domain name www.google.com might
translate to 216.58.201.36
26.11
■ Host Name : www.facebook.com
■ IP Address : 173.252.89.132

■ Host Name : www.gmail.com


■ IP Address : 216.58.201.37

■ Host Name : www.jntuh.ac.in


■ IP Address : 122.252.228.147

26.12
Name space
■ A namespace is a set of symbols that are used
to organize names of various kinds of objects,
such as computers, printers, websites, (remote)
files, etc.

■ Name space that maps each address to a unique


name are organized in two ways:

Flat
Hierarchical.
Flat name space

■ In a flat name space, a name is assigned to an


address.
■ A name in this space is a sequence of
characters without structure.
■ The main disadvantage of a flat name space
is that it cannot be used in a large system
such as the Internet because it must be
centrally controlled to avoid ambiguity and
duplication.
Hierarchical name space

■ In a hierarchical name space, each name is


made of several parts.
■ The first part can define the nature of the
organization
■ the second part can define the name of an
organization
■ the third part can define departments in the
organization, and so on
■ In this case, the authority to assign and control
the name spaces can be decentralized.

■ A central authority can assign the part of the


name that defines the nature of the organization
and the name of the organization.

■ The responsibility of the rest of the name can be


given to the organization itself.

26.17
■ For example, assume two colleges and a
company call one of their computers name
challenger.

■ The first college is given a name by the central


authority such as vits.edu

■ The second college is given the name jits.edu

■ The company is given the name infosys.com

26.18
■ When these organizations add the name
challenger to the name they have already been
given, the end result is three distinguishable
names:
■ challenger.vits.edu
■ challenger.jits.edu
■ challenger.infosys.com.

■ The names are unique. The central authority


controls only part of the name, not the whole.

26.19
Domain Name space
■ The naming system on which DNS is based
on a hierarchical and logical tree structure
called the domain namespace.

■ In this the names are defined in inverted tree


structure with the root at the top.

■ The tree can have only 128 levels: level 0


(root) to level 127

26.20
Domain name space

26.21
Label
■ A label is a string with a maximum of 63
characters. Each node in the tree has a label.

■ The root label is a null string (empty string).

■ DNS requires that children of a node have


different labels, which guarantees the
uniqueness of the domain names.

26.22
Domain Name
A domain name is a sequence of labels separated by
dots (.)
Each node in the tree has a domain name
The domain names are always read from the node up
to the root.
The last label is the label of the root (null).
This means that a full domain name always ends in a
null label, which means the last character is a dot
because the null string is nothing.

26.23
Figure shows some domain names and Labels

26.24
■ Domain names are used in URLs to identify
particular Web pages .
■ For example, in the
URL=http://www.pcwebopedia.com/index.htm
l,
the domain name is pcwebopedia.com

26.25
■ There are two types of domain names

Fully Qualified Domain Name

Partially Qualified Domain Name

26.26
Fully Qualified Domain Name
■ If a label is terminated by a null string, it is
called a Fully Qualified Domain Name
(FQDN).

■ An FQDN is a domain name that contains


the full name of a host.

■ It contains all labels, that uniquely define the


name of the host.

26.27
■ For example, the domain name
challenger.atc.fhda.edu.

is the FQDN of a computer named challenger


installed at the Advanced Technology Center
(ATC) at Foot Hill De Anza College which
comes under education(.edu)

■ Note that the name must end with a null label,


but because null means nothing, the label ends
with a dot (.).
26.28
Partially Qualified Domain Name
■ If a label is not terminated by a null string, it
is called a Partially Qualified Domain Name
(PQDN).

■ A PQDN starts from a node, but it does not


reach the root.

■ The resolver can supply the missing part,


called the suffix, to create an FQDN.
26.29
For example

■ If a user at the fhda.edu. site wants to get the


IP address of the challenger computer, he or
she can define the partial name
Challenger
The resolver adds the suffix atc.fhda.edu.

26.30
Domain

■ A domain is defines as the sub tree of the


domain name space.

■ The domain may itself be divided into sub


domains

■ The name of the domain is the domain name


of the node at the top of the subtree.

26.31
Figure shows some domains

26.32
DNS in the Internet

■ In the Internet, the domain name space (tree)


is divided into different sections:

■ Generic Domains
■ Country Domains
26.34
Generic Domains

■ A generic top-level domain (gTLD) is one of


the categories of top-level domains.

■ It is visible to Internet users as the suffix at


the end of a domain name

26.35
Generic Domains

26.36
■ Looking at the tree, we see that the top level in
the generic domains section allows 14 possible
labels.

■ These labels describe the organization types as


listed in Table

26.37
26.38
Country Domains
■ The country domains section uses
two-character country abbreviations (e.g., us
for United States).

■ Second labels can be organizational, or they


can be more specific, national designations.

■ The United States, for example, uses state


abbreviations as a subdivision of us (e.g.,
ca.us.)
26.39
Country Domains

26.40
Distribution of name space

26.41
■ The information contained in the domain name
space must be stored.

■ However, it is very inefficient and also unreliable to


have just one computer store such a huge amount of
information.

■ It is inefficient because responding to requests from


all over the world places a heavy load on the system.

■ It is not unreliable because any failure makes the


data inaccessible.

26.42
Hierarchy of Name Servers

■ The solution to these problems is to distribute


the information among many computers
called DNS servers

■ One way to do this is to divide the whole


space into many domains based on the first
level.

26.43
26.44
■ Each server can be responsible (authoritative)
for either a large or a small domain.

■ In other words, we have a hierarchy of servers


in the same way that we have a hierarchy of
names

26.45
Zone

■ The complete domain name hierarchy is


divided among multiple servers.
■ Each server handles one domain
■ The responsibility (authority) of a server for a
particular domain is called a zone
■ We can define a zone as a contiguous part of
the entire tree

26.46
26.47
Root server
■ Root server is a server whose zone consists of
the whole tree

■ Root server usually does not store any


information about domains but delegates its
authority to other servers, keeping references
to those servers

26.48
DNS Messages

26.49
■ DNS has two types of messages:
query message
response message

■ The query message consists of

Header
Question section

26.50
The response message consists of a

Header
Question section
Answer section
Authoritative section
Additional section

26.51
26.52
Header

■ Both query and response messages have the


same header format with some fields

■ The header is 12 bytes

■ The header format is shown below

26.53
26.54
The header fields are as follows:

Identification

It is 16bit field used by the client to match the


response with the query(request).

The client uses identification number each time


it sends a query(request). the server duplicates
this number in response

26.55
Flag

■ 16 bit field consisting of subfields that define

the type of the message,


the type of answer requested,

26.56
Number of Question Records
This is a 16-bit field consisting of number of
queries(request) in question section of
message.

Number of Answer Records


This is a 16-bit field containing the number of
answer records(response) in the answer
section of response message. Its value is 0 in
the query message.

26.57
Number of authoritative records
A 16 bit field which tells the number of
authoritative records in the authoritative
section of the response message. Its value is
zero in the query message.

Number of additional records.


This is a 16 bit field containing the number of
additional records in the additional section of
the response message.

26.58
Question Section

This is a section consisting of one or more


question records. It is present on both query
and response messages

Answer Section

This is section consisting of one or more


resource records. It is present only in response
messages. This section includes answer from
the server to the client
26.59
Authoritative Section

This section is also contained only in response


messages of DNS, and gives information about
domain names regarding authoritative servers
for the query.

Additional Information Section

This section provides additional information to


present only in response part of DNS message
format.
26.60
Types of record

26.61
Question Record
A question record is used by the client to get
information from a server. This contains the
domain name.

Resource Record
Each domain name (each node on the tree) is
associated with a record called the resource
record. The server database consists of
resource records. Resource records are also
what is returned by the server to the client.

26.62

You might also like