0% found this document useful (0 votes)
81 views42 pages

Application Layer

The document discusses several key application layer protocols used on the internet, including email (SMTP, MIME, POP), file transfer (FTP), the world wide web (HTTP), network addressing (DNS), and host configuration (DHCP). It provides details on how these protocols function, following the client-server model of communication. The document also focuses in depth on how DNS and SMTP operate, including explaining domain names and records, DNS servers and resolution types, email addressing, and how SMTP transfers messages over the internet between MTAs.

Uploaded by

Anubhav Kumar
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)
81 views42 pages

Application Layer

The document discusses several key application layer protocols used on the internet, including email (SMTP, MIME, POP), file transfer (FTP), the world wide web (HTTP), network addressing (DNS), and host configuration (DHCP). It provides details on how these protocols function, following the client-server model of communication. The document also focuses in depth on how DNS and SMTP operate, including explaining domain names and records, DNS servers and resolution types, email addressing, and how SMTP transfers messages over the internet between MTAs.

Uploaded by

Anubhav Kumar
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/ 42

Bikash Sadhukhan, Asst. Professor.

Techno India College of Technology.


Application layer duties
 Application layer provides different types of services to user.
 Some important application layer protocols on the Internet:
 Email – SMTP, MIME, POP
 Network virtual terminal – TELNET
 File transfer – FTP
 WWW – HTTP
 Address translation – DNS
 Host configuration – DHCP
Client-Server Model
 Most applications on the Internet follow the client-server model
 Communication over the Internet is considered to occur between
applications rather than people or even computers
 Some applications act as clients while others act as servers.
 Most of the common uses of the Internet require both a server and a
client component. Eg. Email, WWW, FTP, telnet
Clients and Servers
 A client is an application (usually running on the local computer) that
requests information or resources from an application called a server
(that isusually running on a remote host)
 Many clients can access the services of one server
 A client is usually run only when it is needed while a server is usually
running all the time
 Fat clients perform processing for themselves.
 Thin clients perform little or no processing for themselves
Connectionless iterative server
 An iterative server can process only one request at a time; it receives
a request; processes it; and sends the responses to the requester
before it handles another request.
 The server that uses UDP as transport layer protocol are normally
iterative.
Connection-oriented concurrent server
 A concurrent server on the other hand can process many requests at
the same time and thus can share its time between many requests.
 The server that uses TCP as transport layer protocol are normally
concurrent.
Socket structure
 The communication structure that need in socket programming is
socket. A socket acts as an endpoint. Two processes need a socket
at each end to communicate with each other.
 A socket is defined in the operating system as a structure.
Socket types
 The socket interface defines three types of socket :
 The stream socket.
 The datagram socket
 The raw socket (used by ICMP, OSPF).
Domain Name System (DNS)
 Domain Name System (DNS) is a database system that translates a
computer's fully qualified domain name into an IP address.
 Networked computers use IP addresses to locate and connect to
each other, but IP addresses can be difficult for people to
remember. For example, on the web, it's much easier to remember
the domain name www.amazon.com than it is to remember its
corresponding IP address (207.171.166.48). DNS allows you to
connect to another networked computer or remote service by using
its user-friendly domain name rather than its numerical IP address.
Conversely, Reverse DNS (rDNS) translates an IP address into a
domain name.

DNS can use the services of UDP or TCP, using the well-known port 53.
Domain name space
 The domain name space consists of a tree of domain names. Each node or
leaf in the tree has one or more resource records, which hold information
associated with the domain name.
 The tree is sub-divided into zones. A zone consists of a collection of
connected nodes authoritatively served by an authoritative DNS name
server. (Note that a single name server can host several zones.)
Domain names and labels
 Each node in the tree has a label, which is a string with maximum of 63
characters. The root label is a null string(empty string).
 Each node in the tree has a domain name. A full domain name is a
sequence of labels separated by (.) dots.
 The domain names are always read from the node up to the root. The
last label is the label of the root.
FQDN and PQDN
 FQDN: Fully qualified domain name is a domain name that
contains the full name of a host. It contains all labels, from the most
specific to the most general, that uniquely define the name of the
host.
 PQDN: Partially qualified domain name starts from a node, but
does not reach the root. It is used when the name to be resolved
belongs to the same site as the client.
Domains
 A domain is a sub tree of the domain name space. The name of the
