KEMBAR78
Application Layer | PDF | File Transfer Protocol | World Wide Web
0% found this document useful (0 votes)
5 views35 pages

Application Layer

The document outlines the Application Layer of computer networks, detailing the roles of client and server processes, message types, and protocols such as HTTP, SMTP, and DNS. It explains the client/server and peer-to-peer models, the structure of domain names, and the differences between HTTP and HTTPS. Additionally, it covers email services, file transfer protocols like FTP and TFTP, and the importance of security in network communications.

Uploaded by

valadevang071
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)
5 views35 pages

Application Layer

The document outlines the Application Layer of computer networks, detailing the roles of client and server processes, message types, and protocols such as HTTP, SMTP, and DNS. It explains the client/server and peer-to-peer models, the structure of domain names, and the differences between HTTP and HTTPS. Additionally, it covers email services, file transfer protocols like FTP and TFTP, and the importance of security in network communications.

Uploaded by

valadevang071
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/ 35

Applications Layer : allows user to interface with the

network
Application Layer: Provides the interface between the
applications on either end of the network.
Process:
program running within a host

Client process:
initiates communication
Server process:
waits to be contacted

process sends/receives messages to/from its socket

identifier includes both IP address and port numbers


associated with process on host.
• Types of messages exchanged,
• e.g., request, response
• Message syntax:
• what fields in messages & how fields are delineated
• Message semantics
• meaning of information in fields
• Rules for when and how processes send & respond to messages
Public-domain protocols: Proprietary protocols:
♦ defined in RFCs ♦ e.g., Skype
♦ allows for interoperability
♦ e.g., HTTP, SMTP
Protocols and networks
Protocols

▪ DNS : Matches domain names with IP addresses


▪ HTTP/HTTPS : Used to transfer data between clients/servers using a
web browser
▪ SMTP & POP3 : used to send email messages from clients to servers
over the internet
▪ FTP/TFTP : allows the download/upload of files between a
client/server
▪ Telnet : allows users to login to a host from a remote location and take
control as if they were sitting at the machine (virtual connection)
▪ DHCP : assigns IP addresses, subnet masks, default gateways, DNS
servers, etc. To users as they login the network
Application layer software
There are two types
▪ Applications: Provide the human (user) interface. Relies on lower layers to
complete the communication process.
▪ Services: Establish an interface to the network where protocols provide the
rules and formats that govern how data is treated..

How data requests occur & are filled


❑ Client/server model
Advantages:
Centralized administration
Security is easier to enforce
❑ Peer-to-peer networking and applications
Client/Server Model
⮚ Client
device requesting information (initiates the data exchange) Can also UPLOAD data to
the servers
⮚ Server : device responding to the request
How does it handle multiple request from multiple users and keep everything in order?
Relies on support from the lower layer functions to distinguish between services and
conversations.
Server relies on a service called a server daemon – runs in the background and ‘listens’
for requests for that service. It can then exchange messages as appropriate & send
requested data.
⮚ Examples:
E-mail Client on an employee computer issues a request to the e-mail server for any
unread e-mail. The server responds by sending the e-mail to the client.
Conversations can originate with either party.
Peer-to-Peer (P2P) Network Model

▪ Two or more computers are connected and are able to share resources
without having a dedicated server
▪ Every end device can function as a client or server on a ‘per request’
basis
▪ Resources are decentralized (information can be located anywhere)
▪ Difficult to enforce security and policies
▪ User accounts and access rights have to be set individually on each peer
device
Common Port Numbers
❑ TCP
FTP – 20-21
Telnet – 23
SMTP – 25
DNS – 53 (Both TCP & UDP)
HTTP – 80
❑ UDP
DHCP – 67 & 68
POP – 110
Domain Name System (DNS)
⮚ Each terminal in network has an unique IP address and a name (name
space).
⮚ A name space that maps each address to a unique name can be organized
in two ways: flat or hierarchical
⮚ In a flat name space, a name is assigned to an address. A name in this
space is a sequence of characters without structure.
⮚ In a hierarchical name space, each name is made of several parts.

