GATE CS - COMPUTER NETWORKS:Application Layer Protocols

Mastering application layer protocols concepts and implementation.

Application Layer Protocols

Application Layer provides network services to applications.

HTTP (Hypertext Transfer Protocol)

HTTP is protocol for web communication.

HTTP Methods

GET: Retrieve resource

POST: Submit data

PUT: Update resource

DELETE: Delete resource

HEAD: Get headers only

HTTP Versions

HTTP/1.0:

  • One request per connection
  • Non-persistent

HTTP/1.1:

  • Multiple requests per connection
  • Persistent connections
  • Pipelining

HTTP/2:

  • Multiplexing
  • Header compression
  • Server push

HTTP/3:

  • Uses QUIC (UDP-based)
  • Faster connection

HTTP Status Codes

2xx Success:

  • 200 OK
  • 201 Created
  • 204 No Content

3xx Redirection:

  • 301 Moved Permanently
  • 302 Found
  • 304 Not Modified

4xx Client Error:

  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found

5xx Server Error:

  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable

DNS (Domain Name System)

DNS translates domain names to IP addresses.

DNS Hierarchy

Root Domain: .

Top-Level Domains: .com, .org, .edu

Second-Level Domains: example.com

Subdomains: www.example.com

DNS Records

A Record: IPv4 address

AAAA Record: IPv6 address

CNAME Record: Canonical name

MX Record: Mail exchange

NS Record: Name server

DNS Query Types

Recursive Query: Server resolves completely

Iterative Query: Server returns referral

FTP (File Transfer Protocol)

FTP transfers files.

FTP Modes

Active Mode:

  • Client connects to server port 21
  • Server connects to client for data

Passive Mode:

  • Client connects to server port 21
  • Client connects to server for data

FTP Commands

Commands:

  • USER: Username
  • PASS: Password
  • LIST: List files
  • RETR: Retrieve file
  • STOR: Store file
  • QUIT: Quit

SMTP (Simple Mail Transfer Protocol)

SMTP sends email.

Port: 25

Process:

  1. Client connects to server
  2. HELO/EHLO
  3. MAIL FROM
  4. RCPT TO
  5. DATA
  6. Message
  7. QUIT

POP3 and IMAP

POP3 (Post Office Protocol):

  • Download emails
  • Port 110
  • Emails stored locally

IMAP (Internet Message Access Protocol):

  • Access emails on server
  • Port 143
  • Emails stay on server

GATE CS Important Points

  1. HTTP: Methods, versions, status codes
  2. DNS: Hierarchy, record types, query types
  3. FTP: Modes, commands
  4. SMTP: Email sending process
  5. Port Numbers: Know common ports

Practice Tips

  1. HTTP: Understand methods and status codes
  2. DNS: Know hierarchy and record types
  3. FTP: Understand active vs passive mode
  4. Email Protocols: SMTP, POP3, IMAP
  5. Previous Year Questions: Solve GATE application layer questions