CS/Network

logically centralized control SDN controllers - OpenFlow, ICMP, SNMP

WakaraNai 2021. 12. 6. 11:09
728x90
반응형

SDN : software defined networking

<SDN이 나온 계기>

기존의 internet network  layer는 distributed, per-router approach를 통해서 구현됨이는 monolithic router로 : switching hardware + protocol  + router OS를 다 모아버린 것

 

여기에 차별점을 두고자network layer에 middlebox를 두어

firewalls, load balancers, NAT boxes, .. 등의 기능을 구현할 수 있도록 함

 

 

<목표하는 것>

왜 logically centralized control plane을 필요로 하는가?

  • control plane의 물리적 분리를 통해 open시키기 (non-proprietary) (HW, protocol, OS 분리)
  • router를 programmable 하게 만들기 - flow tables 계산을 중앙에서 계산 후 분배
  • network management를 좀 더 용이하게

 

<그럼 기존의 routing은 어떤 어려움이 있었을까?>

  • network operator가 u-z traffic flow (uvwz)와 x-z traffic flow (xwyz)를 원해도 구할 수 없음 -
  • u에서 시작된 건 초록색 선, x에서 시작된 건 빨간색 선
  • 이 때 w 입장에서 초록색 선을 빨간색 쪽으로 구분 못해서 보내버리게 됨

 

  • load balancing을 위해 u에서 양쪽으로 보내는 것 또한 불가능 . 새로운 routing algorithm 필요
전통적인 IP 네트워크에서는
동일한 목적지로의 트래픽은
모두 동일한 경로를 경유하게 되지만

SDN 네트워크에서는
traffic engineering의 목적으로
동일한 목적지로의 트래픽이라도
다른 경로로 라우팅할 수 있다.

 

SDN Architecture

SDN은 flow-based forwarding을 함

원래는 destination-based 였음

 

control/data plane 분리

control plane function 이 두 계층으로 나뉨 (remote controller + control application)



data plane : SDN controlled switches

data plane은

SDN-controlled switches로 구성됨 (Data plane switches)

빠르고 단순한 forwarding 을 담당

flow table을 controller에 의해 계산되어 installed 됨

 

southbound API 를 이용해 control plane 중 SDN controller와 소통

 

control plane 1 : SDN controller (network OS)

network state info를 유지

northbound API를 통해 위쪽 network control application과 소통

southbound API를 통해 아래쪽 network switches와 소통

performance, scalability, fault-tolerance, robustness 을 위해 분산 시스템으로 구현

 

control plane 2: control applications

network-control applications에는

routing, access control, load balance 등이 있다

 

“brains of control” : northbound API를 통해…

unbundled(별도로) : control plane의 분리

 


Components of distributed SDN controller (자세히 살펴보기)

communication layer (= southbound API)

OpenFlow나 SNMP등은 SDN network에서

모두 SDN controller와 switch 사이의 communication을 위한 protocol

(openflow는 새롭게 만들어졌고 SNMP는 기존에 있던 것을 여기에 맞게 만듦)

 

network-wide state management layer

network의 link, switches 등의 상태 정보를 수집하여

distributed database로 보냄

distributed로 보내야

robust 극복 등의 접근 효율성을 높일 수 있다

(SDN network에서 network wide state information management는 

SDN controller에 의해 이루어진다.)

 

interface layer to network control apps

interface, abstractions for network control apps

 


OpenFlow protocol

OpenFlow는 SDN controller와 switch 간의 communication protocol 표준이다.

TCP 위에서 동작

 

3종류의 OpenFlow messages

<controller-to-switch messages>

운좋게도 network는

직접 openflow msg를 생성/송신하며 switching을 하지 않음

대신에 controller에서 더 높은 수준의 추상화를 사용 

  • configuration : controller가 query/ set config param
  • modify-state : add/delete/modify flow entries,  / set switch port properties
  • read-state : queries statistics, counter values
  • send-packet : send packet out of specific switch port

<switch-to-controller messages>

  • flow-removed : entry deleted at switch when timeout or receive modify-state msg
  • port status : inform controller when in port status
  • packet-in : transfer packet to controller (통제권을 넘김)

 <Symmetric(misc.)>


  1. S1은 OpenFlow를 사용하다 link failure 감지. port status msg로 controller에게 알림
  2. SDN controller는 OpenFlow msg를  받고 link status info를 update
  3. link status 변화로 Dijkstra’s routing algorithm application이 호출됨.
  4. Dijkstra’s routing algorithm 은 controller 속 network graph info, link state info 에 접근하여 새로운 경로를 계산해냄
  5. flow-table을 새로 계산하여 update
  6. 업데이트를 반영하기 위해, 즉 controller는 다른 router에서도 변경하기 위해 OpenFlow 이용







