[ํ’€์Šคํƒ] CSMA/CD _ Random Access Protocols in MAC Layer

2023. 4. 8. 18:27ใ†ComputerScience/FullStackProgramming

 

 

 

CSMA / CD (์ด๋”๋„ท, ์ดˆ๊ณ ์† ์ธํ„ฐ๋„ท, ๊ด‘ ๋žœ, IEEE 802.3)

  • Carrier Sense Multiple Access with Collision Detection (CSMA/CD) augments the algorithm to handle the collision.
  • In this method, a station monitors the medium after it sends a frame to see if the transmission was successful.
  • If so, the station is finished. If, however, there is a collision, the frame is sent again.

 

  • ํ•œ ์ค„์„ ์—ฌ๋Ÿฌ ๋ช…์ด ๋™์‹œ์— ์‚ฌ์šฉํ•œ๋‹ค. 
  • ์˜๊ธฐ ์ „์— ๋ˆ„๊ฐ€ ์˜๊ณ  ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๊ณ , ์•ˆ ์˜๋ฉด ๋‚ด๊ฐ€ ์œ๋‹ค
  • ๋‚จ์ด ์˜๋Š” ๊ฒƒ์ด ๊ฒ€์ถœ๋œ๋‹ค๋ฉด or ๋‚ด๊ฐ€ ์˜๋Š” ์ƒํ™ฉ์—์„œ ๋‚จ์ด ์œ๋‹ค๋ฉด? 
  • ์ถฉ๋Œ์ด ๋ฐœ์ƒํ•˜๊ณ , ์„œ๋กœ ํ†ต์‹ ์„ ํ•˜์ง€ ์•Š๋Š”๋‹ค. 
  • ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ์งœ๋Š” ์‚ฌ๋žŒ ์ž…์žฅ์—์„œ ๋ฌด์—‡์ด ๋ฌธ์ œ์ธ์ง€ ์‚ดํŽด๋ณด์ž :)

 

 

 

 

https://www.youtube.com/watch?v=DLdfrhearM0

 

 

 

