[ํ’€์Šคํƒ] OSI 7 Layer

2023. 4. 8. 17:10ใ†ComputerScience/FullStackProgramming

 

 

 

* OSI 7 Layer

  • ์ปดํ“จํ„ฐ ์†Œํ”„ํŠธ์›จ์–ด์™€ ํ•˜๋“œ์›จ์–ด๋ฅผ ํ†ต์‹  ๊ด€์ ์—์„œ ์ดํ•ดํ•˜๋Š” ๋ชจ๋ธ 

The Open Systems Interconnection model (OSI model) is
a conceptual model that characterizes and standardizes the communication functions of a telecommunication or computing system without regard to its underlying internal structure and technology.

Its goal is the interoperability of diverse communication systems with standard protocols.

The model partitions a communication system into SEVEN abstraction layers.

 

 

 

Communication between peer layers

  • ์œ„ ์•„๋ž˜ ๊ด€๊ณ„ - ์œ„์—์„œ ๋ฐ›์œผ๋ฉด ํ•  ์ผ์„ ํ•˜๊ณ , ์•„๋ž˜๋กœ ๋‚ด๋ฆฐ๋‹ค. 
  • ์˜๋ฏธ์žˆ๋Š” ์ผ์€ ๊ฐ™์€ ๊ณ„์ธต (peer) ๊ฐ„ ์ด๋ฃจ์–ด์ง„๋‹ค. 
  • ex) ๊ตฌ๊ธ€ ์›น์— ์ ‘์†ํ•  ๋•Œ, ์œ ์„ ์ด๋“  ๋ฌด์„ ์ด๋“  ์ด๋™ ํ†ต์‹ ์„ ํ•˜๋“  -> ์œ„์— ์žˆ๋Š” ์›น ๋ธŒ๋ผ์šฐ์ €๋Š” ์˜ํ–ฅ์„ ๋ฐ›์ง€ ์•Š๋Š”๋‹ค.

 

 

 

Data processing by two communicating devices is done as such:

The data to be transmitted is composed at the topmost layer of the transmitting device (layer N) into a protocol data unit (PDU). -> N ๋ ˆ์ด์–ด์—์„œ N-1 ๋ ˆ์ด์–ด๋กœ ๋ณด๋‚ด๋Š” ๋ฐ์ดํ„ฐ ์œ ๋‹›์„ PDU

The PDU is passed to layer N-1, where it is known as the service data unit (SDU).

At layer N-1 the SDU is concatenated with a header, a footer, or both, producing a layer N-1 PDU. It is then passed to layer N-2. 

The process continues until reaching the lowermost level, from which the data is transmitted to the receiving device.

At the receiving device the data is passed from the lowest to the highest layer as a series of SDUs while being successively stripped from each layer's header or footer, until reaching the topmost layer, where the last of the data is consumed.

 

 

 

https://tutledeveoper.wordpress.com/2017/11/02/osi-7-layer/

 

 

 

 

1. Physical (Layer 1)
: Transmission and reception of 
raw bit streams over a physical medium

  • ์œ ์„ ์ด์•ผ ๋ฌด์„ ์ด์•ผ ๋“ฑ๋“ฑ -> ๋ฌผ๋ฆฌ์ ์ธ ๋งค์ฒด๋ฅผ ๋‹ค๋ฃธ
  • ์ „๊ธฐ๊ณผ, ์†Œ์žฌ๊ณผ, ์ „์ž๊ณผ ๊ด€๋ จ layer -> 1๊ณ„์ธต์—์„œ 0๊ณผ 1์„ ๋ณด๋ƒ„ , ํ†ต์ƒ ํ•˜๋“œ์›จ์–ด๋กœ ๊ตฌํ˜„
  • ํ‘ธ๋ฆฌ์— ํŠธ๋žœ์Šคํผ, ์ •๋ณด๋ฅผ ๋ณด๋‚ด๋Š” ๊ฒƒ์— ๋Œ€ํ•œ ์†๋„๋ฅผ ๊ณ ๋ ค
  • layer 1๊ณผ layer 2๋ฅผ ์ฃผ๋กœ ๋ฌถ๋Š”๋‹ค (๋ฐ€๊ฒฐํ•ฉ) 
  • ํ•˜๋“œ์›จ์–ด ๋ถ€ํ’ˆ์ด๊ธฐ์—, ํ•˜๋‚˜๋กœ ํ•ฉ์ณ์ ธ์„œ ๋งŒ๋“ค์–ด์ง„๋‹ค.

 

