0% found this document useful (0 votes)
13 views74 pages

Understanding Application Layer Protocols

Module 5 discusses the Application Layer of the TCP/IP suite, focusing on standard and nonstandard protocols, client-server and peer-to-peer paradigms, and the World Wide Web's structure and protocols like HTTP. It covers the importance of URLs, web document types (static, dynamic, active), and the role of proxy servers in web caching. Additionally, it addresses electronic mail architecture, SMTP, and the Domain Name System (DNS) for mapping host names to IP addresses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views74 pages

Understanding Application Layer Protocols

Module 5 discusses the Application Layer of the TCP/IP suite, focusing on standard and nonstandard protocols, client-server and peer-to-peer paradigms, and the World Wide Web's structure and protocols like HTTP. It covers the importance of URLs, web document types (static, dynamic, active), and the role of proxy servers in web caching. Additionally, it addresses electronic mail architecture, SMTP, and the Domain Name System (DNS) for mapping host names to IP addresses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

MODULE 5

APPLICATION LAYER
INTRODUCTION
Providing Services
• Standard and Nonstandard Protocols
• To provide smooth operation of the Internet, the
protocols used in the first four layers of the TCP/IP
suite need to be standardized and documented.
• They normally become part of the package that is
included in operating systems such as Windows or
UNIX.
• To be flexible, however, the application-layer
protocols can be both standard and nonstandard.
Application-Layer Paradigms
• To use the Internet we need two application
programs to interact with each other: one running on
a computer somewhere in the world, the other
running on another computer somewhere else in the
world. The two programs need to send messages to
each other through the Internet infrastructure.
• Two paradigms have been developed
• the client-server paradigm
• and the peer-to-peer paradigm.
client-server paradigm
• In this paradigm, the service provider is an application
program, called the server process;
• it runs continuously, waiting for another application
program, called the client process, to make a connection
through the Internet and ask for service.
• There are normally some server processes that can provide
a specific type of service, but there are many clients that
request service from any of these server processes.
• The server process must be running all the time; the client
process is started when the client needs to receive service.
client-server paradigm
New Paradigm: Peer-to-Peer
• In this paradigm, there is no need for a server
process to be running all the time and waiting for the
client processes to connect. The responsibility is
shared between peers.
• A computer connected to the Internet can provide
service at one time and receive service at another
time. A computer can even provide and receive
services at the same time.
New Paradigm: Peer-to-Peer
• Peer-to-peer paradigm has been proved to be easily
scalable and cost-effective in eliminating the need
for expensive servers to be running and maintained
all the time, there are also some challenges.
• The main challenge has been security; it is more
difficult to create secure communication between
distributed services than between those controlled
by some dedicated servers.
• Applications, such as BitTorrent, Skype, IPTV, and
Internet telephony
New Paradigm: Peer-to-Peer
WORLD WIDE WEB AND HTTP
• Web was first proposed by Tim Berners-Lee in 1989 .
• The Web today is a repository of information in which the
documents, called web pages, are distributed all over the
world and related documents are linked together.
• Each web server in the world can add a new web page to
the repository and announce it to all Internet users
without overloading a few servers.
• Linking allows one web page to refer to another web page
stored in another server somewhere else in the world. The
linking of web pages was achieved using a concept called
hypertext.
Retrieve a scientific document
Web Client (Browser)
Web Server
• The web page is stored at the server. Each
time a request arrives, the corresponding
document is sent to the client. To improve
efficiency, servers normally store requested
files in a cache in memory; memory is faster to
access than a disk.
• A server can also become more efficient
through multithreading or multiprocessing.
Uniform Resource Locator (URL)
• A web page, as a file, needs to have a unique identifier to
distinguish it from other web pages.
• To define a web page, we need three identifiers: host, port,
and path.
• Before defining the web page, we need to tell the browser
what client server application we want to use, which is
called the protocol. This means we need four identifiers to
define the web page.
• The first is the type of vehicle to be used to fetch the web
page; the last three make up the combination that defines
the destination object (web page).
Uniform Resource Locator (URL)
Protocol. The first identifier is the abbreviation for the client-server program that
in order to access the web page. Mostly used protocol HTTP (HyperText Transfer
Protocol), FTP (File Transfer Protocol).
Host. The host identifier can be the IP address of the server or the unique name
given to the server.
Port. The port, a 16-bit integer, is normally predefined for the client-server application.
For example, if the HTTP protocol is used for accessing the web page, the well-known
port number is 80.
Path. The path identifies the location and the name of the file in the underlying
operating system. The format of this identifier normally depends on the operating
system.
In UNIX, a path is a set of directory names followed by the file
name, all separated by a slash. For example, /top/next/last/myfile is a path that
uniquely defines a file named myfile, stored in the directory last, which itself is
part of the directory next, which itself is under the directory top.
Uniform Resource Locator (URL)
• protocol://host/path Used most of the time
• protocol://host:port/path Used when port
number is needed
• URL
[Link]
• The path is compsci/forouzan/, which defines
Forouzan’s web page under the directory
compsci
Web Documents
• The documents in the WWW can be grouped
into three broad categories: static, dynamic,and
active.
• Static Documents
• Static documents are fixed-content documents
that are created and stored in a server. The
client can get a copy of the document only.
• Ex:HTML,XML.
Dynamic document
• A dynamic document is created by a web server
whenever a browser requests the document.
• When a request arrives, the web server runs an
application program or a script that creates the
dynamic document.
• The server returns the result of the program or script as
a response to the browser that requested the
document.
• Because a fresh document is created for each request,
the contents of a dynamic document may vary from
one request to another.
• Ex:jsp, ASP, SQL
Active Documents
• For many applications, we need a program or
a script to be run at the client site.
• Ex:JAVA applets, Java scripts.
HyperText Transfer Protocol (HTTP)
• The HyperText Transfer Protocol (HTTP) is
used to define how the client-server programs
can be written to retrieve web pages from the
Web. An HTTP client sends a request; an HTTP
server returns a response. The server uses the
port number 80; the client uses a temporary
port number.
• HTTP uses the services of TCP.
Nonpersistent versus Persistent
Connections
In a non persistent connection, one TCP connection
is made for each request/response.
The following lists the steps in this strategy:
1. The client opens a TCP connection and sends a
request.
2. The server sends the response and closes the
connection.
3. The client reads the data until it encounters an
end-of-file marker; it then closes the connection.
Non persistent connection
Persistent Connections
• HTTP version 1.1 specifies a persistent
connection by default. In a persistent
connection,the server leaves the connection
open for more requests after sending a
response.
persistent connection
Message Formats
Methods
Request header names
Response header names
Conditional Request
Request
Example
• client imposes the modification data and time
condition on a request.