Flow diagram for the CSMA/CD ์ถœ์ฒ˜: https://www.researchgate.net/figure/Flow-diagram-for-the-CSMA-CD_fig3_323511648

 

 

 

  • ๋ฐ˜๋ณตํ•ด์„œ ๋žœ๋ค ๊ฐ’์„ ์ฃผ๊ณ , ์ž ์‹œ ์‰ฌ์–ด๊ฐ€๋„๋ก ํ•œ๋‹ค.
    ๋ฐ˜๋ณต์„ N๋ฒˆ ํ•˜๋‹ค๊ฐ€ ์•ˆ๋˜๋ฉด ํฌ๊ธฐํ•œ๋‹ค.
    ์™„๋ฒฝํ•œ ์—๋Ÿฌ ๋ณต๊ตฌ๋ž€ ์—†๋‹ค. ํ†ต์‹ ์ด ๋งˆ๋น„๋œ๋‹ค. 
  • ์‚ฌ๋žŒ์ด ์ง€ํ•˜ ๋‚ด๋ ค๊ฐ€๋ฒ„๋ฆฌ๋Š”๋ฐ, ์Šค๋งˆํŠธํฐ์ด ๋ฏธ์นœ๋“ฏ์ด ์—๋Ÿฌ ๊ฒ€์ถœ -> ๋ฐฐํ„ฐ๋ฆฌ ๋‹ค ๋‚˜๊ฐ€๊ณ , ๊ธฐ๊ธฐ ๊ณ ์žฅ๋‚  ๊ฒƒ
  • ์ด๊ฒŒ ์œ ์„  ์ด๋”๋„ท -> ๋ฌด์ œํ•œ์œผ๋กœ ๋ณต๊ตฌํ•˜๊ฒ ๋‹ค? ์•ˆ๋จ ๋ฒ„๋ ค
  • ํ•œ ์ค„์„ ๋‘˜์ด ์“ฐ๊ฒŒ ๋œ๋‹ค๋ฉด ์ถฉ๋Œ๋‚  ์ˆ˜ ์žˆ๋‹ค. 

 

  • ์ค„์€ ์•ˆ์ „ํ•œ๋ฐ, ์žฅ์น˜ ์•ˆ์—์„œ๋Š” ๋ฐœ์ƒ ๊ฐ€๋Šฅ
  • ํ•œ ์ˆœ๊ฐ„์— ํŠธ๋ž˜ํ”ฝ์ด ๋ชฐ๋ฆฌ๋ฉด -> ๊ฒฐ๊ตญ ๋ฒ„๋ฆผ

 

  • ์œ ์„ ์—์„œ์˜ ํŒจํ‚ท ์œ ์‹ค๋„ ๋‹น์—ฐํžˆ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋‹ค. 
  • ์ค„์— ์ฃผ์–ด์ง„ ๋ฒ„ํผ ์‚ฌ์ด์ฆˆ๋ณด๋‹ค ์ดˆ๊ณผ๋œ ํŠธ๋ž˜ํ”ฝ์ด ๋„๋‹ฌํ•˜๋ฉด ์œ ์‹ค ๊ฐ€๋Šฅ

 

  • ํ•œ ์ค„์— ๋‘์„ธ๊ฐœ ์—ฐ๊ฒฐํ•˜๋Š” ๋ฐฉ์‹์€ ์‚ฌ๋ผ์ง -> ์ดˆ๊ณ ์† ์ธํ„ฐ๋„ท์€ ๋”์ด์ƒ ์ €๋Ÿฐ ๋ฐฉ์‹์œผ๋กœ ์‚ฌ์šฉ ์•ˆ ํ•จ
  • ํ†ต์‹ ์žฅ์น˜ ์Šค์œ„์น˜ ๋ผ์šฐํ„ฐ ์ปดํ“จํ„ฐ๋ฅผ 1 ํ•œ ์ค„๋กœ ์—ฐ๊ฒฐ -> ์—๋Ÿฌ๊ฐ€ ๋‚  ํ™•๋ฅ ์€ ๊ฑฐ์˜ ์—†๋‹ค.
  • ์ค„์—์„œ ์—๋Ÿฌ๊ฐ€ ๋‚  ํ™•๋ฅ ์€ ์ด์ œ ๊ฑฐ์˜ ์—†๋‹ค. 

 

  • A์™€ B ์‚ฌ์ด์—์„œ์˜ ์—๋Ÿฌ๋Š” ์—†์•ด์œผ๋‚˜, ์ด๊ฑธ ํ•œ ์ค„๋กœ ๋ชจ์•„์„œ ์™ธ๋ถ€๋กœ ๋‚˜๊ฐˆ ๋•Œ
  • ํ•œ ๊ณณ์œผ๋กœ ํŠธ๋ž˜ํ”ฝ์ด ๋ชฐ๋ฆฌ๋ฉด, ๋„คํŠธ์›Œํฌ ์žฅ์น˜๋Š” ์ด๋ฅผ ๋ฒ„๋ฆฐ๋‹ค.
  • ์œ ์„ ํ†ต์‹ ๋ง๋„ ํŠธ๋ž˜ํ”ฝ ๋ฒ„๋ฆด ์ˆ˜ ์žˆ์Œ

 

 

 

  • Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) was invented for wireless networks.
  • Collisions are avoided through the use of CSMA/ CA’s three strategies:
    the inter-frame space, the contention window, and acknowledgments.
  • We discuss RTS and CTS frames later.
    • RTS - Ready To Send, ์†ก์‹  ์š”๊ตฌ
    • CTS - Clear To Send, ์†ก์‹  ๊ฐ€๋Šฅ

 

 

 

