[NW] 7th : Application Layer

seunghyunยท2023๋…„ 8์›” 7์ผ
0

๐Ÿ’ป

๋ชฉ๋ก ๋ณด๊ธฐ
9/16

Introduction

OSI 7 Layer ๐Ÿ›œ

OSI 7 ๊ณ„์ธต์€ ๋„คํŠธ์›Œํฌ ํ†ต์‹ ์ด ์ผ์–ด๋‚˜๋Š” ๊ณผ์ •์„ 7๋‹จ๊ณ„๋กœ ๋‚˜๋ˆˆ ๊ตญ์ œ ํ‘œ์ค€ํ™” ๊ธฐ๊ตฌ(ISO)์—์„œ ์ •์˜ํ•œ ๋„คํŠธ์›Œํฌ ํ‘œ์ค€ ๋ชจ๋ธ

์•„๋ž˜ ๊ทธ๋ฆผ์—์„œ ์•„๋ž˜๋ถ€ํ„ฐ 1๊ณ„์ธต(๋ฌผ๋ฆฌ ๊ณ„์ธต) ~ 7๊ณ„์ธต(์‘์šฉ ๊ณ„์ธต)์œผ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ๋‹ค. ์ถ”์ƒํ™” ๊ฐœ๋…์ด ๋ถ™์€.

๋˜ ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด ๊ฐ ๊ณ„์ธต์„ ์ง€๋‚  ๋•Œ๋งˆ๋‹ค ๊ฐ ๊ณ„์ธต์—์„œ Header๊ฐ€ ๋ถ™๊ฒŒ๋˜๊ณ  ์ˆ˜์‹ ์ธก์€ ์—ญ์ˆœ์œผ๋กœ ํ—ค๋”๋ฅผ ๋ถ„์„ํ•˜๊ฒŒ ๋œ๋‹ค.

Application Layer

์ตœ์ข… ๋ชฉ์ ์ง€๋กœ์„œ HTTP, FTP, SMTP, POP3, IMAP, Telnet ๋“ฑ๊ณผ ๊ฐ™์€ ํ”„๋กœํ† ์ฝœ์ด ์žˆ๋‹ค.

ํ•ด๋‹น ํ†ต์‹  ํŒจํ‚ท๋“ค์€ ๋ฐฉ๊ธˆ ๋‚˜์—ดํ•œ ํ”„๋กœํ† ์ฝœ์— ์˜ํ•ด ๋ชจ๋‘ ์ฒ˜๋ฆฌ๋˜๋ฉฐ ์šฐ๋ฆฌ๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” ๋ธŒ๋ผ์šฐ์ €๋‚˜, ๋ฉ”์ผ ํ”„๋กœ๊ทธ๋žจ์€ ํ”„๋กœํ† ์ฝœ์„

๋ณด๋‹ค ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•˜๊ฒŒ ํ•ด์ฃผ๋Š” ์‘์šฉํ”„๋กœ๊ทธ๋žจ์ด๋‹ค. ํ•œ๋งˆ๋””๋กœ ๋ชจ๋“  ํ†ต์‹ ์˜ ์–‘ ๋๋‹จ์€ HTTP์™€ ๊ฐ™์€ ํ”„๋กœํ† ์ฝœ์ด์ง€ ์‘์šฉํ”„๋กœ๊ทธ๋žจ์ด ์•„๋‹ˆ๋‹ค.

์‘์šฉ ๊ณ„์ธต(Application layer)์€ ์‘์šฉ ํ”„๋กœ์„ธ์Šค์™€ ์ง์ ‘ ๊ด€๊ณ„ํ•˜์—ฌ ์ผ๋ฐ˜์ ์ธ ์‘์šฉ ์„œ๋น„์Šค๋ฅผ ์ˆ˜ํ–‰ํ•œ๋‹ค.

์ผ๋ฐ˜์ ์ธ ์‘์šฉ ์„œ๋น„์Šค๋Š” ๊ด€๋ จ๋œ ์‘์šฉ ํ”„๋กœ์„ธ์Šค๋“ค ์‚ฌ์ด์˜ ์ „ํ™˜์„ ์ œ๊ณตํ•œ๋‹ค.