routing algorithm이 변경된다면
각자를 다 upload해야하지만

SDN을 사용하면
모든 switch를 변경 시킬 필요가 없음
application, DB와 abstraction, interface만 변경시키면 됨
덕분에 새로운 application, router의 도입이 용이해짐

 


ICMP: The Internet Control Message Protocol (report error)

 

ICMP는

네트워크 라우터가

호스트 특히 source host에 오류를 보고하는데

사용되는 프로토콜이다.

ICMP msg는 IP datagram을 옮긴다

 

host & router 소통을 network 수준에서

  • error reporting : 이 정보를 type과 code로 표현하여 알림
  • echo request/reply : ping application을 통해

 

살아있는지,

loss 되진 않았는지 등 확인용으로도 ICMP 사용

ICMP message: type, code plus first 8 bytes of IP datagram causing error

 

OpenFlow TCP 위에서 동작하고
ICMP
 IP 위에서 동작하고 (==carried on IP datagram)
SNMP UDP 위에서 동작한다.
+) DHCP : UDP



 

Traceroute and ICMP

src->dest 경로 상 

router와 각 router 별 delay를 알기 위해

3 probe를 보내면서 체크했음

 

이 때 traceroute로 ICMP를 사용

src가 probe로

UDP segment 3개를 한 세트로

dest에게 보냄

(IP Header) 첫번째 세트의 TTL 은 1로 설정하여 보냄. 두번째는 2로.

(UDP segment) unlikely port number: traceroute에서는 dest port가 아닌, 실재하지 않는 port 번호를 씀. 

src에게 TTL expired ICMP를 보냄 = (type=11, code=0)

이 ICMP msg에는 그 router의 이름과 IP address가 들어있음

그럼 3개의 probes를 보낸 시점과 TTL expired를 받은 시점을 계산하여 delay 알아냄

 

dest까지 UDP segment(probe)가 도착해버려도

unlikely port number로 왔기에 port unreachable = (type=3, code=3)로 답신

source는 이걸 받고 stop

 

Traceroute application program은 
"destination port unreachable" ICMP 메시지를 받을 때까지 
계속 TTL을 하나씩 증가시켜
패킷을 전송한다
특정 서버가 접속이 되지 않을 때 확인 할 수 있는 유용한 명령어 사용법 설명
- ping: 목적지 서버를 통하는 네트워크 상태를 체크
- telnet: 목적지 서버의 해당 어플리케이션까지 살아 있는지 확인
- traceroute: 출발지와 목적지 사이의 라우터를 모두 추적
출처 : https://data-pioneer.tistory.com/4 

SNMP : network management

SNMP : Simple Network Management Protocol

 

HW/SW 컴포넌트의 상호작용을 돕는 autonomous systems, 즉 network.

여기에는 monitoring과 control 기술이 필요

 

<network management protocol>

  • deployment, integration, coordination of hw/sw/human
  • monitor, test, poll, configure, analyze, evaluate, control
  • real-time으로, 동작가능한 성능, quality of service under reasonable cost
  • ex) SNMP 

<Infrastructure for network management>

network management protocol : agent와 managing server 간 통신

managed object는 MIB(Management Information Base)에 데이터를 축적해둠

managed device는 managed object를 포함

<4 components of network management>

  • Network management protocol
  • Managing server
  • Management Agent
  • Managed device (host, router, switch, middlebox, modem, thermometer..) or Managed objects
  • Management information base (MIB) – might be a counter(횟수),
    • 예를 들어 IP 데이터그램 헤더의 오류로 인해 경로에서 폐기되는 IP 데이터그램 수 
    • 또는 호스트에서 수신되는 UDP 세그먼트 수 등이 있습니다

 

SNMPv2

UDP 위에서 동작하기에 application layer protocol

주기적으로 msg를 주고받거나 단발적인 msg로 소통해서 UDP

 

SNMP는 managing server와 managed device에 설치된 agent 간의 communication protocol이다.

SNMP : managing server와 agent 사이 control info msg를 주고받는 protocol

 

type1 ) request/response mode
(modify 같은 query 등)

type2 ) trap mode
trap msg: 상태 변화를 보고 (event 발생 시)

 

728x90
반응형