A์˜ RTS๋ฅผ E๊ฐ€ ์ค‘๊ฐ„์— ๋“ค์–ด์™€๋ฒ„๋ฆฌ๋ฉด? -> ๋‚œ ์•ž์— ์ƒํ™ฉ ์ž˜ ๋ชจ๋ฅด๊ฒ ๋Š”๋ฐ? ํ†ต์‹  ์ค‘๊ฐ„์— ๋ผ๋ฉด ๋‹ค ์—‰๊ฒจ๋ฒ„๋ฆฐ๋‹ค. ์ถœ์ฒ˜:  https://medium.com/@lyoungh2570/๋ฐ์ดํ„ฐํ†ต์‹ -2017๋…„-๊ธฐ๋ง-์‹œํ—˜-7e2564168d29

 

 

 

  • ๋ฌด์„  ๋žœ์€ ์„œ๋กœ ๋‹ค๋ฅธ ์• ๋“ค์ด, ๋™์‹œ ๋‹ค๋ฐœ์ ์œผ๋กœ ์˜๋ ค๊ณ  ์ ‘๊ทผํ•˜๋Š” ์‹œ์Šคํ…œ
  • ์‚ฌ์šฉ์ž๊ฐ€ ๋งŽ์„์ˆ˜๋ก, ์ถฉ๋Œ์ด ์ผ์–ด๋‚  ํ™•๋ฅ ์ด ๋†’๋‹ค
  • ์•ˆํ…Œ๋‚˜๊ฐ€ ๋นต๋นตํ•˜๋‹ค?
    ๊ณต์œ ๊ธฐ๊ฐ€ ์œ ์‹ ํ˜ธ๊ฐ€ ๋‚˜์—๊ฒŒ ์ž˜ ๋“ค์–ด์˜จ๋‹ค
  • ์ถฉ๋Œ์ด ๋งŽ์ด ๋‚˜๋Š” ๊ฒƒ์€ ํ‘œ์‹œ๊ฐ€ ์•ˆ ๋จ -> ๋‚ด ์ฃผ๋ณ€์— ๋…ธํŠธ๋ถ ๋ฐ ์žฅ์น˜๊ฐ€ ๋งŽ๋‹ค๋Š” ๊ฒƒ
  • ๋ฌด์„ ๋žœ์€ ๋ฌด๋ฃŒ๋กœ ์‚ฌ์šฉ ๊ฐ€๋Šฅ
  • ๋ˆ„๊ตฌ๋‚˜ ์“ธ ์ˆ˜ ์žˆ๋‹ค. ๊ด€๋ฆฌ์ž๊ฐ€ ์—†๊ณ  ์‚ฌ์šฉ์ž๊ฐ€ ๋งŽ์•„์ง„๋‹ค.
    ์ถฉ๋Œํ•˜๊ณ  ์„ฑ๋Šฅ ๋‚ฎ์•„์ง€๋Š” ๊ฒƒ์€ ๋ณธ์ธ์˜ ๋ชซ

 

 

 

  • limit ๊นŒ์ง€ ์‹œ๋„ํ•˜๋‚˜, ์•ˆ๋˜๋ฉด ํฌ๊ธฐํ•œ๋‹ค.
  • ์ตœ๋Œ€ํ•œ ๋…ธ๋ ฅํ•˜๋Š” ๊ตฌ์กฐ์ด์ง€, ๋ฌด์กฐ๊ฑด ๋ณด์žฅํ•˜๋Š” ๊ฒƒ X
  • ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ํด๋ผ์ด์–ธํŠธ์˜ ํ†ต์‹  ํ™˜๊ฒฝ์„ ๊ณ ๋ คํ•ด์•ผ ํ•œ๋‹ค.
  • ๋ฌด์„  ๋žœ์€ ํ’ˆ์งˆ ๋ณด์ฆ์ด ์•ˆ ๋œ๋‹ค.  
  • ๋ฌด์„  ๋„คํŠธ์›Œํฌ์˜ ์ทจ์•ฝ์ ์„ ๋ถ„๋ช…ํžˆ ์•Œ๊ณ  ์„œ๋น„์Šค๋ฅผ ์งœ์•ผ ํ•œ๋‹ค. 
  • ์ด๋™ ํ†ต์‹  -> ๋ˆ์„ ๋ƒˆ์œผ๋‹ˆ, ์ตœ์ € ์†๋„๋Š” ๋งž์ถฐ์ค€๋‹ค. 

 

 

 

