0% found this document useful (0 votes)
60 views

Application Layer

The document discusses application layer protocols and domain name system (DNS). It provides details about various application layer protocols like FTP, SMTP, TELNET etc. It then explains the purpose and structure of domain names, hierarchical domain name space, domain name resolution using DNS database and records. It also discusses electronic mail architecture, formats, protocols used for mail transmission and access like SMTP, POP3, IMAP.

Uploaded by

ramna k
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

Application Layer

The document discusses application layer protocols and domain name system (DNS). It provides details about various application layer protocols like FTP, SMTP, TELNET etc. It then explains the purpose and structure of domain names, hierarchical domain name space, domain name resolution using DNS database and records. It also discusses electronic mail architecture, formats, protocols used for mail transmission and access like SMTP, POP3, IMAP.

Uploaded by

ramna k
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Application Layer Protocols

• Top most layer in OSI and TCP/IP layered model.


• Interacts with user/software and user applications to get access of
network.
• Application layer is where the actual communication is initiated and
reflects.
• Supports protocols to allow the applications to function.
Ex. FTP, SMTP,TELNET,DNS etc.,
Purpose of Naming system

• Names(human readable) are easier to remember rather than numbers


• Domain name used to locate computers connected to internet.
• To get address or other objects using a name
• DNS provides mapping from names to resources of many types. A domain
name consists of 2 or 3 components separated by periods called dots(.)
Ex.www.gitam.edu
Once domain established then subdomains can be created within the domain.
Ex.glearn.gitam.edu, login.gitam.edu etc..,
Structure of domain name

Lastname.subdomain.second-
leveldomain.top-level domain
Ex.student.glearn.gitam.edu
Third-level domain Second-level domain top-level domain

Ex.www.webhostinggitam.edu
Domain Name System
• Hierarchical domain based naming and distributed db system for
implementing naming scheme.

• DNS is a Collection of databases that contain information about


domain names and their IP address.

• Each domain name has a corresponding IP address.


