본문 바로가기
프로그래밍/네트워크

[네트워크] 응용 계층 : Application layer

by 강민재02 2024. 10. 4.
728x90

Introduction


응용 계층(Application layer)은 프로토콜 스택 가장 위에 있는 계층으로, 네트워크를 사용하는 응용 프로그램 간 소통을 위해 제작되었다.

 

 

Network Structure


1. Client-Server Architecture

  • Server
    • Always-on host
    • Permanent IP address
    • Examples: Web servers, mail servers, DNS servers
  • Client
    • Dynamically connected
    • May have dynamic IP addresses
    • Communicate with servers
    • Examples: Web browsers, email clients
  • Pros : stability
  • Cons : scaling cost

2. Peer-to-Peer (P2P) Architecture

  • Features:
    • No dedicated servers
    • Direct communication between pairs of connected hosts (peers)
    • Self-scaling
  • Examples:
    • BitTorrent, early versions of Skype
  • Pros:
    • scaling cost
  • Cons:
    • stability
  • Challenges:
    • Security, performance, reliability

 

Application Layer Protocols


1. HTTP (Hypertext Transfer Protocol)

  • Purpose: Web objects transfer
  • Features:
    • Stateless protocol
    • Uses TCP on port 80 (HTTP) or 443 (HTTPS)
    • Methods: GET, POST, PUT, DELETE, etc.
    • Status codes (200 OK, 404 Not Found, etc.)
  • Challenges:
    • latency: persistent HTTP, non-persistent HTTP, proxy Server
    • stateless to stateful: session and cookies

2. SMTP (Simple Mail Transfer Protocol)

  • Purpose: Email transfer
  • Features:
    • Uses TCP on port 25
    • Push protocol
    • Three phases: handshaking, transfer, closure
  • Related Protocols:
    • POP3 (Post Office Protocol)
    • IMAP (Internet Message Access Protocol)
    • HTTP

3. DNS (Domain Name System)

  • Purpose: translate domain name to IP address
  • Features:
    • Name resolution
    • load balancing
  • Hierarchy Structure:
    • 1 : Root DNS servers
    • 2 : TLD(Top-level domain) servers (.com, .org, etc.)
    • 3 : Authoritative DNS servers
    • 4 : Local DNS servers
    • query methods : iterated query, recursive query

4. FTP (File Transfer Protocol)

  • Purpose: File transfer
  • Features:
    • Separate control and data connections
    • Authentication required
    • Supports binary and ASCII transfers

 

Conclusion


  • 응용 계층(Application layer)은 다른 네트워크 어플리케이션과 소통하기 위해 필요한 계층이다.
  • 응용 계층의 관점에서 네트워크 구조는 (1)서버-클라이언트 구조와 (2)P2P 구조가 있다.
  • HTTP, SMTP, DNS, FTP 등 공개된 프로토콜 외에도 다양한 프로토콜들이 존재한다.

 

Practice Questions


  1. DNS 서버의 계층 구조에 대해 설명하고, 왜 그러한 구조를 가지게 되었는지 설명하시오.
  2. 클라이언트-서버 구조와 P2P 구조 간의 차이점을 서술하시오.
  3. Proxy server가 무엇인지 설명하고 link를 증설하는 것보다 얼마나 효율적인지 서술하시오.
728x90