• status line in the response shows the file was


not modified after the defined point in time.
The body of the response message is also
empty.
Cookies mechanism
• Websites are being used as electronic stores
that allow users to browse through the store,
select wanted items, put them in an electronic
cart, and pay at the end with a credit card.
• Some websites need to allow access to
registered clients only.
• Some websites are used as portals: the user
selects the web pages he wants to see.
• Some websites are just advertising agencies.
Use of cookies.
Web Caching: Proxy Servers
• HTTP supports proxy servers. A proxy server is
a computer that keeps copies of responses to
recent requests.
• The proxy server reduces the load on the
original server, decreases traffic, and improves
latency.
• To use the proxy server, the client must be
configured to access the proxy instead of the
target server.
Proxy Server Location
1. A client computer can also be used as a proxy
server, in a small capacity, that stores responses
to requests often invoked by the client.
2. In a company, a proxy server may be installed
on the computer LAN to reduce the load going
out of and coming into the LAN.
3. An ISP with many customers can install a
proxy server to reduce the load going out of and
coming into the ISP network.
Example of a proxy server
File Transfer Protocol (FTP)
Two Connections
• Control Connection and Data Connection
• During this control connection, commands are
sent from the client to the server and
responses are sent from the server to the
client.
FTP commands
Responses in FTP
Data Connection
1. The client, not the server, issues a passive
open using an ephemeral port. This must be
done by the client because it is the client that
issues the commands for transferring files.
2. Using the PORT command the client sends
this port number to the server.
3. The server receives the port number and
issues an active open using the wellknown port
20 and the received ephemeral port number.
Communication over Data Connection
Actual FTP session that lists the directories
ELECTRONIC MAIL
• Electronic mail (or e-mail) allows users to
exchange messages.
• Architecture
Format of an e-mail
Message Transfer Agent: SMTP
SMTP commands
Responses
Responses
Three mail transfer phases
Post Office Protocol, version 3 (POP3)
Internet Mail Access Protocol, version 4
(IMAP4).
❑ A user can check the e-mail header prior to downloading.
❑ A user can search the contents of the e-mail for a specific
string of characters prior to downloading.
❑ A user can partially download e-mail. This is especially
useful if bandwidth is limited and the e-mail contains
multimedia with high bandwidth requirements.
❑ A user can create, delete, or rename mailboxes on the
mail server.
❑ A user can create a hierarchy of mailboxes in a folder for
e-mail storage.
Multipurpose Internet Mail Extensions
(MIME)
MIME Headers
Data types and subtypes in MIME
Methods for Content-Transfer-Encoding
Base64 conversion
Quoted-printable
Web-Based Mail
TELNET
• A server program can provide a specific service to its
corresponding client program. For example, the FTP
server is designed to let the FTP client store or
retrieve files on the server site.
1. The simple plaintext architecture of TELNET allows
us to explain the issues and challenges related to the
concept of remote logging, which is also used in SSH
when it serves as a remote logging protocol.
2. Network administrators often use TELNET for
diagnostic and debugging purposes.
Local versus Remote Logging
Network Virtual Terminal (NVT)
Interface commands
DOMAIN NAME SYSTEM (DNS)
Six steps map the host
name to an IP address:
[Link] user passes the host name to the file transfer client.
2. The file transfer client passes the host name to the DNS client.
3. Each computer, after being booted, knows the address of one
DNS server. The DNS client sends a message to a DNS server with
a query that gives the file transfer server name using the known
IP address of the DNS server.
4. The DNS server responds with the IP address of the desired
file transfer server.
5. The DNS server passes the IP address to the file transfer client.
6. The file transfer client now uses the received IP address to
access the file transfer server.
Domain Name Space
Domain names and labels
Domains
Hierarchy of name servers
ZONE
Types
DNS Messages
THANK YOU

You might also like