0% found this document useful (0 votes)
6 views12 pages

Unit 5 Application

The application layer is the topmost layer of the OSI model, facilitating user interaction with network services like file transfer, email, and web browsing through protocols such as HTTP, FTP, SMTP, and DNS. It prepares data for lower layers and ensures efficient communication between software applications. Key functions include network virtual terminal access, file management, email services, directory services, and web services.

Uploaded by

purabdon9
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)
6 views12 pages

Unit 5 Application

The application layer is the topmost layer of the OSI model, facilitating user interaction with network services like file transfer, email, and web browsing through protocols such as HTTP, FTP, SMTP, and DNS. It prepares data for lower layers and ensures efficient communication between software applications. Key functions include network virtual terminal access, file management, email services, directory services, and web services.

Uploaded by

purabdon9
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

Unit 5

Application Layer
 The application layer is the topmost layer of the OSI model and directly
interacts with end users. It provides network services such as file transfer,
email, web browsing, and remote access.
 This layer acts as an interface between user applications and the network.
Common protocols include HTTP, FTP, SMTP, and DNS. It ensures that
communication between different software applications is possible by
defining rules for data exchange.
 The application layer does not handle data transmission but prepares data
for lower layers. It enables users to access network resources easily and
efficiently, making it essential for everyday internet activities and
communication processes.

Functions of Application Layer


1. Network Virtual Terminal

Allows users to access remote systems by simulating a local terminal, enabling


communication and command execution over a network connection.

2. File Transfer, Access, and Management


Enables users to upload, download, modify, and manage files between systems,
ensuring efficient data sharing across different network environments.

3. Electronic Mail Services

Provides sending, receiving, and storing email messages using protocols,


enabling fast and reliable communication between users over interconnected
networks globally.

4. Directory Services

Maps domain names to IP addresses, helping users locate resources on


networks efficiently without remembering complex numerical addresses for
systems.

5. Web Services

Supports web-based communication using protocols, allowing users to access


websites, exchange data, and interact with online applications seamlessly and
efficiently.

Protocols of Application Layer


1. DNS (Domain Name Server)
 DNS is an application layer protocol that translates human-readable
domain names (like [Link]) into IP addresses (like
[Link]).
 It works like a phonebook of the internet, allowing users to access
websites without remembering numeric addresses. DNS uses a
distributed and hierarchical structure, including root servers, TLD servers,
and authoritative servers.
 It mainly operates over UDP port 53 for fast queries and TCP for large data
transfers. DNS improves user convenience, supports load balancing, and
enhances scalability of the internet.
The process of resolving a domain name involves several steps, such as

1. User Request: When you type a domain name into your web browser,
your computer sends a request to a DNS resolver, usually provided by
your Internet Service Provider (ISP).
2. DNS Resolver: The resolver checks its cache to see if it has the
corresponding IP address stored. If it does not, it initiates further queries.
3. Root DNS Server: If the resolver cannot find the IP in its cache, it queries
a root DNS server. This server knows where to direct requests for TLDs.
4. TLD Server: The root server responds with the IP address of the TLD server
associated with the requested domain.
5. Authoritative DNS Server: The resolver queries the authoritative DNS
server for the specific domain. This server holds the actual DNS records
and responds with the IP address.
6. Response: The resolver sends the IP address back to your computer,
allowing your browser to connect to the website’s server and retrieve
content.
7. Caching: To improve efficiency, your computer and the DNS resolver
cache the response for future requests. It reduces the time it takes to
resolve the same domain name again.

2. HTTP
HTTP (Hypertext Transfer Protocol) is an application layer protocol used for
communication between web clients (browsers) and servers. It follows a
request-response model where a client sends a request, and the server returns
a response.
HTTP is stateless, meaning each request is independent and does not store
previous interactions. It commonly uses port 80, while secure communication
uses HTTPS on port 443.
HTTP methods include GET, POST, PUT, and DELETE. It transfers data in formats
like HTML, JSON, and XML. HTTP enables loading web pages, APIs, and online
services, forming the foundation of data communication on the World Wide
Web.

How HTTP Works: Step-by-Step Process


Here’s how HTTP works when you visit a website:
1. Open Web Browser: First, you open your web browser and type a website
URL (e.g., [Link]).
2. DNS Lookup: Your browser asks a Domain Name System (DNS) server to find
out the IP address associated with that URL. Think of this as looking up the
phone number of the website.
3. Send HTTP Request: Once the browser has the website’s IP address, it sends
an HTTP request to the server. The request asks the server for the resources
needed to display the page (like text, images, and videos).
4. Server Response: The server processes your request and sends back an
HTTP response. This response contains the requested resources (like HTML,
CSS, JavaScript) needed to load the page.
5. Rendering the Web Page: Your browser receives the data from the server
and displays the webpage on your screen.
Understanding HTTP Request and Response

1. HTTP Request

