Application Layer
Application Layer
Chapter 9
1
Introduction
Session Layer
Transport Layer
Network Layer
Datalink Layer
Physical Layer
Fig: OSI Model
4
Functions of Application Layer
a. File transfer, access and management
d. Remote login
e. Addressing
5
a. File transfer, access and management
A standard mechanism to transfer, access and
manage files on a remote computer
6
b. Email and Communication
Application layer provides protocols used in
communication tools
8
d. Remote login
12
Working principle of SMTP
13
Advantages of SMTP
Easy to use
14
Disadvantages of SMTP
15
POP3 (Post Office Protocol Version 3)
POP3 is an internet standard protocol used by email
clients to retrieve email from mail server
17
Advantages of POP3
Easy to configure
18
Disadvantages of POP3
19
IMAP(Internet Message Access Protocol)
• Its allows you to access your email wherever you are, from any
device.
20
Working Principle of IMAP:
21
Advantages
• User have remote access to all the contents.
22
Disadvantage
• Imap is complex to maintain.
23
DHCP:
24
Working Principle of DHCP
26
DHCP Discover:
Each Computer run a DHCP client it will allows the
computer to ask IP address .
DHCP Offer:
When the DHCP Server get the message then DHCP
server will offer the IP address to the host.
27
DHCP Request:
The Host will received the IP address and send the
request to DHCP server.
DHCP ACK:
28
Advantages:
IP address are supplied automatically.
Disadvantages:
Client is not able to access the network in the absence of the DHCP server.
Your machine name does not change when you get new IP address.
30
Working Principle of DNS:
31
When you type any website name such as google.com, facebook.com .Where
webserver Does not work with domain name. so computer need to translate this in to
IP address.
The First thing computer will check the local cache in both computer and the browser.
If there is no cache entries then computer will send query that is called to DNS
recursive Resolver asking for IP address for any website like facebook.com.
Once the query is received by the DNS recursive Resolver ,it checks it Cache , if it
cannot find then website that you have pressed then it will request to another server.
This server is Root server. The root server is the top level of DNS hierarchy. The Root
server provides the Top level domain servers. Like .com, .net, org etc.
For this example :-Then root server will refer us top level Domain server for .com.
Then we query Top level domain server for the websites like facebook.com .
A Top level domain server contains information for Domains with specific extension
such as .com .org etc.
But if the TDL still does not know the IP Address.
When we send Query to Authoritative name server this the last step in DNS Processing
, if it has the record of the website like facebook.com then it will send IP Address.
The IP Address is Send to our DNS resolver and DNS resolver will send the IP address
to our Computer. With the IP address our Computer can work with webserver.
32
Advantages:
33
Disadvantages:
34
HTTP
• The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
distributed, collaborative, hypermedia information systems. This is the
foundation for data communication for the World Wide Web (i.e. internet)
since 1990. HTTP is a generic and stateless protocol which can be used for
other purposes as well using extensions of its request methods, error
codes, and headers.
• Basically, HTTP is a TCP/IP based communication protocol, that is used to
deliver data (HTML files, image files, query results, etc.) on the World Wide
Web. The default port is TCP 80, but other ports can be used as well. It
provides a standardized way for computers to communicate with each
other. HTTP specification specifies how clients' request data will be
constructed and sent to the server, and how the servers respond to these
requests.
35
Basic Architecture
The following diagram shows a very basic architecture of a web
application and depicts where HTTP sits:
36
• The HTTP protocol is a request/response protocol based on the
client/server based architecture where web browsers, robots and
search engines, etc. act like HTTP clients, and the Web server acts as a
server.
• Client
• The HTTP client sends a request to the server in the form of a request
method, URI, and protocol version, followed by a MIME-like message
containing request modifiers, client information, and possible body
content over a TCP/IP connection.
• Server
• The HTTP server responds with a status line, including the message's
protocol version and a success or error code, followed by a MIME-like
message containing server information, entity meta information, and
possible entity-body content.
37
WWW(World Wide Web)
• WWW stands for World Wide Web. A technical definition of the
World Wide Web is : all the resources and users on the Internet that
are using the Hypertext Transfer Protocol (HTTP).
• A broader definition comes from the organization that Web
inventor Tim Berners-Lee helped found, the World Wide Web
Consortium (W3C).
• The World Wide Web is the universe of network-accessible
information, an embodiment of human knowledge.
• In simple terms, The World Wide Web is a way of exchanging
information between computers on the Internet, tying them together
into a vast collection of interactive multimedia resources.
38
WWW
• The WWW today is a distributed client/server service, in which a
client using a browser can access a service using a server. However,
the service provided is distributed over many locations called sites as
shown in fig.
39
File Transfer : Ftp, PUTTY, WinSCP
FTP
FTP stands for File transfer protocol.
FTP is a standard internet protocol provided by TCP/IP used for transmitting
the files from one host to another.
It is mainly used for transferring the web page files from their creator to the
computer that acts as a server for other computers on the internet.
It is also used for downloading the files to computer from other servers.
40
Objectives of FTP
• It provides the sharing of files.
• It is used to encourage the use of remote computers.
• It transfers the data more reliably and efficiently.
Why FTP?
Although transferring files from one system to another is very simple and straightforward, but
sometimes it can cause problems. For example, two systems may have different file conventions.
Two systems may have different ways to represent text and data. Two systems may have different
directory structures.
FTP protocol overcomes these problems by establishing two connections between hosts.
One connection is used for data transfer, and another connection is used for the control connection.
41
Mechanism of FTP
42
WinSCP
• WinSCP (Windows Secure Copy) is a free and open-source SSH File
Transfer Protocol (SFTP), File Transfer Protocol (FTP), WebDAV,
Amazon S3, and secure copy protocol (SCP) client for Microsoft
Windows.
• Its main function is secure file transfer between a local computer and
a remote server.
• Beyond this, WinSCP offers basic file manager and file synchronization
functionality.
• For secure transfers, it uses the Secure Shell protocol (SSH) and
supports the SCP protocol in addition to SFTP.
43
PUTTY
• PuTTY is a free and open-source terminal emulator, serial console and
network file transfer application. It supports several network protocols,
including SCP, SSH, Telnet, rlogin, and raw socket connection. It can also
connect to a serial port. The name "PuTTY" has no official meaning.
• PuTTY was originally written for Microsoft Windows, but it has been ported
to various other operating systems. Official ports are available for some
Unix-like platforms, with work-in-progress ports to Classic Mac OS and
macOS, and unofficial ports have been contributed to platforms such as
Symbian, Windows Mobile and Windows Phone.
44