๐Ÿ“˜ [Computer Network] SDN control plane

๊ณ ๋ฏผ์ •ยท2023๋…„ 10์›” 31์ผ
0

Computer Network

๋ชฉ๋ก ๋ณด๊ธฐ
4/12
post-thumbnail

05-2


๐Ÿ’ก What is SDN?

SDN : Software Defined Networking
monolithic router : HW์™€ SW๊ฐ€ ํ•ฉ์ณ์ ธ ์žˆ๋Š” ๋ผ์šฐํ„ฐ
proprietary router OS : OS๋ฅผ router ํšŒ์‚ฌ์—์„œ ์ผ์ฒดํ˜•์œผ๋กœ ํŒ๋งค

์˜ˆ์ „์˜ router ์‹œ์žฅ์€ ๊ฑฐ์˜ Cisco์˜ ๋…์ ์ฒด์ œ์˜€๋‹ค.
์ด์œ ๊ฐ€ ๋ฌด์—‡์ผ๊นŒ?

๋ฐ”๋กœ per-router ์—์„œ๋Š” monolithic router์„ ํŒ๋งคํ•˜๊ณ , proprietary router OS ์˜€๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.
์ด๋Ÿฌํ•œ ๊ฒฝ์šฐ ๋„คํŠธ์›Œํ‚น์‹œ ๋ฐฉ๋ฒ•์„ ์กฐ๊ธˆ๋งŒ ๋‹ค๋ฅด๊ฒŒ ๋ฐ”๊พธ๋ ค๊ณ  ํ•˜๋ฉด ์“ฐ๊ณ ์žˆ๋Š” ๋ผ์šฐํ„ฐ๋“ค์„ ๋ชจ๋‘ ํ๊ธฐํ•˜๊ณ  ์žฌ๊ตฌ๋งค๋ฅผ ํ•ด์•ผํ–ˆ๋‹ค.
์ฆ‰ HW์™€ SW๊ฐ€ ์ผ์ฒดํ˜•์œผ๋กœ ๋ถ™์–ด์žˆ์—ˆ๊ธฐ์— SW๋งŒ ๋ณ€๊ฒฝํ•˜๋Š” ๊ฒƒ์€ ๋ถˆ๊ฐ€๋Šฅํ–ˆ๋‹ค.

ํ•˜์ง€๋งŒ ๊ธฐ์ˆ ์ด ๋ฐœ์ „ํ•˜์—ฌ ์—ฌ๋Ÿฌ ์ œํ’ˆ์ด ๋‚˜์˜ค๋ฉฐ ์™„ํ™”๋˜์—ˆ๋‹ค.
์–ด๋–ป๊ฒŒ ์™„ํ™”๋˜์—ˆ์„๊นŒ?


๐Ÿ’ก Logically Centralized control plane

SDN is logically centralized control plane!

์˜ˆ์ „์˜ ๋ผ์šฐํ„ฐ๋Š” control plane ๊ณผ data plane์ด ์ผ์ฒดํ˜•์œผ๋กœ ๋ถ™์–ด์žˆ์—ˆ๋‹ค๋ฉด
์•„๋ž˜ ์„ค๋ช…์€ control plane๊ณผ data plane์ด ๋…๋ฆฝ๋˜์–ด์žˆ๋‹ค.

CA : Control Agent, data plane๊ณผ control plane์„ ์†Œํ†ต์‹œํ‚จ๋‹ค.

์˜›๋‚ ์˜ ์ผ์ฒดํ˜• ๋ผ์šฐํ„ฐ๋Š” ํ•˜๋‚˜์˜ ๋ผ์šฐํ„ฐ์˜ flow table์ด ์ž˜๋ชป๋˜์—ˆ์„ ๋•Œ ์–ด๋””์„œ๋ถ€ํ„ฐ ์ž˜๋ชป๋œ ๊ฒƒ์ธ์ง€ ์ฐพ๊ธฐ ํž˜๋“ค๋‹ค๋Š” ๋‹จ์ ์ด ์žˆ๋‹ค.
์ด์œ ๋Š” ํ•œ ๋ผ์šฐํ„ฐ์˜ flow table์ด ์ž˜๋ชป๋˜๋ฉด ๊ทธ ์ž˜๋ชป๋œ ์ •๋ณด๋ฅผ ์ฃผ๋ณ€์— ์ „๋‹ฌํ•˜๊ณ ,
์ „๋‹ฌ๋ฐ›์€ ์ฃผ๋ณ€์€ ์ž˜๋ชป๋œ ์ •๋ณด๋ฅผ ๊ฐ–๊ณ  ์ž๊ธฐ ์ž์‹ ์„ ์—…๋ฐ์ดํŠธ ํ›„,
๊ทธ ์ž˜๋ชป๋œ ์ •๋ณด๋ฅผ ์ด์šฉํ•œ ์ž˜๋ชป๋œ ์—…๋ฐ์ดํŠธ๋ฅผ ๋˜ ์ฃผ๋ณ€์— ์ „ํŒŒ์‹œํ‚ค๊ธฐ ๋–„๋ฌธ์ด๋‹ค.