An example given below in which TCP/IP uses a DNS client and a DNS server
to map a name to an address. A user wants to use a file transfer client to access
the corresponding file transfer server running on a remote host. The user
knows only the file transfer server name, such as afilesource.com. However, the
TCP/IP suite needs the IP address of the file transfer server to make the
connection. The following six steps map the host name to an IP address:
▪ The user passes the host name to the file transfer client.
▪ The file transfer client passes the host name to the DNS client.
▪ 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.
▪ The DNS server responds with the IP address of the desired file transfer
server.
▪ The DNS server passes the IP address to the file transfer client.
▪ The file transfer client now uses the received IP address to access the file
transfer Server.
⮚DNS is used for designing hierarchical name space
Example of hierarchical name space: www.staffs.ac.uk,
www.fcet.staffs.ac.uk,
gawains.staffs.ac.uk, blackboard.staffs.ac.uk
⮚In this design the names are defined in an inverted-tree
structure with the root at the top. The tree can have only 128
levels: level 0 (root) to level 127
Domain Name and Label
Domain Name

▪ 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 (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.
▪ If a label is terminated by a null string, it is called a fully qualified
domain name (FQDN).
DNS Server
Stores domain name space information within its domain/subdomain.
DSN Services and Protocol

DNS Servers resolve names to IP addresses. It would be difficult to remember


the IP address of every website we like to visit, but we can remember names.
World Wide Web
❑The Web is a repository of information in which the documents, called
web pages, are distributed all over the world and related documents are
linked together.
❑The WWW 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. Each site holds
one or more web pages. Each web page, however, can contain some
links to other web pages in the same or other sites
• Web Client (Browser):
Each browser usually consists of three parts: a controller, client
protocols, and interpreters. The controller receives input from the
keyboard or the mouse and uses the client programs to access the
document. After the document has been accessed, the controller uses
one of the interpreters(HTML, Java, or JavaScript) to display the
document on the screen. The client protocol can be one of the protocols
such as HTTP or FTP.
• Web Server
The web page is stored at the server. Each time a request arrives, the
corresponding document is sent to the client.
• Web Documents
The documents in the WWW can be grouped into three broad
categories:
–Static
–Dynamic
–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. In other words, the contents of the file
are determined when the file is created, not when it is used.
❑Dynamic Documents
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. A very simple example of a dynamic document is the
retrieval of the time and date from a server.
❑Active Documents
�For many applications, a program or a script needs to be run at
the client site. These are called active documents. For example,
suppose a program that creates animated graphics on the screen
or a program that interacts with the user. When a browser
requests an active document, the server sends a copy of the
document or a script. The document is then run at the client
(browser) site.

MIT ADT University SOE Department of Computer


Science and Engineering 23
Computer Networks
HyperText Transfer Protocol (HTTP)
▪ The Hyper Text 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.
▪ HTTP uses the services of TCP. This means that, before any transaction
between the client and the server can take place, a connection need s to be
established between them. After the transaction, the connection should be
terminated.
WWW Service and HTTP
Steps:
1. URL is typed in the address bar.
2. Browser checks with DNS server to convert it to an IP address
3. Connects to the server requested
4. Using HTTP or HTTPS protocol requirements, the browser sends a GET
request to the server to ask for the desired html document (usually index.html)
5. The server sends the HTML code for the web page to the browser.
6. The browser interprets the HTML code and formats the page to fit the browser
window.
Parameter HTTP HTTPS
It is hypertext transfer It is hypertext transfer
Protocol
protocol. protocol with secure.
It is designed to prevent
It is less secure as the data
hackers from accessing
Security can be vulnerable to
critical information. It is secure
hackers.
against such attacks.
Port It uses port 80 by default It was use port 443 by default.
Starts with HTTP URLs begin with http:// HTTPs URLs begin with https://
If the website needs to
It’s a good fit for websites collect the private
Used for designed for information information such as credit
consumption like blogs. card number, then it is a
more secure protocol.
HTTPS scrambles the data
HTTP does not scramble the before transmission. At the
data to be transmitted. That’s receiver end, it descrambles
Scrambling why there is a higher chance to recover the original data.
that transmitted information is Therefore, the transmitted
available to hackers. information is secure which
MIT ADT University SOE Department of Computer
Science and Engineering
Computer Networks
can’t be hacked. 26
Parameter HTTP HTTPS
HTTPS does not have any
separate protocol. It
Protocol It operates at TCP/IP level. operates using HTTP but
uses encrypted TLS/SSL
connection.
HTTP website do not need HTTPS requires SSL
Domain Name Validation
SSL. certificate.
HTTP website doesn’t use HTTPS websites use data
Data encryption
encryption. encryption.
HTTP does not improve HTTPS helps to improve
Search Ranking
search rankings. search ranking.
Speed Fast Slower than HTTP
It Is highly secure as the
Vulnerability Vulnerable to hackers data is encrypted before it
is seen across a network.
MIT ADT University SOE Department of Computer
Science and Engineering 27
Computer Networks
WWW Service and HTTP

HTTP/HTTPS are some of the MOST used application protocols!


E-mail services and SMTP/POP protocols
▪ E-mail is the most popular network service.
▪ E-mail client (when people compose e-mail) is called Mail User Agent (MUA)
▪ MUA allows messages to be sent/retrieved to and from your mailbox
▪ Requires several applications and services POP or POP3 – deliver email from
server to client (incoming messages) SMTP – handles outbound messages from
clients
E-mail services and SMTP/POP protocols
What do servers require?
1. Must be running SMTP!
2. Also operates
a. Mail Transfer Agent (MTA) – used to forward email
▪ Receives email from the clients MUA
▪ Uses SMTP to route email between SERVERS!
▪ Passes email to the MDA for final delivery
b. Mail Delivery Agent (MDA) – receives messages from MUA or
from the MTA on another server
3. For two e-mail servers to talk – MUST run SMTP and MTA in order
to transfer mail between the 2 servers!
E-mail services and SMTP/POP protocols
FTP/TFTP
▪ Commonly used application layer protocol
▪ Allows for the transfer of files between clients/servers.
▪ Requires 2 connections to the server
1. Commandes – uses TCP port 21
2. Actual data – uses TCP port 20

Both the File Transfer Protocol (FTP) and the Trivial File Transfer Protocol
(TFTP) are used to transfer files between systems. FTP is a widely used protocol
that allows the remote user to navigate the server's file structure and upload and
download files. TFTP is a simplified alternative to FTP that provides no
authentication and is most often used to transfer configurations to and from
network devices.
 FTP is used for copying files from one host to another host
location. FTP works on Port 20 and 21. Port 20 is used for data
and Port 21 is used for connection control.
 TFTP is lighter than FTP and is used when a file transfer
functionality is needed without FTP features. It works on Port 69
and follows the UDP protocol.

33
Key FTP TFTP

Stands For FTP stands for File Transfer Protocol. TFTP stands for Trivial File
Transfer Protocol.

Software Size FTP software is heavier than TFTP. TFTP is lightweight.

Ports FTP works on ports 20 and 21. TFTP works on port 69.

Protocol used FTP is based on TCP. TFTP is based on UDP.

Complexity FTP is more complex than TFTP. TFTP is less complex than FTP.

Commands FTP has lots of commands or messages. TFTP has only five messages.

Authentication Authentication is must for FTP. Authentication is not required


in case of TFTP.
Key FTP TFTP 34
Thank You

MIT ADT University SOE Department of Computer Science and Engineering Computer Networks 35

You might also like