컴퓨터 네트워크

4.5 IPv6 & SDN

SWSEODONG 2021. 6. 12. 14:31

IPv6

IPv4와의 차이를 아는 것이 중요.

IPv4 헤더에 있는 checksum은 Payload에 있는 전체 field에 대해 integrity check를 한다.

⇒ F. IPv4 헤더에 있는 checksum 필드의 이름은 headerCheckSum. header에 대해서만 checksum을 수행. Payload에 대해서는 하지 않음.

IPv4 router가 fragmented된 패킷을 assembly한다.

⇒ F. router에서는 assembly하지 않고, host에서 수행.

initial motivation: speed processing/ forwarding

IPv6가 생겨날 때 쯔음 fiber optic이 발달하며 error rate이 줄어들어 checksum field를 없애 버림.

IP fragmentation도 수행하지 않음. outlink bandwidth가 작을 경우 drop 하고 ICMP로 송신자에게 report.

no fragmentation allowed at router but enabled at host (host는 IPv6도 fragmentation을 수행)

IPv6 addressing (x:x:x:x:x:x:x:x, x = 16 bits)

128-bit address is represented as 16-bit hexadecimal fields(0-F) separated by colons.

IPv4와 다르게, NIC 하나에 여러 개의 IPv6 addresses들이 할당될 수 있다.

unlike IPv4, multiple IPv6 addresses can be allocated to one NIC card.

IPv6 datagram format

IPv4의 fixed 되지 않은 20 byte헤더와 달리 IPv6는 fixed된 40 byte 헤더를 가짐.

주소가 길어진 것이지 기능은 더 줄어듦. (128 bits src addr, dest addr = 16 byte + 16 byte = 32 byte)

flow label: 20 bit할당. 패킷들의 flow를 조절하려고 함. 실패

next hdr: data field에 another header가 들어올 수 있음. (header를 가리키고 이어져 extension 가능)

hop limit: ghost traffic을 잡는 TimeToLive와 같음.

Chaining Extension Headers in IPv6 Packets

data field에 있는 것이 다른 protocol의 메시지가 아니라 또다른 IPv6 header일 수 있음.

IPv4 vs. IPv6

Option과 padding이 없어짐.

header가 고정되어 있으니 header length 필요 없음. (버전만 확인하고 40 byte 확 읽으면 됨)

host에선 해도 router에서는 fragmentation 하지 않으니 frag 필드 필요 없음 (id, flags, offset)

고품질로 발전되어 링크가 error이 거의 없으니 checksum 필드 뺐음.

Time to live → Hop limit

Type of Service → Traffic Class

Total length → Payload length

Upper layer Protocol → next header

Transition from IPv4 to IPv6

어떻게 network가 IPv4와 IPv6 모두에게 작동하도록 만들까?

  1. Dual Stack
    router가 하나의 interface에 두 주소를 모두 setting.
  2. NAT-PT (NAT-protocl translation)
    protocol translation btw. IPv4, IPv6. (Payload 안의 주소도 필요시 바꿔줘야 함)
  3. Tunneling !!!
    IPv6 datagram carried as payload in IPv4 datagram<img width="1021" alt="스크린샷 2020-12-13 오전 12 45 25" src="https://user-images.githubusercontent.com/45806836/101988370-7f3b5a80-3cdc-11eb-972d-0d1f03a0ecad.png"> IPv6의 datagram을 IPv4 datagram 안의 Payload에 encapsulate. 마치 Layer2 frame처럼. <img width="984" alt="스크린샷 2020-12-13 오전 12 46 54" src="https://user-images.githubusercontent.com/45806836/101988411-b3af1680-3cdc-11eb-9bad-64660eeb4849.png"> IPv4 Payload = IPv6 Packet, 접목하는 지점에는 어쨌든 Dual stack이 필요함. IPv4를 터널처럼 지나감.

4.4 Generalized Forward and SDN

routing protocol은 한 가지 일만 한다. destination based forwarding을 어디로 할지 결정.

router들은 서로 정보를 주고 받을 뿐이지, path selection 알고리즘도 각각의 라우터에서 running.

중앙에서 router들을 모두 보고 forwarding + a의 제어를 할 수 있다면? (기존 라우터의 middleware 기능)

Logically centralized control plane

Software-Defined Networking (SDN)

logically-centralized routing controller는 기존 라우터의 middleboxes기능과 link-layer function까지 모두 통합. (Single Point of Failure을 대비해 여러 개의 서버를 하나인양 logically라고 함)

OpenFlow data plane abstraction

flow: Match를 볼 때 flow 단위로 볼 수 있다.

generalized forwarding: simple packet-handling rules

  • Pattern: Match values in packet header fields
  • Actions: for matched packet: drop, forward, modify, matched packet or send matched packet to controller
    Priority: disambiguate overlapping patterns
    Counters: #bytes and #packets