domain is the domain name of the node at the top of the sub tree.
 A domain may itself be divided into domains, or sub domains
DNS Server & Name server
 The name space information is distributed among DNS servers. Each
server has the jurisdiction over its zone.
 The root server „s zone is the entire tree.
 Server responsible for answering DNS queries
 In DNS we have hierarchy of servers called Name servers in the same way
that we have a hierarchy of names.
 One name server can serve more then one zone

Hierarchy of name servers


Primary & Secondary Name Server
 A Root server is a server whose zone consists of the whole tree. A root
server usually does not store any information about domains but delegates
its authority to other servers, keeping reference to those servers. Currently
there are 13 root servers each covering the whole domain space. The
servers are distributed all around the world.

 A Primary server is a server that store a file about the zone for which it
is the authority. It is responsible for creating maintaining and updating the
zone file. It stores the zone file in a local disk.

 The Secondary server is a server that transfer the complete information


about a zone from another server(primary or secondary) and stores the file
on its local disk. The secondary server neither creates or updates the zone
file. Updating is performed by primary server which sends the updated
version to the secondary.
DNS in the Internet
 The domain name space in the internet is divided into three sections.
 Generic Domains
 Country Domains
 Inverse Domains
Generic domains
 There are seven traditional generic domains each specifying an
organization type. Recently some new labels have been added.

Label Description
Commercial
com
organizations
edu Educational institutions
gov Government institutions
International
int
organizations
mil Military groups
net Network support centers
org Nonprofit organizations
Country domains
 Each country domain specifies a country.
Inverse domain
 The Inverse domain finds a
domain name for a given IP
address. This is called address
to name resolution
DNS Resolver

 Name servers are the computers that runs the DNS server program.
They are organized in hierarchy.
 DNS is designed as a client-server application. A host that needs to
map an address to a name or a name to an address calls a DNS client
named as resolver. The resolver accesses the closest DNS server with
a mapping request. If the server has the information, it satisfies the
resolver; otherwise, it either refers the resolver to other servers or asks
other servers to provide the information.
Recursive resolution
 In Recursive resolution the client sends its request to a
server that eventually returns a response.
Iterative resolution
 In Iterative resolution, the client may send its request to multiple
severs before getting an answer.
Simple Mail Transfer Protocol (SMTP)

 Simple Mail Transfer Protocol is the standard e-mail protocol on the


Internet and part of the TCP/IP protocol suite.
 SMTP defines the message format and the message transfer agent
(MTA), which stores and forwards the mail.
 SMTP is a relatively simple, text-based protocol, where one or more
recipients of a message are specified and then the message text is
transferred. SMTP uses TCP port 25.
 SMTP was originally designed for only plain text (ASCII text), but
MIME and other encoding methods enable executable programs and
multimedia files to be attached to and transported with the e-mail
message.
Email address
 The addressing system used by SMTP consists of two parts.
User agent
 User agents are sometimes called mail reader.
 Some examples of command-driven user agents are mail, pine, and elm.
 Some examples of GUI-based user agents are Eudora, Outlook, and
Netscape.
 Services provided by an User Agent:
MIME (Multipurpose Internet Mail Extension)
 MIME is a supplementary protocol that allows non –ASCII data to be sent
through SMTP. MIME is not a mail protocol and can not replace SMTP; it is
only an extension of SMTP.
 MIME defines a way in which different data types and formatted message
bodies can be converted into a document made up of seven-bit “ASCII”
characters so that it can be transferred using SMTP.
MTA client and server
 The actual mail transfer is done through Mail Transfer Agents (MTA).
To send mail a system must have a client MTA; and to receive mail, a
system must have a server MTA.
 SMTP uses commands and responses to transfer messages between an
MTA client and MTA server.
How SMTP Transfers an Email Over
the Internet
 You write an email which gets transferred by your user agent (email
program) to the local message transfer agent (MTA) client‟s
outgoing message queue.
 The MTA client attempts to set up a connection with the MTA server
at the destination
 If the connection is established, the email message (along with any
others that are waiting in the queue) is transferred from the message
queue of the local MTA client to the incoming queue of the remote
MTA server
 At some later stage the intended recipient will hopefully log into the
remote MTA using their UA and retrieve the email message
Email delivery
 The delivery of email from the sender to the receiver consists of three stages
Mail Access Protocol
 The first and second stages of mail delivery use SMTP.
 However, SMTP is not involved in the third stage. The third