2. Datalink (Layer 2)
Reliable transmission of data frames between two adjacent nodes connected by a physical layer

  • ๋ฌด์„ ๋žœ ์†๋„๊ฐ€ ๋Šฆ์–ด์ง„ ๊ฒƒ? ์†์‹ค์ด ๋ฐœ์ƒํ•œ ๊ฒƒ
  • ์‚ฌ๋žŒ์ด ์ง€๋‚˜๊ฐ€๋ฉฐ ๊ฐ„์„ญ์ด ๋ฐœ์ƒํ•˜๋ฉด, ์—๋Ÿฌ๊ฐ€ ๋‚  ์ˆ˜ ์žˆ๋‹ค. 
  • 0๊ณผ 1์„ ์ž˜๋ชป ๋ณด๋ƒˆ์„ ๋•Œ, ์—๋Ÿฌ๋ฅผ ๊ฒ€์ถœํ•˜๊ณ  ๋ณต๊ตฌํ•˜๋Š” ๊ณ„์ธต 
  • Flow control ์—ญํ•  - ๊ทธ๋งŒ ๋ณด๋‚ด, ๋” ๋ณด๋‚ด๋„ ๋ผ ๋“ฑ๋“ฑ ์†๋„ ์กฐ์ ˆํ•˜๋Š” ๊ฒƒ

 

3. Network (Layer 3)
: Structuring and managing a multi-node network, including addressing, routing and traffic control

  • ๋‘ ๊ธฐ๊ธฐ๋ฅผ ์—ฐ๊ฒฐํ•˜๋Š” ๊ฒƒ -> ์ „์ž๊ณผ ๊ณผ๋ชฉ, ์ปค๋ฎค๋‹ˆ์ผ€์ด์…˜
  • 3๋Œ€ ์ด์ƒ -> ๋„คํŠธ์›Œํฌ (ABC ๋ˆ„๊ตฌ์—๊ฒŒ ๋ณด๋‚ด์•ผํ•˜๋Š”์ง€ logic ๊ณ ๋ฏผ)
  • ๋ผ์šฐํ„ฐ (๋ฃจํŠธ -> ๊ธธ) 
    • ์–ด๋Š ๊ธธ๋กœ ๋ณด๋‚ผ ์ง€ ํŒ๋‹จ์ด ํ•„์š”ํ•˜๋‹ค.
    • ์—ฌ๊ธฐ๋ถ€ํ„ฐ ์†Œํ”„ํŠธ์›จ์–ด์˜ ์˜์—ญ 
    • ์œ„ 3 layer ๋กœ ๊ตฌ์„ฑ๋œ ์ดˆ๊ธฐ์˜ ์ธํ„ฐ๋„ท -> ์ด ์…‹์€ ์ˆ˜์—…์—์„œ ๋น ์ง„๋‹ค.

 

4. Transport (Layer 4)
Reliable transmission of data segments between remote application processes,
including segmentation, acknowledgement and multiplexing

  • ์ด ์ˆ˜์—…์€ 4๊ณ„์ธต ๋ถ€ํ„ฐ ์Œ“์•„์˜ฌ๋ฆฐ๋‹ค. 
  • 3 ~ 4๊ณ„์ธต์€ ์šด์˜์ฒด์ œ์—์„œ ๊ตฌํ˜„
  • ๋ณด๋‚ธ ์ •๋ณด๊ฐ€ ์—๋Ÿฌ๊ฐ€ ๋‚œ๋‹ค๋ฉด? or 3๊ณ„์ธต์—์„œ ์—๋Ÿฌ๊ฐ€ ๋‚œ๋‹ค๋ฉด?

  • 2๊ณ„์ธต์ด ๊ผญ ์—๋Ÿฌ ๊ฒ€์ถœ์„ ํ•ด์•ผํ•˜๋Š” ๊ฑด ์•„๋‹ˆ๋‹ค. 
    ex) ์ดˆ๊ณ ์† ์ธํ„ฐ๋„ท์€ 2๊ณ„์ธต์—์„œ ์—๋Ÿฌ ๊ฒ€์ถœ X
  • ๋ฌด์„ ์˜ ๊ฒฝ์šฐ, ์ตœ๋Œ€ํ•œ ๋ณต๊ตฌํ•˜์ง€๋งŒ ์•ˆ ๋˜๋ฉด ๋ฒ„๋ฆผ 
  • ๋ฒ„๊ทธ๊ฐ€ ์žˆ๊ฑฐ๋‚˜, ํŠธ๋ž˜ํ”ฝ์ด ๋„ˆ๋ฌด ๋ชฐ๋ฆฌ๋ฉด -> ์—๋Ÿฌ ๊ฒ€์ถœ ๋ฐ ๋ณต๊ตฌ๋ฅผ ๋‹ค์‹œ ํ•œ๋‹ค.
  • ์œ ๋ฌด์„  ์ค„์— ๋Œ€ํ•œ ๊ด€์‹ฌ์€ ์—†๊ณ , ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ๋ณด๋‚ธ ์ •๋ณด๊ฐ€ ์ œ๋Œ€๋กœ ์™”๋Š”์ง€ ํ™•์ธํ•˜๋Š” ๊ฒƒ

  • ๋ณด๋‚ด๋Š” ์„œ๋ฒ„ ์ปดํ“จํ„ฐ์˜ TCP์™€ ๋ฐ›๋Š” ์ž์˜ TCP ์‚ฌ์ด์—์„œ ์˜๋ฏธ๋ฅผ ์ฃผ๊ณ  ๋ฐ›๋Š”๋‹ค! (4๊ณ„์ธต๋ผ๋ฆฌ)

 