์‘์šฉ ์„œ๋น„์Šค์˜ ์˜ˆ๋กœ, ๊ฐ€์ƒ ํ„ฐ๋ฏธ๋„(์˜ˆ๋ฅผ ๋“ค์–ด, ํ…”๋„ท), "Job transfer and Manipulation protocol" (JTM, ํ‘œ์ค€ ISO/IEC 8832) ๋“ฑ์ด ์žˆ๋‹ค.

๐Ÿ’ก ํ”„๋กœ์„ธ์Šค ์‚ฌ์ด์˜ ํ†ต์‹  (๋ฉ”์„ธ์ง€ ๊ตํ™˜) ์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ, ํ†ต์‹ ์„ ์œ„ํ•œ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ œ๊ณตํ•˜๊ธฐ ์œ„ํ•ด OS๊ฐ€ ์ œ๊ณตํ•˜๋Š” ์‹œ์Šคํ…œ ์ฝœ์˜ ์ง‘ํ•ฉ์ธ 'Socket API' ๋ฅผ ํ™œ์šฉํ•˜๊ณ  TCP (SOCK_STREAM), UDP (SOCK_DGRAM) ์„œ๋น„์Šค ๋ฅผ ํ™œ์šฉํ•œ๋‹ค.

โœ”๏ธ process: program running within a host

  • within same host, two processes communicate using inter-process communication (defined by OS)
  • processes in different hosts communicate by exchanging messages

โœ”๏ธ client process: process that initiates communication
โœ”๏ธ server process: process that waits to be contacted


Internet transport protocols services

TCP service

Client must contact server!

  • reliable transport between sending and receiving process
  • flow control: sender wonโ€™t overwhelm receiver
  • congestion control: throttle sender when network overloaded
  • connection-oriented: setup required between client and server processes
  • does not provide: timing, minimum throughput guarantee, security

UDP service

No Connection between client and server!

  • unreliable data transfer between sending and receiving process
  • does not provide: reliability, flow control, congestion control, timing, throughput guarantee, security, or connection setup.

HTTP

โœ”๏ธ hypertext transfer protocol

  • Webโ€™s application-layer protocol
  • client/server model:
    • client: browser that requests, receives, (using HTTP protocol) and โ€œdisplaysโ€ Web objects
    • server: Web server sends (using HTTP protocol) objects in response to requests

Response status codes

status code appears in 1st line in server-to-client response message.

  • 200 OK
    request succeeded, requested object later in this message
  • 301 Moved Permanently
    requested object moved, new location specified later in this message (in Location: field)
  • 400 Bad Request
    request msg not understood by server
  • 404 Not Found
    requested document not found on this server
  • 505 HTTP Version Not Supported

Cookies ๐Ÿช

Web sites and client browser use cookies to maintain some state between transactions

four components
1) cookie header line of HTTP response message
2) cookie header line in next HTTP request message
3) cookie file kept on userโ€™s host, managed by userโ€™s browser
4) back-end database at Web site

Web cashes (aka proxy servers)

Goal: satisfy client requests without involving origin server

Why Web caching?
โœ”๏ธ reduce response time for client request

  • cache is closer to client

โœ”๏ธ reduce traffic on an institutionโ€™s access link

โœ”๏ธ Internet is dense with caches

  • enables โ€œpoorโ€ content providers to more effectively deliver content


DNS

  • Domain Name System
  • ๋ถ„๋ฆฌ๋˜๊ณ  ๊ณ„์ธต์ ์ธ ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง„๋‹ค.

๐Ÿ”— Reference

์ž˜๋ชป๋œ ๋‚ด์šฉ์ด ์žˆ๋‹ค๋ฉด ๋Œ“๊ธ€๋กœ ์•Œ๋ ค์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค ๐Ÿ˜Š

0๊ฐœ์˜ ๋Œ“๊ธ€