ํ•˜์ง€๋งŒ data plane๊ณผ control plane์ด ๋…๋ฆฝ๋˜์–ด์žˆ์œผ๋ฉด ๋‹ค๋ฅด๋‹ค.
๊ฐ๊ฐ์˜ flow table์€ control plane์˜ remote controller์—์„œ ์—ฐ์‚ฐํ•˜๊ณ  ๋งŒ๋“ค์–ด์ง„๋‹ค.
๊ทธ ํ›„ ๋งŒ๋“ค์–ด์ง„ flow table์„ control Agent(CA)๋ฅผ ํ†ตํ•˜์—ฌ data plane์œผ๋กœ ์ „๋‹ฌ๋œ๋‹ค.



๐Ÿ“Œ Why a logically centralized control plane ?

  • Easier network management
    Error๋ฅผ ์ฐพ๊ธฐ ์‰ฝ๋‹ค.
    avoid router misconfigurations
    greater flexibility of traffic flows (plane๋“ค์ด ๋ถ„๋ฆฌ๋˜๋ฉด์„œ router๊ฐ€ ํ•˜๋Š” ์ผ์ด ์ค„์—ˆ๊ธฐ ๋•Œ๋ฌธ)
  • table-based forwarding allows "programming" router
    • centralized "programming" easier
      compute tables as result of distributed algorithm
      ๋ถ„๋ฆฌ๋˜๊ธฐ ์ „์—๋Š” ๊ฐ ๋ผ์šฐํ„ฐ๋“ค์ด ๊ฐ๊ฐ ๊ณ„์‚ฐ์„ ํ•˜๊ณ  ์—…๋ฐ์ดํŠธ ํ–ˆ์œผ๋‚˜ ๋ถ„๋ฆฌ๋œ ํ›„์—๋Š” control plane์—์„œ ๋ชจ์•„์„œ ํ•œ๋ฒˆ์— ๊ณ„์‚ฐ
  • open (non-proprietary) implmentation of contol plane
    ์œ„์— ์–˜๊ธฐํ–ˆ๋“ฏ์ด, Cisco์˜ ์‹œ์žฅ๋…์  ๋ฌธ์ œ๊ฐ€ ์‚ฌ๋ผ์กŒ๋‹ค.
    ์ „์—๋Š” Cisco ์ž์ฒด์ ์ธ control plane์„ ์ด์šฉํ•ด ์•„๋ฌด๋„ ์•Œ ์ˆ˜ ์—†์—ˆ์ง€๋งŒ
    ํ˜„์žฌ๋Š” ๊ฐœ๋ฐฉํ˜• control plane์ด๋‹ค.

  • Vertically -> Horizontal
    HW์™€ SW๋ฅผ ์ผ์ฒด ์ƒํ’ˆ์œผ๋กœ ํŒ”์•˜์ง€๋งŒ ์ง€๊ธˆ์€ ๋ถ„๋ฆฌ๋œ ์ƒํƒœ๋กœ ํŒ”๋ฉฐ, ํ•œ ํšŒ์‚ฌ๋งŒ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋˜ ๊ฒƒ์„ ์—ฌ๋ŸฌํšŒ์‚ฌ๊ฐ€ ๋‚˜๋ˆŒ ์ˆ˜ ์žˆ๊ฒŒ ๋˜์—ˆ๋‹ค.
  • Closed -> Open
    ๊ฐ ํšŒ์‚ฌ์˜ ๋…์  control plane์ด ์žˆ์—ˆ์ง€๋งŒ ํ˜„์žฌ๋Š” ์•„๋‹ˆ๋‹ค.
  • Slow innnovation -> Rapid Innovation
    ๋…์  ํšŒ์‚ฌ์ธ ํ•œ ํšŒ์‚ฌ์—์„œ๋งŒ ๊ฐœ๋ฐœํ•˜๋‹ค ์˜คํ”ˆ ํ˜•์‹์œผ๋กœ ๋ฐ”๋€Œ๊ณ  ์—ฌ๋Ÿฌ ํšŒ์‚ฌ๊ฐ€ ๋™์‹œ์— ์—ฐ๊ตฌํ•˜๊ธฐ ์‹œ์ž‘ํ•˜๋ฉด์„œ ๋น ๋ฅธ ๋ฐœ์ „์„ ์ด๋ฃจ์—ˆ๋‹ค.
  • Small industry -> Huge industry
    ๋…์ ํšŒ์‚ฌ (ํ•œ์ •์ ) -> ์—ฌ๋Ÿฌ ํšŒ์‚ฌ