5. Session (Layer 5)
: Managing communication sessions (
logical connection between applications),
i.e. continuous exchange of information in the form of multiple back-and-forth transmissions between two nodes

  • ๋‘ ์ปจํ…์ธ ์— ๋Œ€ํ•œ ๋™๊ธฐํ™” (์˜์ƒ๊ณผ ์œ ํŠœ๋ธŒ ์ž๋ง‰) 
  • ๊ฒŒ์ž„ํ•  ๋•Œ ๋กœ๊ทธ์ธ -> User์— ๋”ฐ๋ผ ๋‹ฌ๋ผ์ง€๋Š” ๊ธฐ๋Šฅ๋“ค
  • authorization vs Authentication ์˜ ์ฐจ์ด
  • ๋ฏธ๋””์–ด๊ฐ„์˜ ๋…ผ๋ฆฌ์  ๊ด€๊ณ„ ๊ด€๋ฆฌ

 

6. Presentation (Layer 6)
: Translation of data between a networking service and an application ;
including
 character/multi-media encoding, data compression and encryption/decryption

  • ๊ธ€์ž ๊ทธ๋ฆผ ๋น„๋””์˜ค ์˜ค๋””์˜ค jpeg, mp3 ๋“ฑ๋“ฑ ์˜์ƒ, ์‚ฌ์ง„, ์˜ค๋””์˜ค๋ฅผ ์ €์žฅํ•˜๋Š” ๋ฐฉ๋ฒ•
  • ์ปดํ“จํ„ฐ๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ป๊ฒŒ ํ‘œํ˜„ํ•˜๋Š”์ง€ ๋ฐฉ๋ฒ• -> presentation (์•”ํ˜ธํ™”, ์••์ถ• ๋“ฑ๋“ฑ)

 

7. Application (Layer 7)
: High-level APIs, including resource sharing, remote file access (
sometimes, end-user application itself)

 

 

 

 

* ํด๋ผ์ด์–ธํŠธ์™€ ์„œ๋ฒ„๋Š” 7๊ณ„์ธต๊นŒ์ง€ ์Œ“์ด๊ณ , ์ค‘๊ฐ„ ๋„คํŠธ์›Œํฌ ์žฅ์น˜๋Š” ํ•„์š”์— ๋”ฐ๋ผ N๊ณ„์ธต๊นŒ์ง€

  • ๋Œ€ํ‘œ์ ์œผ๋กœ ๋ผ์šฐํ„ฐ -> 3 layer ๊นŒ์ง€
  • ์Šค์œ„์น˜์™€ ํ—ˆ๋ธŒ -> 2 layer ; ์ฆ‰ ์ปดํ“จํ„ฐ๋ฅผ ์—ฐ๊ฒฐํ•˜๋Š” ์—ญํ• ๋งŒ ํ•  ๋ฟ
  • ๋”ฐ๋ผ์„œ ์Šค์œ„์น˜๊ฐ€ ๋ผ์šฐํ„ฐ๋ณด๋‹ค ๋” ์‹ธ๋‹ค

 

 

 

* ๊ณผ๊ฑฐ์˜ ๋„คํŠธ์›Œํฌ (1970 ~ )

  • ์ด๋Ÿฐ ๋ฐฉ์‹์œผ๋กœ ์Œ“์€๊ฒŒ 7๊ณ„์ธต
  • ๋ผ์šฐํ„ฐ, ์Šค์œ„์น˜๋ผ๋Š” ์žฅ์น˜, ํ•˜๋“œ์›จ์–ด ์žฅ์น˜์— ์ง‘์ฐฉ
  • ๋„คํŠธ์›Œํฌ๋ฅผ ๊ตฌ์ถ•ํ•œ๋‹ค๊ณ  ํ•˜๋ฉด, ์–ด๋งˆ์–ด๋งˆํ•œ ํ•˜๋“œ์›จ์–ด๊ฐ€ ์—ฐ๊ฒฐ๋˜๋Š” ๊ฒƒ์— ์˜๋ฏธ๊ฐ€ ์žˆ์—ˆ๋‹ค.

