› Module 7: The Application Layer › 7.1 Client-Server vs Peer-to-Peer (P2P) Architecture
M O D U L E

Module 7: The Application Layer

High-level protocols: Client-Server vs P2P, DNS resolution, HTTP/HTTPS, and email architectures

7.1 Client-Server vs Peer-to-Peer (P2P) Architecture

Network applications generally follow either a centralized Client-Server topology or a decentralized Peer-to-Peer (P2P) paradigm.

Figure 7.1: Client-Server Architecture vs Peer-to-Peer (P2P) Network Client-Server Architecture SERVER Client Client Client Client Single point of failure; simple administration Peer-to-Peer (P2P) Peer Peer Peer Peer Peer Distributed resources; highly resilient

Figure 7.1: Client-Server concentrates data centrally; Peer-to-Peer distributes load symmetrically across all participants.

7.2 DNS — The Domain Name System

The Domain Name System (DNS) is a global, hierarchical distributed database running on UDP port 53 that resolves human-readable domain names (e.g. www.google.com) into 32-bit or 128-bit IP addresses.

Figure 7.2: Step-by-Step Hierarchical DNS Resolution Process Client Web Browser 1. Query Recursive Resolver (ISP) Checks cache first 2. Root Server (13 clusters .) 3. TLD Server (.com, .org, .in) 4. Authoritative Server (example.com) 5. Returns IP

Figure 7.2: Recursive DNS resolution sequence querying Root, Top-Level Domain (TLD), and Authoritative servers.

7.3 HTTP and HTTPS (Hypertext Transfer Protocol)

HTTP is a stateless, application-level request-response protocol running over TCP port 80. HTTPS encapsulates HTTP inside TLS/SSL encryption running over TCP port 443.

Figure 7.3: HTTP Request-Response Interaction Cycle Web Browser (Client / User Agent) HTTP GET /index.html HTTP/1.1 HTTP/1.1 200 OK (HTML/CSS Body) Web Server (Nginx / Apache / Node) Common Status Codes: 200 OK • 301 Moved Permanently • 400 Bad Request • 404 Not Found • 500 Internal Server Error

Figure 7.3: The standard HTTP stateless client-server request and response sequence.

7.4 Email Protocols (SMTP, POP3, IMAP), FTP, and DHCP

Core infrastructure protocols powering everyday Internet operations:

  • SMTP (Simple Mail Transfer Protocol - Port 25): Push protocol used by email clients to send mail to mail servers, and between MTAs.
  • POP3 (Post Office Protocol 3 - Port 110) & IMAP (Port 143): Pull protocols used by users to retrieve mail. POP3 downloads and erases from server; IMAP synchronizes folders across multiple client devices.
  • FTP (File Transfer Protocol - Ports 20 & 21): Uses two separate connections: Port 21 for Control commands and Port 20 for raw Data transfer.
  • DHCP (Dynamic Host Configuration Protocol - Ports 67 & 68): Automatically leases IP addresses and subnet masks to joining devices via the 4-step DORA process (Discover, Offer, Request, Acknowledge).
MODULE COMPREHENSIVE QUIZ

Module 7 Final Quiz

Test your understanding across all 4 topics of this module with interview-grade questions, tricky edge cases, and code output predictions.

Take Module 7 Final Quiz →
Yukti Mascot