Traffic Engineering (load balancing)

๊ธฐ์กด์˜ per-routing ๋ฐฉ์‹์€ HW์™€ SW๊ฐ€ ์ผ์ฒดํ™” ๋˜์–ด์žˆ์–ด control plane์€ ๋…์ ํšŒ์‚ฌ์˜ ๊ฒƒ์ด์—ˆ๋‹ค.
์ฆ‰, ๋” ํšจ๊ณผ์ ์ธ ๋ฐฉ๋ฒ•์ด ์žˆ์–ด๋„ ํšŒ์‚ฌ์˜ control plane policy์— ๋”ฐ๋ฅผ ๋ฟ, ํšŒ์‚ฌ๊ฐ€ ์•„๋‹Œ ์™ธ๋ถ€์ธ์€ ์ˆ˜์ •๋ถˆ๊ฐ€ํ–ˆ๋‹ค.
์„ค๋ น ๊ทธ๊ฒƒ์ด ๋” ํšจ์œจ์ ์ธ ๋ฐฉ๋ฒ•์ž„์—๋„

๋งŒ์•ฝ u์— traffic์ด ๋„ˆ๋ฌด ๋ชฐ๋ ค ๋‘ ๊ฐ€์ง€ ๊ธธ๋กœ ๋‚˜๋ˆ ์„œ ํ• ๋‹นํ•˜๊ณ  ์‹ถ๋‹คํ•˜์ž.
ํ•˜์ง€๋งŒ ์ผ์ฒดํ™”๋œ router๋Š” ๋” ์ ์€ cost๋ฅผ ๊ฐ€์ง„ ์ชฝ์œผ๋กœ ๊ฐ€๊ธฐ ๋•Œ๋ฌธ์— ์šฐ๋ฆฌ๊ฐ€ ์กฐ์ ˆํ•  ์ˆ˜ ์—†๋‹ค.
traffic์ด ๋„ˆ๋ฌด ๋ชฐ๋ ค์„œ ๊ณผ๋ถ€ํ™”๊ฐ€ ์˜ค๋”๋ผ๋„

๋งŒ์•ฝ ์ด๊ฒƒ์„ ๊ณ ์น˜๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์ด์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๊ธฐ์กด์˜ ๋ผ์šฐํ„ฐ๋“ค์„ ๋ชจ๋‘ ํ๊ธฐํ•ด์•ผํ•œ๋‹ค.

๊ทธ๋ ‡๋‹ค๋ฉด ์šฐ๋ฆฌ๋Š” ๊ธฐ์กด์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜๊ณผ๋Š” ๋‹ค๋ฅธ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์ ์šฉ์‹œํ‚ค๊ธฐ ์œ„ํ•ด์„œ๋Š” ์ €๋Ÿฐ ๋น„ํšจ์œจ์ ์ธ ๋ฐฉ๋ฒ•๋ฐ–์— ์—†๋Š”๊ฑธ๊นŒ?


๐Ÿ’ก SDN

๋‹ต์€ SDN์— ์žˆ๋‹ค.

SDN์€ data plane๊ณผ control plane์ด ๋ถ„๋ฆฌ๋˜์–ด์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๊ต์ฒดํ•  ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์•ฑ๋งŒ ์ƒˆ๋กœ ๊น”์•„์ฃผ๋ฉด ๋œ๋‹ค.