* ํ˜„์žฌ์˜ ๋„คํŠธ์›Œํฌ (2010 ~ )

  • ์ด๋ฏธ ์ˆ˜ ์ฒœ, ์ˆ˜ ๋งŒ ๋Œ€์˜ ์ปดํ“จํ„ฐ๋Š” ๋‚ด๋ถ€์— ์„ค์น˜๊ฐ€ ์™„๋ฃŒ
  • ์ด ๋ฐฉ ์•ˆ์˜ ์ปดํ“จํ„ฐ๋“ค์€ ์ด๋ฏธ ์—ฐ๊ฒฐ ๋จ - ์ค„ ์—ฐ๊ฒฐ ์ด๋Ÿฐ๊ฑฐ๋Š” ๋‹ค ๋๋‚œ ๊ฒƒ

 

  • ๋‚ด๊ฐ€ ํ•ด์•ผ ํ•˜๋Š” ๊ฒƒ?
  • ์—ฐ๊ฒฐ๋œ ํ•˜๋“œ์›จ์–ด, ๋ผ์šฐํ„ฐ๋“ค, ์Šค์œ„์น˜ ์œ„์—์„œ, ์†Œํ”„ํŠธ์›จ์–ด ์„œ๋น„์Šค๋“ค์„ ๋„คํŠธ์›Œํ‚น ํ•˜๋Š” ๊ฒƒ
  • ํ•„์š”๋กœ ํ•˜๋Š” CPU ๋งŒํผ ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ๋„์šฐ๊ณ , ์†Œํ”„ํŠธ์›จ์–ด ๋ผ์šฐํ„ฐ๋ฅผ ๋„์›Œ์„œ,
    (123๊ณ„์ธต, ๋ผ์šฐํ„ฐ์—์„œ๋Š” 3๊ณ„์ธต ๋ผ์šฐํŒ… ์†Œํ”„ํŠธ์›จ์–ด๊ฐ€ ๊ฐ€์žฅ ์ค‘์š”)
  • ๋‚ด ํ”„๋กœ๊ทธ๋žจ์„ ์œ„ํ•œ ๋‚˜๋งŒ์˜ ๋ผ์šฐํŒ… ๊ธฐ๋Šฅ์ด ํ•„์š”

 

  • ๋ฌผ๋ฆฌ์ ์ธ ๊ฒƒ์— ์†์„ ๋Œ€์ง€ ์•Š๋Š”๋‹ค. 
  • ํ•„์š”ํ•  ๋•Œ ํ•„์š”ํ•œ ๋งŒํผ CPU์™€ ๋””์Šคํฌ๋ฅผ ๋„์šฐ๊ณ , 
    ์†Œํ”„ํŠธ์›จ์–ด ์Šค์œ„์น˜, ์†Œํ”„ํŠธ์›จ์–ด ๋ผ์šฐํ„ฐ๋ฅผ ๋„์šฐ๊ณ 
     ๋‚˜๋Š” ์˜ค๋กœ์ง€ ์†Œํ”„ํŠธ์›จ์–ด ์„œ๋น„์Šค๋งŒ์„ ๊ณ ๋ ค

 

  • ํšŒ์‚ฌ์—์„œ ํ•˜๋“œ์›จ์–ด๋กœ ์—ฐ๊ฒฐํ•˜๋ผ๊ณ  ์ค„์„ ์ฃผ์ง€ ์•Š๋Š”๋‹ค.
  • ํ•„์š”ํ•œ ๋งŒํผ CPU, ๋„คํŠธ์›Œํฌ, ์Šคํ† ๋ฆฌ์ง€ ์š”๊ตฌ
  • -> ๋ฌผ๋ฆฌ์ ์ธ ์žฅ์น˜ ์œ„์—์„œ, ๊ฐ€์ƒ์œผ๋กœ ์‚ฌ์šฉํ•  ์†Œํ”„ํŠธ์›จ์–ด ์ธํ”„๋ผ๋งŒ ๋ฐฐ์ •๋˜๋Š” ๊ฒƒ 
  • ๋ฐ›์•„์„œ ์‚ฌ์šฉํ•œ ๋’ค, ํ•„์š” ์—†์–ด์ง€๋ฉด ๋ฐ˜๋‚ฉ
  • + ๋ผ์šฐํ„ฐ ์†Œํ”„ํŠธ์›จ์–ด / ๋ฆฌ๋ˆ…์Šค