stage uses Mail Access Protocol.
 E.g. - POP3 (Post Office Protocol)
IMAP4 (Internet Mail Access Protocol)
The Post Office Protocol (POP3)
 POP 3 allows users to simply and conveniently transfer email messages
between their computer and the mail server.
File Transfer Protocol
 FTP is a standard mechanism provided by the Internet for copying a
file or transferring a file from one computer to another.
 FTP uses the services of TCP. It needs two TCP connections. The
well-known port 21 is used for the control connection, and the well-
known port 20 is used for the data connection.
How FTP Works
 FTP establishes two connections: a control connection and a data transfer connection.
 The control connection is open for the duration of the FTP session. Prior the actual transfer of
files, the file type, data structure, and transmission modes are defined by the client through
the control connection.
 The data transfer connection is opened and closed at the start and end of each file transfer.
(Allows for different transfer modes for different file types, i.e. binary and ASCII).
 The separation of control and data transfer improves the efficiency of FTP since less overhead
is required to transfer the commands (that are very simple).
WWW
 The World Wide Web (WWW) is an Internet application (NOT a
network!) that is essentially a distributed information repository.
 Tim Berners-Lee at the CERN Laboratory in Geneva first conceived
the Web in 1989.
 It is a distributed client-server system where web browsers (such as
Netscape or IE) are the clients and special server software (such as
IIS, Apache, etc.) is installed on hosts that serve as web servers for
web sites.
What Makes up a Web Browser?
 A web browser typically consists of three parts:
 Controller: allows the user to interact with documents. It uses the
services of client programs and interpreters. Roughly speaking it
is the user interface.
 Client programs: provide the means of accessing various types of
documents in different ways. They can include any of the file
management protocols mentioned in this lecture (FTP, TELNET,
HTTP).
 Interpreters: used to translate the document content into a
meaningful display. Examples include HTML and Java.
HTTP Request Packets
 A HTTP request from a Web browser to a Web server has three
parts. Only the first part is required, the other two are optional.
 The request line
 The request header
 The request body
Uniform Resource Locator
 A client that wants to access a webpage needs an address. To
facilitate the access of documents distributed throughout the
world, HTTP uses the concept of URL. URL is a standard for
specifying any kind of information on the Internet.
Dynamic Host Configuration Protocol
(DHCP)
 Dynamic Host Configuration Protocol (DHCP) assigns IP
addresses to hosts. It allows easier administration and works
well in small to even very large network environments. All
types of hardware can be used as a DHCP server, including a
router.
 There is a lot of information a DHCP server can provide to a
host when the host is requesting an IP address from the DHCP
server. Here‟s a list of the information a DHCP server can
provide:
 IP address
 Subnet mask
 Domain name
 Default gateway (routers)
 DNS
 WINS information
Dynamic Host Configuration
Protocol (DHCP)
 A client that sends out a DHCP Discover message in order to
receive an IP address sends out a broadcast at both layer 2 and
layer 3. The layer 2 broadcast is all Fs in hex, which looks like
this: FF:FF:FF:FF:FF:FF. The layer 3 broadcast is
255.255.255.255, which means all networks and all hosts.
DHCP is connectionless, which means it uses User Datagram
Protocol (UDP) at the Transport layer.
DHCP transition diagram
TELNET
 The main purpose of the Internet is to provide users with access to the
resources of other computers or networks. Reasons for this might include:
 The remote server has a greater processing ability than the client.
 The server contains a large store of files of interest to the user.
 The server has a greater storage capacity than the client.
 The server may have peripheral devices that the user wants to take
advantage of (like a color printer, backup tape drive etc.)
 TELNET overcomes this by providing a generic remote access mechanism
that allows the user the remote computer as though they were directly
logged onto that computer.
Virtual Private Networks
 Since the Internet is a heterogeneous system, TELNET needs some
mechanism for translating between the character sets and
commands of the various hosts on the network. This is provided by
Network Virtual Terminal (NVT).
 A virtual private network (VPN) is a means of using the Internet as
though it were your own LAN
 Normally sending data over the Internet involves leaving it “out in
the open” and vulnerable to eavesdropping
 A VPN is software/hardware/firmware that allows the packets to
travel as though they were in the protected environment of the
intranet – this requires the use of encryption and sometimes special
communication between the endpoint routers

You might also like