์œ„ ์‚ฌ์ง„์„ ๋ณด๋ฉด ์•Œ ์ˆ˜ ์žˆ๋“ฏ, control plane์€ application๊ณผ๋„ ์†Œํ†ตํ•˜๊ณ  ์•„๋ž˜๋กœ๋Š” switches์™€๋„ ์†Œํ†ตํ•œ๋‹ค.
์ด๋•Œ ์Šค์œ„์น˜์™€ ๋ผ์šฐํ„ฐ๋Š” OpenFlow protocol์„ ์ด์šฉํ•˜์—ฌ controller์™€ ์†Œํ†ตํ•œ๋‹ค.

๊ทธ๋Ÿผ openFlow๋ž‘ CA(control agent) ์ฐจ์ด์ ์ด ๋ญ์•ผ?


๐Ÿ’ก SDN controller (network OS)

์œ„์™€ ๊ฐ™์ด SDN controller ๊ฐ€ network control application๊ณผ ์†Œํ†ตํ•  ๋•Œ๋Š” northbound API๋ฅผ ์ด์šฉํ•œ๋‹ค.

์•„๋ž˜์˜ data plane ์นœ๊ตฌ๋“ค๊ณผ ์†Œํ†ตํ•  ๋•Œ๋Š” southbound API๋ฅผ ์ด์šฉํ•œ๋‹ค.

๐Ÿ“Œ ์‹ค์ œ๋กœ control plane์€ ์—ฌ๋Ÿฌ๋Œ€์˜ ๋ถ„์‚ฐ๋œ controller๋“ค์„ ๊ฐ–๊ณ ์žˆ๋‹ค.
ํŽธ์˜๋ฅผ ์œ„ํ—ค ํ•˜๋‚˜๋กœ ๊ทธ๋ฆด๋ฟ์ด๋‹ค.


network-control apps

  • routing : end-to-end pahts via ๋‹ค์ต์ŠคํŠธ๋ผ ์•Œ๊ณ ๋ฆฌ์ฆ˜ using node-state and link state information from SDN

  • access control : ์Šค์œ„์น˜์—์„œ ์–ด๋–คpacket์„ ๋ธ”๋ฝํ•  ๊ฒƒ์ธ์ง€ ๊ฒฐ์ •ํ•œ๋‹ค. ex) firewall

  • load balancing : blance traffic between switches


๐Ÿ’ก OpenFlow protocol

  • controller์™€ switch ์‚ฌ์ด์—์„œ ์ผ์–ด๋‚œ๋‹ค.
  • ๋ฉ”์„ธ์ง€๋ฅผ ์ฃผ๊ณ  ๋ฐ›์„๋•Œ๋Š” TCP๋ฅผ ์ด์šฉํ•œ๋‹ค.

Controller-to-switch

Modify-State : flow table์˜ ์ •๋ณด๊ฐ€ ๋ฐ”๋€๊ฒฝ์šฐ ๋ฐ”๋€Œ์—ˆ๋‹ค๊ณ  ์•Œ๋ ค์ค€๋‹ค.
Read-State : count values๋ฅผ ์ฝ์–ด์˜ค๊ณ  ์‹ถ์„ ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค.

Switch to controller

Port-Status : port status๊ฐ€ ๋ฐ”๋€Œ์—ˆ์„๋•Œ ์ •๋ณด๋ฅผ ์ค€๋‹ค.
ex) link has gone down

๋งŒ์•ฝ ๋งํฌ๊ฐ€ ๋‹ค์šด๋œ ๊ฒฝ์šฐ Port-Status (์Šค์œ„์น˜ -> ์ปจํŠธ๋กค๋Ÿฌ)๋กœ ๋งํฌ๊ฐ€ ๋‹ค์šด๋˜์—ˆ์Œ์„ ์•Œ๋ฆฐ๋‹ค.
๊ทธ๋Ÿผ ์ปจํŠธ๋กค๋Ÿฌ๋Š” ๋‹ค๋ฅธ ๋ฐฉ์•ˆ์„ ์ฐพ์•„ flow table์„ ์—…๋ฐ์ดํŠธ ํ•œ ํ›„ ์Šค์œ„์น˜์—๊ฒŒ update flow table์„ ์ „ํ•ด์ค€๋‹ค(Modify-State). (์ปจํŠธ๋กค๋Ÿฌ -> ์Šค์œ„์น˜)


Per router vs SDN

๊ณตํ†ต์  : ๋‹ค์ต์ŠคํŠธ๋ผ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์‚ฌ์šฉ