Based on “Best-Effort” philosophy : Not guaranteed !!

  •  One of the responsibilities of the data-link control sublayer is flow and error control at the data-link layer.
  • Flow Control (ํ๋ฆ„ ์ œ์–ด): ๋” ๋น ๋ฅธ ์†ก์‹ ์ž๊ฐ€ ๋Š๋ฆฐ ์ˆ˜์‹ ์ž๋ฅผ ์ œ์••ํ•˜์ง€ ๋ชปํ•˜๋„๋ก ๋‘ ๋…ธ๋“œ ๊ฐ„ ๋ฐ์ดํ„ฐ ์ „์†ก ์†๋„๋ฅผ ๊ด€๋ฆฌ
  • Error Control (์˜ค๋ฅ˜ ์ œ์–ด): ์‹ ๋ขฐํ•  ์ˆ˜ ์—†๋Š” ํ†ต์‹  ์ฑ„๋„ ์œ„์—์„œ ๋””์ง€ํ„ธ ๋ฐ์ดํ„ฐ๋ฅผ ์‹ ๋ขฐ์„ฑ ์žˆ๊ฒŒ ์ „๋‹ฌ(์—๋Ÿฌ ๊ฒ€์ถœ ๋ฐ ๋ณต๊ตฌ)

 

  • ์ตœ์„ ์„ ๋‹คํ•  ๋ฟ์ด๋‹ค. ๋ณด์žฅ๋˜๋Š” ๊ฒƒ์€ ์—†๋‹ค.
  • ์†๋„์— ๋Œ€ํ•œ ์ด์•ผ๊ธฐ๋Š” ํ•˜๋‚˜๋„ ์•ˆ ํ–ˆ๋‹ค.
    ์†๋„๋ฅผ ๋ณด์žฅํ•œ๋‹ค๋Š” ๊ฒƒ์€ ์–ธ๊ธ‰ํ•œ ์ ๋„ ์—†๋‹ค. 
  • ์ตœ์ € ์†๋„ ๋ณด์žฅ ๊ฐ€๋Šฅ? -> ์ง์ ‘ ๊ทธ ์ƒํ™ฉ์— ๊ฐ€์„œ ํ•ด ๋ณด๋ผ. 

 

  • MAC Layer ๊ธฐ์ˆ ์— ๋Œ€ํ•œ ์‹œ์‚ฌ์  -> QoS ์ €ํ•˜
         QoS๋Š” ๋‹ค๋ฅธ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ, ์‚ฌ์šฉ์ž, ๋ฐ์ดํ„ฐ ํ๋ฆ„ ๋“ฑ์— ์šฐ์„  ์ˆœ์œ„๋ฅผ ์ •ํ•˜์—ฌ, ๋ฐ์ดํ„ฐ ์ „์†ก์— ํŠน์ • ์ˆ˜์ค€์˜ ์„ฑ๋Šฅ์„ ๋ณด์žฅํ•˜๊ธฐ ์œ„ํ•œ ๋Šฅ๋ ฅ
    • ์ „ํ†ต์ ์ธ ์œ ์„  ์ด๋”๋„ท๊ณผ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” ๋ฌด์„  ๋žœ
    • ๋™์‹œ ์‚ฌ์šฉ์ž๊ฐ€ ๋งŽ์œผ๋ฉด ์ถฉ๋Œ๋กœ ์ธํ•ด ์„ฑ๋Šฅ(์ „์†ก ์†๋„์™€ ์‹œ๊ฐ„) ์ €ํ•˜
    • L1 ์ „ํŒŒ ์‹ ํ˜ธ ๋ถˆ๋Ÿ‰ ๋ฐ L2 ์ถฉ๋Œ์‹œ ์†์‹ค ๋ฐœ์ƒ
    • OSI layer 1, layer 2์— ์†ํ•˜๋Š” ๋‹ค๋ฅธ ๊ธฐ์ˆ (BT, 3G/4G/5G)๋„ ์œ ์‚ฌํ•œ ๋ฌธ์ œ ๋ฐœ์ƒ
      ๊ฒฐ๋ก ์ ์œผ๋กœ L1/L2์˜ ํŠน์„ฑ์˜ ์ดํ•ด๋Š” ์„œ๋น„์Šค ํ’ˆ์งˆ ๋ณด์žฅ์„ ์œ„ํ•ด ํ•„์š”ํ•˜๋‹ค