An HTTP request is how your browser asks the server for something. It includes:
 HTTP Version: The version of HTTP (like HTTP/1.1 or HTTP/2) being used.
 URL:The specific address of the resource(e.g, htttps://[Link]/about).
 HTTP Method: The type of action being requested (e.g., GET to retrieve
information or POST to send data).
 HTTP Request Headers: Extra information about the request, like what kind
of browser you're using or what kind of content you’re expecting.
 HTTP Request Body: In some cases, the request will include a body that
contains data (e.g., when you submit a form).

2. HTTP Response
An HTTP response is the server’s answer to your request. It includes:
 HTTP Status Code: A number that tells you if the request was successful or
not (e.g., 200 OK means everything is fine, 404 Not Found means the
requested page doesn’t exist).
 Response Headers: Information about the response, like what kind of data is
being sent (e.g., Content-Type: text/html means it’s an HTML page).
 Response Body: The content that the server sends back (e.g., HTML code that
the browser will use to display the webpage).
*HTTPS
 HTTPS (Hypertext Transfer Protocol Secure) is a secure version of HTTP
used for safe communication over the internet. It uses SSL/TLS (Secure
Sockets Layer / Transport Layer Security) to encrypt data exchanged
between a user’s browser and a web server.
 This encryption prevents hackers from intercepting sensitive
information like passwords, credit card details, and personal data.
HTTPS ensures data integrity, authentication, and confidentiality.
 Websites using HTTPS display a padlock icon in the browser address
bar. It is widely used in online banking, e-commerce, and login pages,
making internet browsing safer and more trustworthy for users.
 Default port used by HTTPS: 443.
3. SMTP , POP3 , IMAP
(Protocols related to Email )
Email is an electronic communication system used to send messages over the
internet. It works using protocols like SMTP for sending and IMAP/POP3 for
receiving.
A user composes a message, which is sent to a mail server, routed to the
recipient’s server, and accessed through email clients like Gmail.
a) SMTP
SMTP (Simple Mail Transfer Protocol) is a standard protocol used for sending
emails across networks. It works between email clients and mail servers, and
also between different mail servers.

When a user sends an email using apps like Gmail, SMTP transfers the message
to the outgoing mail server, which forwards it to the recipient’s server. SMTP
uses ports 25 (secure) and follows a store-and-forward mechanism. It only
handles sending, not receiving emails.

For security, SMTP is often combined with TLS (Transport Layer Security) to
encrypt data and protect it from unauthorized access.

How Does SMTP Work:


SMTP (Simple Mail Transfer Protocol) is like a digital post office for sending
emails. Here’s how it works step-by-step:
 You Hit “Send”: When you write an email and click “send,” your email app
(like Gmail or Outlook) connects to an SMTP server (your email provider’s
“mail delivery person”).
 Checking the Sender: The SMTP server checks if you’re allowed to send
emails (like verifying your username/password).
 Finding the Recipient’s Mailbox: The server looks at the recipient’s email
address (e.g., friend@[Link]) and splits it into two parts:
o Username: “friend”
o Domain: “[Link]”
It then asks the internet’s “address book” (DNS) to find the correct
mail server for “[Link].”
 Delivering the Email: Your SMTP server sends the email to the recipient’s
mail server (like handing a letter to another post office). If their server is
busy, yours will try again later.
 Storing the Email: The recipient’s server stores the email in their inbox.
When they check their email, their app (using protocols like POP3 or IMAP)
fetches it.
Key Notes:
 SMTP only sends emails. Receiving uses other tools (like IMAP/POP3).
 If the email can’t be delivered (e.g., wrong address), you’ll get a “bounce
back” error.

b) POP3
POP3 (Post Office Protocol version 3) is an email retrieval protocol used to
download messages from a mail server to a user’s device. It typically works on
port 110 . When using apps like Outlook, POP3 downloads emails and often
deletes them from the server, allowing offline access. It is simple and suitable
for single-device use but lacks synchronization across multiple devices.

Unlike IMAP, POP3 does not maintain email status (read/unread) on the server.
It is widely used for basic email access where internet connectivity is limited or
inconsistent.

How Does POP3 Work:

POP3 (Post Office Protocol version 3) is like a digital mailbox for receiving emails.
It lets you download emails from a server to your device (like your computer or
phone). Here’s how it works step-by-step:
 You Open Your Email App: When you open your email app
(like Gmail or Outlook) and click “Check Email,” it connects to the POP3
server (your email provider’s “mail storage”).
 Logging In: Your email app sends your username and password to the POP3
server to prove you’re allowed to access the emails.
 Downloading Emails: Once logged in, the POP3 server sends all the emails
stored on it to your device. By default, POP3 downloads the emails and
removes them from the server (like taking letters out of a mailbox).
 Storing Emails Locally: The emails are saved on your device (computer,
phone, etc.). This means you can read them even without an internet
connection.
 Optional: Keeping Emails on the Server.
c) IMAP
IMAP (Internet Message Access Protocol) is an email retrieval protocol that
allows users to access and manage emails directly on the mail server. It works
on ports 143 .Unlike POP3, IMAP keeps emails on the server, enabling
synchronization across multiple devices.
When using apps like Gmail, users can read, delete, or organize emails, and
changes are reflected everywhere. It supports folders, search, and real-time
updates.
IMAP is ideal for users who check email from different devices, ensuring
consistent access and better email management without downloading
messages permanently to one device.
How Does IMAP Work:
IMAP (Internet Message Access Protocol) is like a cloud-based email system that
lets you access your emails from multiple devices (like your phone, laptop, or
tablet). Unlike POP3, which downloads emails to one device, IMAP keeps your
emails on the server and syncs them across all your devices. Here’s how it works
step-by-step:
 You Open Your Email App: When you open your email app
(like Gmail, Outlook, or Apple Mail) and click “Check Email,” it connects to
the IMAP server (your email provider’s “mail storage”).
 Logging In: Your email app sends your username and password to the IMAP
server to prove you’re allowed to access the emails.
 Syncing Emails: Instead of downloading all the emails to your device, IMAP
only syncs the email headers (subject, sender, date, etc.) or a preview of the
emails. This makes it faster to load your inbox.
 Reading and Organizing Emails: When you open an email, IMAP downloads it
from the server so you can read it. If you organize your emails (e.g., move
them to folders, mark them as read, or delete them), these changes are
synced back to the server. This means all your devices stay up-to-date.

You might also like