์ฐจ์ด์ 
Per router : Link State routing
๋‹ค์ต์ŠคํŠธ๋ผ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ๋ชจ๋“  ๋ผ์šฐํ„ฐ์—์„œ ์‹คํ–‰๋œ๋‹ค.
link state update๊ฐ€ ๋ชจ๋“  ๋„คํŠธ์›Œํฌ ๋ผ์šฐํ„ฐ๋“ค์—๊ฒŒ ๋ฐฉ์†ก๋œ๋‹ค.

Centralized control : SDN
๋‹ค์ต์ŠคํŠธ๋ผ ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ packet switches ๋ฐ–์—์„œ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์œผ๋กœ ๋”ฐ๋กœ ์‹คํ–‰๋œ๋‹ค.
Packet Switches๊ฐ€ link update๊ฐ€ ์žˆ์„ ์‹œ ๋ชจ๋“  ๋„คํŠธ์›Œํฌ์— ๋ฐฉ์†กํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹Œ SDN Controller์—๋งŒ ์•Œ๋ ค์ค€๋‹ค.


๐Ÿ’ก SDN Example

  1. S1์ด link failure๊ฐ€ ์ผ์–ด๋‚ฌ๋‹ค๋ฉด OpenFlow port status ๋ฉ”์„ธ์ง€๋ฅผ modify controller์— ์ค€๋‹ค.

  2. SDN controller๊ฐ€ ๋ฉ”์„ธ์ง€๋ฅผ ๋ฐ›๊ณ  OpenFlow ๋ฉ”์„ธ์ง€๋ฅผ ํ†ตํ•ด link satae info๋ฅผ ์—…๋ฐ์ดํŠธํ•œ๋‹ค.

  3. ๋ฐ”๋€ link state์œผ๋กœ ๋‹ค์ต์ŠคํŠธ๋ผ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์ˆ˜ํ–‰ํ•œ๋‹ค.

  4. new least-cost๊ฐ€ ๋งŒ๋“ค์–ด์ง„๋‹ค.

  5. new least-cost๋กœ ๊ฐ์ž์˜ flow table์„ ๋งŒ๋“ค์–ด์ค€๋‹ค.

  6. Controller๊ฐ€ OpenFlow modify-state ๋ฉ”์„ธ์ง€๋ฅผ ํ†ตํ•ด ์Šค์œ„์น˜์— ์ƒˆ๋กœ์šด ํ…Œ์ด๋ธ”์„ ๋‹ค์šด์‹œํ‚ค๊ณ  ์—…๋ฐ์ดํŠธํ•ด์ค€๋‹ค.

๐Ÿ“Œ ์งˆ๋ฌธ
Q1. ๊ธฐ์กด์˜ ์ „ํ†ต์ ์ธ ๋ผ์šฐํŒ…๊ณผ ๋‹ค๋ฅธ ์ ์€?
๊ธฐ์กด์€ ๋ผ์šฐํ„ฐ๊ฐ€ ๋‹ค์ต์ŠคํŠธ๋ผ๋ฅผ ์ˆ˜ํ–‰ํ–ˆ๋‹ค. ํ•˜์ง€๋งŒ SDN์€ application์ด ์ˆ˜ํ–‰ํ•œ๋‹ค.
๊ณ ๋กœ ๋ผ์šฐํ„ฐ์˜ ๊ณ„์‚ฐ์ด ์ค„์—ˆ๋‹ค.

Q2. ๋ผ์šฐํŒ… ํ”„๋กœํ† ์ฝœ์„ ๋ฐ”๊พธ๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผํ• ๊นŒ?
per-router์—๋Š” ๋ชจ๋“  ๋ผ์šฐํ„ฐ๋ฅผ ์ƒˆ ๋ผ์šฐํ„ฐ๋กœ ๋ฐ”๊ฟ”์•ผํ–ˆ๋‹ค.
ํ•˜์ง€๋งŒ SDN์€ ์•ฑ์„ ํ•˜๋‚˜๋งŒ ๊น”๋ฉด ๋œ๋‹ค.

Q3. ๋งŒ์•ฝ SDN์—์„œ link status๊ฐ€ ๋ฐ”๋€Œ๋ฉด ์–ด๋–ป๊ฒŒ ๋˜๋‚˜?
1. controller ์—์„œ๋Š” linkstate info๋ฅผ ๋ฐ”๊พผ๋‹ค
2. networl graph๊ฐ€ ๋ฐ”๋€๋‹ค.
3. flow table์ด ๋ฐ”๋€๋‹ค (update ๋œ info๋กœ)

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