Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

NAT Traversal and P2P

1,038 views

Published on

NAT Traversal and P2P

Published in: Technology
  • If you want to download or read this book, copy link or url below in the New tab ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

NAT Traversal and P2P

  1. 1. NAT Traversal and P2P Jung-In.Jung (call518@gmail.com) 1
  2. 2. Background • UDP 기반의 P2P 애플리케이션과 NAT는 상극 • P2P=피해자 / NAT=가해자 • “NAT 내부의 단말은 외부의 연결요청 수신이 불가능 하다.” • ex) 대표적 이슈 • 서로 다른 NAT에 속한 2대의 단말이 상호간 직접 통신 불가 • NAT는 내부 네트워크를 추상화 • A→B 커넥션 시도는 B의 NAT-B가 차단 • B→A 커넥션 시도는 A의 NAT-A가 차단 2 NAT-A NAT-B A B X X ? ?
  3. 3. What is NAT • NAT = Network Address Translation • Private Network에 위치하는 단말이 Public Network(인터넷)와 통신 이 가능하도록 상호 간에 연결 시켜 주는 기능. • “Binding Table” & “Filtering Table” • NAT 종류 • Basic NAT • IP 변환 (Layer3) • 1:1 translation (1 = Public IP, 1 = Private IP) • NAPT (Network Address Port Translation) • IP/Port 변환 (Layer4) • 1:N translation (1 = Public IP, N = Private IP) • 현재 사용되는 대부분의 NAT장비/공유기 3
  4. 4. Mapping Behavior NAT Behavior Requirement 4
  5. 5. Mapping Behavior • Address and Port Mapping • IP Address Pooling • Arbitrary (pre Session) • Paired (pre Host) • Port Assignment • Port Preservation • Port Overloading • No Port Overloading • No Port Preservation • Port Assignment Rule (Port Range) • Mapping Timer (Binding Refresh Timer) • Mapping Refresh Behavior • NAT Outbound refresh behavior of "True“ • NAT Inbound refresh behavior of "True" 5
  6. 6. Address and Port Mapping EIM (Endpoint-Independent Mapping) • S-IP, S-Port 정보로 External Port 결정 • 출발지 정보만 동일하면 동일한 Port 할당 6 http://www.netmanias.com/ko/?m=view&id=blog&no=5833
  7. 7. Address and Port Mapping ADM (Address-Dependent Mapping) • S-IP, S-Port, D-IP 정보로 External Port 결정 7 http://www.netmanias.com/ko/?m=view&id=blog&no=5833
  8. 8. Address and Port Mapping APDM (Address and Port-Dependent Mapping) • S-IP, S-Port, D-IP, D-Port 정보로 External Port 결정 8 http://www.netmanias.com/ko/?m=view&id=blog&no=5833
  9. 9. Filtering Behavior NAT Behavior Requirement 9
  10. 10. Filtering Behavior EIF (Endpoint-Independent Filtering) • D-IP, D-Port 만 검사하여 ACCEPT 판단 • Inbound패킷과 Binding Entry의 D-IP, D-Port만 일치하면 허용 10 http://www.netmanias.com/ko/?m=view&id=blog&no=5839
  11. 11. Filtering Behavior ADF (Address-Dependent Filtering) • D-IP, D-Port, S-IP 만 검사하여 ACCEPT 판단 11 http://www.netmanias.com/ko/?m=view&id=blog&no=5839
  12. 12. Filtering Behavior APDF (Address and Port-Dependent Filtering) • D-IP, D-Port, S-IP, S-Port 전체 검사 후 ACCEPT 판단 12 http://www.netmanias.com/ko/?m=view&id=blog&no=5839
  13. 13. 9-Tyeps (4-Types) NAT Types 13
  14. 14. NAT Types • by Behavior 14 http://www.netmanias.com/ko/?m=view&id=blog&no=6263
  15. 15. NAT Types • RFC 3489 (2003년) → RFC 5389 (2008년) → RFC 5780 (2010년) • Mapping/Filtering Behavior 조합을 통해, 총 9가지 NAT 타입 가능 15 http://www.netmanias.com/ko/?m=view&id=blog&no=5847
  16. 16. Technique NAT Traversal 16
  17. 17. ITEF Standard for NAT Traversal ITEF Standard • STUN (Session Traversal Utilities for NAT) • 단말 스스로가 NAT의 존재 유무, NAT 타입식별, External IP/Port 정보를 찾아내도록 도와주는 프로토콜이다. • STUN 서버, STUN 클라이언트(단말)로 구성 • NAT 이슈를 단말이 능동적으로 해결 (NAT Type에 제한적) • TURN (Traversal Using Relay NAT) • 단말들은 공중망에 위치한 TURN 서버와 세션을 설정 • TRUN 서버가 단말간 통신을 중계 • Symmetric NAT(APDM+APDF) 환경에서 통신 가능한 유일한 방법 • ICE (Interactive Connectivity Establishment) • STUN/TURN을 사용할 때 P2P 방식을 통해 최적의 라우팅 제공 기법 • 세션 설정 과정에서 가능한 모든 S-IP를 동원하여 시그널링 시도 • 주소들의 우선순위는 직접 통신 가능한 주소가 우선 • Local Address(Device) > NAT Address(STUN) > Relay Address(TURN) 17
  18. 18. NAT Traversal Technique Techniques • Relaying (TURN) • Connection Reversal • UDP Hole Punching 18
  19. 19. Relaying (TURN) • 개념 • 사설 IP 주소를 가지는 두 단말 간에 직접 통신이 불가능하여, 공인 IP 주소 를 가지는 외부 서버를 통해 P2P 데이터 패킷을 Relay하는 개념 • 최종 목적지(상대 단말) 정보는 Replay로 보내는 패킷의 Payload로 전달 • 장점 • NAT Behavior(Mapping/Filtering)와 관계 없이 모두(9-Types) 지원 • 단점 • 모든 P2P 데이터 패킷이 Relay 서버를 경유 • Relay 서버의 부하 증가 • Relay 서버의 네트워크 대역폭 이슈 발생 • Relay 서버가 분산 배치되지 않은 환경에서는 P2P 통신의 지연 발생 19
  20. 20. Relaying (TURN) 20 http://www.netmanias.com/ko/?m=view&id=blog&no=6264
  21. 21. Connection Reversal • 개념 • P2P통신을 하려는 두 단말 중 하나는 공인 IP를 가지는 경우 적용 가능 • Private단말→Public단말로의 연결은 문제 없음 (like Client→WebServer) • Public단말 →Private단말로의 연결은 NAT에 의해 차단됨 • 외부 Messaging 서버를 통해 Public단말이 Private단말로 하여금 자신에 게 연결을 하도록 유도(Reverse Connection Request in Payload)하여 NAT에 “Binding/Filtering Table” 테이블 생성 • 장점 • P2P 데이터 패킷이 Messaging 서버를 통하지 않는다 • NAT Behavior(Mapping/Filtering)와 관계 없이 모두(9-Types) 지원 • 단점 • P2P 단말 중 하나는 반드시 공인 IP 주소 필요 21
  22. 22. Connection Reversal 22 http://www.netmanias.com/ko/?m=view&id=blog&no=6264
  23. 23. Connection Reversal 23 http://www.netmanias.com/ko/?m=view&id=blog&no=6264
  24. 24. UDP Hole Punching • 개념 • 공중망의 Messaging서버를 통해 P2P 단말간 연결 지원 • 특징 • EIM-NAT타입만 지원 • Filtering Behavior은 모두 지원 • EIF과 EDF에 따라 미세한 차이 • 가장 효율적인 NAT Traversal 기법 24 EIF EDF (ADF/APDF) 1. 모든 단말은 Payload를 이용해 자신의 Private/Public 정보를 Messaging 서버에 전송/등록 2. Messaging 서버는 모든 단말의 Private/Public 정보를 보관 3. 각 단말들은 P2P통신을 위해 Messaging 에서 상대방 단말 정보 조회 4. Messaging서버는 Payload를 통해 각 단말에게 통신하고자 하는 상대방의 정보를 리턴 (조회 요청 단말과 조회 당한 단말 모두에게 동시 응답) 5. 각 단말은 리턴 된 Payload의 정보를 이용해 상대 단말로 상호 P2P 연결 시도 6. 연결 성공 6. 먼저 연결 시도된 단말은 1회 실패 7. 늦게 시도된 단말은 정상 연결 8. 1회 실패한 단말은 2회부터 정상 연결
  25. 25. UDP Hole Punching – EIM & EIF 25 http://www.netmanias.com/ko/?m=view&id=blog&no=6263
  26. 26. UDP Hole Punching – EIM & EIF 26 http://www.netmanias.com/ko/?m=view&id=blog&no=6263
  27. 27. UDP Hole Punching – EIM & EIF 27 http://www.netmanias.com/ko/?m=view&id=blog&no=6263
  28. 28. UDP Hole Punching - EIM & EDF 28 http://www.netmanias.com/ko/?m=view&id=blog&no=6263
  29. 29. UDP Hole Punching - EIM & EDF 29 http://www.netmanias.com/ko/?m=view&id=blog&no=6263
  30. 30. UDP Hole Punching - EIM & EDF 30http://www.netmanias.com/ko/?m=view&id=blog&no=6263
  31. 31. UDP Hole Punching - EIM & EDF 31 http://www.netmanias.com/ko/?m=view&id=blog&no=6263
  32. 32. UDP Hole Punching - Summary 32 http://www.netmanias.com/ko/?m=view&id=blog&no=6263
  33. 33. Closing References • NAT (Network Address Translation) 소개 (RFC 3022/2663) • NAT 장비는 이렇게 만들어야 하는데... (RFC 4787) - 1편: Mapping Behavior • NAT 장비는 이렇게 만들어야 하는데... (RFC 4787) - 2편: Filtering Behavior • NAT 장비는 이렇게 만들어야 하는데... (RFC 4787) - 3편: Deterministic Properties • P2P와 NAT: NAT 통과 기법 소개 (RFC 5128) - 1편: Relaying & Connection Reversal • P2P와 NAT: NAT 통과 기법 소개 (RFC 5128) - 2편: UDP Hole Punching • STUN(RFC 3489)과 STUN(RFC 5389/5780)의 차이 • STUN(RFC 3489)을 이용한 NAT Behavior Discovery NETMANIAS 후원 http://www.netmanias.com/ko/?m=view&id=sitenews&no=8335 33

×