0% found this document useful (0 votes)
16 views4 pages

Application Layer Protocols Overview

Module 4 covers the Application Layer, detailing the Client-Server and Peer-to-Peer paradigms, along with various application layer protocols like DNS, FTP, HTTP, and SMTP. It explains how these protocols function, their communication methods (TCP vs. UDP), and key features such as statelessness in HTTP and the secure nature of SMTP. The module also discusses DHCP's role in network configuration and the security concerns associated with protocols like TELNET.
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)
16 views4 pages

Application Layer Protocols Overview

Module 4 covers the Application Layer, detailing the Client-Server and Peer-to-Peer paradigms, along with various application layer protocols like DNS, FTP, HTTP, and SMTP. It explains how these protocols function, their communication methods (TCP vs. UDP), and key features such as statelessness in HTTP and the secure nature of SMTP. The module also discusses DHCP's role in network configuration and the security concerns associated with protocols like TELNET.
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

Module 4: Application Layer Study Notes

1. Client-Server Paradigm

This is the most common paradigm, where a powerful, always-on server provides services to many
client processes that initiate requests.

 Server: A process running on a host that waits for communication requests from clients.

 Client: A process that initiates communication with a server to request a service.

 Communication using TCP:

o This is the standard for connection-oriented services.

o It provides a reliable, in-order byte stream.

o Used by protocols like HTTP, FTP, SMTP, and TELNET.

o The server must be running before the client starts.

o Server Process:

1. Creates a TCP socket.

2. Binds the socket to a well-known port.

3. Calls listen() to wait for a connection request.

4. Calls accept() to block and wait, creating a new socket for the connection
when a client connects.

o Client Process:

1. Creates a TCP socket.

2. Calls connect() to establish a connection with the server.

 Communication using UDP:

o This is used for connectionless services.

o It is an unreliable service that sends independent packets called datagrams.

o Used by protocols like DNS, TFTP, and DHCP.

o Server Process:

1. Creates a UDP socket.

2. Binds the socket to a well-known port.

3. Blocks on recvfrom() to wait for a client datagram.

o Client Process:

1. Creates a UDP socket.

2. Uses sendto() to send a datagram to the server.


2. Peer-to-Peer (P2P) Paradigm

 In a P2P paradigm, there is no always-on server.

 Pairs of hosts, called peers, communicate directly with each other.

 Peers are not always on and may have dynamic IP addresses.

 This model is scalable and cost-effective (doesn't require a large server infrastructure).

 It is commonly used for file distribution and sharing (e.g., BitTorrent).

3. Application Layer Protocols

3.1 DNS (Domain Name System)


 DNS is a distributed database that translates hostnames (like [Link]) into IP
addresses (like [Link]).

 It uses a hierarchical system of name servers:

o Root Servers: At the top of the hierarchy.

o Top-Level Domain (TLD) Servers: Manage domains like .com, .org, .edu, and country-
level domains like .in.

o Authoritative Servers: Hold the actual DNS records for specific domains (e.g., the
DNS servers for [Link]).

o Local Name Servers: Your ISP or organization's server, which receives your initial
request and performs the lookup.

 DNS uses UDP port 53 for queries.

3.2 FTP (File Transfer Protocol)

 FTP is a protocol for transferring files between a client and a server.

 It uses TCP for reliable service.

 Key Feature: FTP uses two separate TCP connections:

1. Control Connection (Port 21): Used to send commands (like LIST, RETR, STOR) and
receive responses. This connection stays open for the entire session.

2. Data Connection (Port 20): Used to actually transfer the file. A new data connection
is created for each file transfer.

 It requires user authentication (username and password).

3.3 TFTP (Trivial File Transfer Protocol)

 A simplified version of FTP.

 It uses UDP, making it unreliable and connectionless.

 It does not have authentication.


 Because it's simple and lightweight, it's often used for booting diskless workstations or
transferring configuration files to network devices.

3.4 HTTP (Hypertext Transfer Protocol)

 The protocol used to access the World Wide Web (WWW).

 It follows a client-server model where the client (browser) requests resources from a server
(web server).

 It uses TCP port 80.

 Key Features:

o Stateless: The server does not keep any state information about past requests from a
client.

o Persistent vs. Non-Persistent:

 Non-Persistent: A separate TCP connection is created for every object (e.g.,


one for the HTML file, one for each image). This is slow.

 Persistent: The same TCP connection is reused to download multiple objects,


which is much more efficient.

 HTTP messages are in plain text and include:

o Request Messages: Use methods like GET (to fetch a page) and POST (to submit form
data).

o Response Messages: Contain a status code (e.g., 200 OK, 404 Not Found) and the
requested resource.

3.5 SMTP (Simple Mail Transfer Protocol)

 The primary protocol for sending (pushing) email from a mail client to a mail server, and
between mail servers.

 It uses TCP port 25 for reliable transfer.

 SMTP is a push protocol; it only sends, it cannot be used to retrieve email from a server.

3.6 POP (Post Office Protocol)

 A protocol used by a mail client to retrieve (pull) email from a mail server.

 Uses TCP port 110.

 Key Feature: POP is very simple and typically works in an "offline" model. It connects,
downloads all emails to the local computer, and then deletes them from the server.

 It is "stateless" across sessions, meaning the server doesn't keep track of what has been
downloaded.

3.7 IMAP (Internet Message Access Protocol)

 A more modern protocol for retrieving email.


 Key Feature: IMAP is more complex and allows users to manage email directly on the
server.

 Messages can be read, organized into folders, and searched, all while remaining on the
server.

 This is ideal for accessing mail from multiple devices (e.g., phone and laptop) as the state
(read, unread, deleted) is synchronized.

3.8 MIME (Multipurpose Internet Mail Extensions)

 MIME is not a protocol but a standard for extending the format of email messages.

 SMTP can only send simple 7-bit ASCII text.

 MIME adds headers to the email to specify the type of content, allowing email to include:

o Text in character sets other than ASCII.

o Attachments (e.g., images, audio, video, documents).

o Messages with multiple parts (e.g., a plain text and HTML version).

3.9 DHCP (Dynamic Host Configuration Protocol)

 Note: This protocol was also covered in Module 3. It operates at the Application Layer.

 DHCP automatically assigns IP addresses and other network configuration parameters (like
subnet mask, default gateway, and DNS servers) to hosts as they join the network.

 It uses UDP and follows a four-step process (D-O-R-A):

1. Discover: A client broadcasts a DHCPDISCOVER message to find a DHCP server.

2. Offer: DHCP server(s) respond with a DHCPOFFER message, offering an IP address


and lease time.

3. Request: The client broadcasts a DHCPREQUEST message to accept one of the offers.

4. Acknowledge: The chosen server sends a DHCPACK message to confirm the lease.

3.10 TELNET (TErminaL NETwork)

 A protocol used for remote login to a host over the network.

 It allows a user to act as if they are at a terminal directly connected to the remote machine.

 It uses TCP for a reliable connection.

 Major Drawback: TELNET is insecure as it transmits all data, including usernames and
passwords, in clear text. It has been largely replaced by SSH (Secure Shell).

You might also like