• When the user types the domain name in the address bar the
corresponding IP address is supplied with help of DNS.
• To map name to IP address to an application prgm calls a library
procedure called resolver(by passing parameter).
Domain Name Space
• Naming hierarchy is managed by ICANN(Internet Corporation Assigned
Names and Numbers) for maturing the internet and WWW.
• Partitioned into two top level domains
generic or organizational domains(three character code ex..com,.org )
country or geographical domains(two character code)(ex. .in , .jp ),
• Domain names can be absolute (ends with (.) and relative(does not end (.)
• Domain names are case-insensitive (ex. .edu,Edu and .EDU means same )
• Component names can be 63 characters long and domain name must not
exceed 255 characters.
A portion of the Internet domain name space
The Internet is divided into over 250 top-level domains, where each
domain covers many hosts.
• Each domain is partitioned into subdomains, and these are further
partitioned, and so on.
• The leaves of the tree represent domains that have no subdomains .
• A leaf domain may contain a single host, or it may represent a
company and contain thousands of hosts.
Domain Resource Records
• Every domain, whether it is a single host or a top-level domain, can
have a set of resource records associated with it.
• These records are the DNS database.
• For a single host, the most common resource record is just its IP
address, but many other kinds of resource records also exist.
• When a resolver gives a domain name to DNS, what it gets back are
the resource records associated with that name. Thus, the primary
function of DNS is to map domain names onto resource records.
Contd..
• Resource record is a five-tuple.
• They are encoded in binary for efficiency(ASCII)
format: Domain_name Time_to_live Class Type Value
• The Domain_name tells the domain to which this record applies and information
about multiple domains.
• This field is thus the primary search key used to satisfy queries
• The Time_to_live field gives an indication of how stable the record is.
• Information that is highly stable is assigned a large value, such as 86400 (the number of
seconds in 1 day). Information that is highly volatile is assigned a small value, such as 60 (1
minute).
• Class. For Internet information, it is always IN.
• For non-Internet information, other codes can be used, but in practice these are rarely seen.
• The Type field tells what kind of record this is. There are many kinds of DNS records.
The principal DNS resource record types
Name Servers
• Name server could contain the entire DNS
database and respond to all queries.
• Single server can be overloaded and lead
to crippling of internet.
• To avoid this problem a single source of
information, the DNS name space is divided
into non-overlapping zones.
• zone’s administrator takes how many name servers are
desired
• Each zone is also associated with one or more name
servers. Part of the DNS name space divided into zones
• The process of looking up a name and finding an
address is called name resolution.
Working principle of name servers for finding address of
remote
Important technical points to be noted
• Recursive query and iterative query
First, two different query mechanisms are at work (Recu.Q).
The local name server is responsible for continuing the resolution
by issuing further queries(iterative query).
• Caching
Partial answers are returned and cached , it reduces steps and
improves the performance
• Transport protocol
UDP packets are used for all queries and responses, name
servers used for resolution.
Features of DNS
• Global distribution
• Data is maintained locally but retrievable globally
• No single computer has all DNS data
• DNS lookups performed by any device
• Remote DNS data is locally catchable to improve performance.

• Scalability
• No limit to DB
• One server has over 20,000,000 names
• No limit to queries(24,000 queries per second)
• Dynamicity
• DB updated dynamically(add/delete/modify of any record)
• Reliability
• Data is replicated(from master is copied to multiple slaves)
• Loose coherency
• DB consistent, changes made by master is send to zone administrators.
Electronic Mail
• Faster and cheaper than paper mail
• Email has been a popular application since the early days of the
Internet.
• large and grew exponentially from 1990.
• Email systems are organized and what they can do with architecture
and systems.
Architecture and services

• It consists of two kinds of subsystems:


• User agents, which allow people to read and
send email. It is a program that provides a
graphical interface, or sometimes a text- and
command-based interface that lets users
interact with the email system. It includes a
means to compose messages and replies to
messages, display incoming messages, and
organize messages by filing, searching, and
discarding them. The act of sending new
messages into the mail system for delivery is
called mail submission
• Message transfer agents,- system processes
which move the messages from the source to
the destination(mail servers). Their job is to
automatically move email through the system
from the originator to the recipient with SMTP
(Simple Mail Transfer Protocol).
Message Formats
• RFC 5322—The Internet Message
Format
MIME—The Multipurpose Internet Mail
Extensions
• It is widely used for mail messages that are sent across the Internet.
• The basic idea of MIME is to continue to use the RFC 822 format (the
precursor to RFC 5322 the time MIME was proposed) but to add
structure to the message body and define encoding rules for the
transfer of non-ASCII messages.
• MIME defines five new message headers.
SMTP (Simple Mail Transfer Protocol) and Extensions

• It is TCP/IP protocol used in sending and receiving e-mail, and simple ASCII protocol.
• Users, typically use a program that uses SMTP for sending e-mail and either POP3
or IMAP for receiving e-mail.
• Email is delivered by sending computer establish a TCP connection to port 25 of the
receiving computer.
• This server accepts incoming connections, subject to some security checks, and
accepts messages for delivery. If a message cannot be delivered, an error report
containing the first part of the undeliverable message is returned to the sender.
• Using ASCII text makes protocols easy to develop, test, and debug. They can be
tested by sending commands manually, and records of the messages are easy to
read. Most application-level Internet protocols now work this way (e.g., HTTP).
SMTP commands
• The HELO command- is used to initiate an smtp session. when one host
needs to establish an smtp session with another host.
• MAIL FROM-is used primarily to send email addresses.
• The RCPT TO-tells the receiving host email address of message recipient.
• DATA-body of the mail.
• The QUIT-is used to terminate the smtp session
• The RSET-performs smtp reset and then aborts the message i.e currently
being sent.
• EXPN-includes mailing list to be expanded.
IMAP—The Internet Message Access
Protocol
• It is an application layer internet protocol (RFC 3501 ) that allows an email client from local server
to access email on a remote mail server. well known port 143.
• Use of IMAP can create multiple folders and mailboxes on server , delete messages or search for
entire part or certain part.
• It requires continual access to the server during ,working with your mail.
• It is designed for users to stay connected to one or more email servers while reading, creating and
organizing messages.
• Users can manipulate both mails and mailboxes on server side, they can be private and public
access.
• Imap messages are stored in server , and can also be cached on local server machine for office use.
• Deleting the cached does not delete on server.
• It saves bandwidth by downloading just headers ( to,from,subject) of email without transferring the
message or any attachments to client.
POP3 (Post Office Protocol, version 3),
• It is a simpler client/server protocol(RFC 1939) but supports fewer
features and is less secure in typical usage.
• Protocol for receiving e-mail.
• Store and forward service, listens on well known port 110.
• Used to retrieve mail for a single user , requires authentication.
• POP3 commands-USER-specify user name, PASS-Password, STAT-get
mail status, LIST-list of msgs and sizes, RETR-retrieve a msg,
TOP-send header lines from msg and APOP-alternative authentication
Webmail
• It is common, increasingly popular and alternative to IMAP and SMTP
for providing email service is to use the Web as an interface for
sending and receiving mail.
• Popular are Google Gmail, Microsoft Hotmail and Yahoo! Mail.
Independent of machine only browser is needed.
• Webmail is one example of software (in this case, a mail user agent)
that is provided as a service using the Web.
• Web pages will often include JavaScript programs to make interactive
and responsive.
Background
• The Web began in 1989 at CERN, the European Center for Nuclear
Research.
• Through the 1990s and 2000s, Web sites and Web pages, as Web
content is called, grew exponentially until there were millions of sites
and billions of pages.
• In 1994, CERN and M.I.T. signed an agreement setting up the W3C
(World Wide Web Consortium), an organization devoted to further
developing the Web, standardizing protocols, and encouraging
interoperability between sites
Architectural overview
• Web consists of a vast, worldwide collection of content in the form of
Web pages, often just called pages for short. Each page may contain
links.
• The idea of having one-page point to another, now called hypertext.
• Pages are generally viewed with a program called a browser
(ex.firefox,chrome,IE).
• Page are associated with links to other pages. A piece of text, icon,
image, and so on associated with another page is called a hyperlink.
• Pages can be static-same everytime dynamic-differs from each time.
Architectural view of web
The Client Side

• Each page is assigned a URL (Uniform Resource Locator) that


effectively serves as the page’s worldwide name.
• URLs have three parts:
• protocol (also known as the scheme)
• DNS name of the machine on which the page is located,
• path uniquely indicating the specific page (a file to read or program to run on
the machine). In the general case, the path has a hierarchical name that
models a file directory structure.
Steps to fetch page from client side
• The browser determines the URL (by seeing what was selected).
• The browser asks DNS for the IP address of the server www.cs.washington.edu.
• DNS replies with 128.208.3.88.
• The browser makes a TCP connection to 128.208.3.88 on port 80, the well-known port for the HTTP
protocol.
• It sends over an HTTP request asking for the page /index.html.
• The www.cs.washington.edu server sends the page as an HTTP response, for example, by sending the
file /index.html.
• If the page includes URLs that are needed for display, the browser fetches the other URLs using the same
process. In this case, the URLs include multiple embedded images also fetched
fromwww.cs.washington.edu, an embedded video from youtube.com, and a script from google-
analytics.com.
• The browser displays the page /index.html .
• The TCP connections are released if there are no other requests to the same servers for a short period.
The Server Side

• Accept a TCP connection from a client (a browser).


• Get the path to the page, which is the name of the file requested.
• Get the file (from disk).
• Send the contents of the file to the client.
• Release the TCP connection.
A multithreaded Web server
• A problem with this design is that every
request requires making a disk access to
get the file.
• The result is that the Webserver cannot
serve more requests persecond than it
can make disk accesses.
• One improvement (used by all
Webservers) is to maintain a cache in
memory of then most recently used files.
• Other improvement for building a faster
server is to make the server
multithreaded.
PGP and PEM
• Pretty Good Privacy (PGP) and Privacy Enhanced Mail (PEM) are used
mainly for electronic mail security.  They are datagram-like in that
they allow users to send single, asynchronous messages to each other.
• PEM is more flexible, in that it offers a choice of cryptographic
algorithms and certificate authorities, although these can't be
negotiated since messages are asynchronous. PEM is also more
extensible, since PEM data are passed in named header fields, as
specified in . PGP requires less infrastructure and is thus suited for
more ad hoc environments.

You might also like