Unit V Application Layer Protocols CN
Unit V Application Layer Protocols CN
In the Domain Name System (DNS) hierarchy, root-level servers, top-level domain (TLD)
servers, and authoritative name servers each play distinct roles in resolving domain names to
IP addresses. Here’s the difference between them:
1. Root-Level Server
• Function: TLD servers are responsible for handling queries for domain names under a
specific TLD.
• Role: After a root server, the resolver contacts a TLD server.
• What it knows: It directs the query to the authoritative server for a specific domain.
• Example: For www.example.com, the .com TLD server will return the address of the
authoritative server for example.com.
• Function: These servers hold the actual DNS records (A, AAAA, MX, etc.) for
domain names.
• Role: Final step in the DNS resolution. They provide the actual IP address of the
requested domain.
• What it knows: Exact mappings of names to IPs.
• Example: The authoritative server for example.com will answer with the IP address of
www.example.com.
Working of DNS:
The Domain Name System (DNS) is like the phonebook of the internet — it translates human-
readable domain names (like www.google.com) into IP addresses (like 142.250.182.4) that
computers use to identify each other.
• First, the browser checks its internal DNS cache to see if it already knows the IP
address for www.example.com.
o If found → uses it directly.
o If not → proceeds to the next step.
3. Recursive DNS Resolver (usually from ISP or a public resolver like Google)
• This resolver takes charge of finding the IP address. It performs the following steps:
• The resolver asks a root DNS server, “Where can I find .com domains?”
• The root server responds with the IP of the TLD server responsible for .com.
• The resolver then queries the .com TLD server and asks, “Where is example.com?”
• The TLD server responds with the IP of the authoritative DNS server for
example.com.
6. Contact Authoritative DNS Server
• The IP address is cached at multiple levels (browser, OS, resolver) to speed up future
requests.
The World Wide Web is a system of interlinked hypertext documents accessed via the
Internet using a web browser.
Features of WWW:
Components:
1. Web Pages – Built using HTML, often styled with CSS and interactive via JavaScript.
2. Web Servers – Computers that store and serve web content.
3. Web Browsers – Software like Chrome, Firefox, Safari that retrieve and display web
content.
Example:
HTTP is the protocol (set of rules) used by the Web to request and deliver web content
(HTML, images, videos, etc.) between a client (browser) and a server.
How It Works:
HTTPS:
Method Purpose
Concept Role
Think of WWW as the library, and HTTP as the librarian who fetches books for you.
SMTP:
• Simple Mail Transfer Protocol is used to send mails over the internet.
• SMTP uses TCP as the transport layer protocol. It handles the sending and receiving
of messages between email servers over a TCP/IP network.
• This protocol along with sending emails also provides the feature of notification for
incoming mails.
• When a sender sends an email then the sender’s mail client sends it to the sender’s
mail server and then it is sent to the receiver mail server through SMTP.
• SMTP commands are used to identify the sender and receiver email addresses along
with the message to be sent.
• Some of the SMTP commands are HELLO, MAIL FROM, RCPT TO, DATA, QUIT,
VERIFY, SIZE, etc. SMTP sends an error message if the mail is not delivered to the
receiver hence, reliable protocol.
• End-to-end delivery is used between organizations. In this method, the email is sent
directly from the sender’s SMTP client to the recipient’s SMTP server without passing
through intermediate servers.
• Store-and-forward is used within organizations that have TCP/IP and SMTP-based
networks. In this method, the email may pass through several intermediate servers
(Message Transfer Agents, or MTAs) before reaching the recipient.
POP3:
• It is an application layer protocol. It allows to access mail offline and thus, needs less
internet time. To access the message it has to be downloaded.
• POP allows only a single mailbox to be created on the mail server. POP does not
allow search facilities.
• Some of the POP commands are LOG IN, STAT, LIST, RETR, DELE, RSET, and
QUIT.
In each session:
1. The app connects to the server using your credentials (email + password).
2. It downloads the inbox emails (usually just the unread ones).
3. By default, POP3 deletes the emails from the server after download — unless the app
is set to "Leave a copy on the server".
So POP3 can work for multiple accounts, but only one mailbox (inbox) per account, and
without folder syncing (like Sent, Trash, etc.).
IMAP:
IMAP follows Client-server Architecture and is the most commonly used email protocol. It
is a combination of client and server process running on other computers that are connected
through a network.
The following steps are taken for the working of the IMAP :
• Email client Gmail establishes a connection with Gmail’s SMTP server.
• By approving the sender’s and recipient’s email addresses, the SMTP server
verifies (authenticates) that the email can be sent.
• The email is sent to the Outlook SMTP server by Gmail’s SMTP server.
• The recipient’s email address is authenticated by the Outlook SMTP server.
• IMAP or POP3 is used by the Outlook SMTP server to deliver the email to the
Outlook email client.
Architecture of IMAP:
The Internet Message Access Protocol (IMAP) protocol is a client-server model that allows
users to access and view email messages stored on remote servers.
• IMAP clients: An IMAP client is an email application or software that users use to
communicate with their email accounts. Examples include Microsoft Outlook,
Mozilla Thunderbird, Apple Mail, and mobile email applications. The client
communicates with the server to receive, manage, and send email messages.
• IMAP Server: The IMAP server manages email messages and manages user
mailboxes. It responds to requests from IMAP clients, and provides access to email
folders and messages.
The server stores emails in a structured format, usually organized in user-defined
folders or mailboxes. Common IMAP server software includes Dovecot, Courier
IMAP, Cyrus IMAP, and Microsoft Exchange Server.
• Network Protocols: It works over TCP/IP (Transmission Control Protocol/Internet
Protocol) networks, and allows an client to connect to a server over the Internet or
local area networks.