p2p通信中的一些基本概念

来源:互联网 发布:sql 字段不重复 编辑:程序博客网 时间:2024/06/05 16:58
SIP: 这个最早发明,使用UDP在网络上进行传输数据,进行End to End通信
STUN和TURN: 但是有些网络中有NAT, 这时无法拿到End的地址,所以需要穿墙,根据不同的NAT种类发明了不同的STUN和TURN两种穿墙机制。
ICE: 如果要穿过所有的NAT,怎么办?于是对STUN与TURN进行综合,发明了ICE, 这样穿过了所有的NAT.
最终,采用SIP和ICE,就可以进行End-to-End的通信了。stun为RFC3489,RFC5389,  NAT类型定义在RFC3489和RFC4787中。turn为RFC5766,ICE为RFC5245
ICE-TCP: 以上的都是采用UDP通信,这多不爽,于是有人就开始研究采用TCP通信方式,就有了ICE-TCP,目前还没有开发出标准来呢!!!
2013.2.27

UPNP/NAT-PMP/PCP:

NAT穿透可以使用微软提出的一种解决方案就是UPNP。UPNP不仅仅用于NAT穿透,NAT穿透只是UPNP中IGD部分。PC作为controller,而路由器作为device,这样就可以对路由器的NAT进行动态的配置。参考资料:http://en.wikipedia.org/wiki/Internet_Gateway_Device_Protocol

苹果公司根据UPNP提出了一种相似的方案NAT-PMP,就是RFC6886。IETF在RFC6886的基础上进行了革新,提出了PCP即RFC6887
参考资料:http://en.wikipedia.org/wiki/NAT_Port_Mapping_Protocol
 2013.9.25

TURN specs:

  • RFC 5766 - base TURN specs
  • RFC 6156 - IPv6 extension for TURN
  • Experimental DTLS support as client protocol.

STUN specs:

  • RFC 5389 - base "new" STUN specs
  • RFC 5769 - test vectors for STUN protocol testing
  • RFC 5780 - NAT behavior discovery support
  • RFC 3489 STUN1
2013.2.28
一些库:
  • mystun: STUN server and client library from the iptel.org guys. Old but mature. License: GPL, Homepage:http://developer.berlios.de/projects/mystun/. You have to download the file via CVS.
  • Vovida STUN server (stund): STUN server and client library/application for Linux and Windows from the Vovida guys. Old but mature. License: Vovida Software License 1.0, Homepage:http://sourceforge.net/projects/stun/.
  • WinSTUN: A Windows STUN client, part of the Vovida STUN server (see above). A nice application to test your NAT box. Homepage: http://sourceforge.net/projects/stun/files/WinStun/.
  • reTurn: STUN/TURN server and client library, part of the resiprocate project. Server application is provided as well, but it seems incomplete (authentication). License: 3-clause BSD license. Homepage:http://www.resiprocate.org/ReTurn_Overview.
  • restund: STUN/TURN server, supports authentication against a mysql DB. License: 3-clause BSD license. Homepage: http://www.creytiv.com/restund.html.
  • TurnServer: STUN/TURN server. License: GPL3. Homepage: http://turnserver.sourceforge.net/.
  • PJNATH : Open Source ICE, STUN, and TURN Library,http://www.pjsip.org/pjnath/docs/html/
  • Numd:a free STUN/TURN serve,  http://numb.viagenie.ca/
  • TURN Server http://code.google.com/p/rfc5766-turn-server/

    libre www.creytiv.com/re.html
    libnice nice.freedesktop.org/
    PJNATH www.pjsip.org/pjnath/docs/html/
    libpupnp:http://sourceforge.net/projects/pupnp/
    miniupnp: miniupnp.free.fr/
    gupnp: gupnp.org/
    http://sourceforge.net/projects/stun(这里只有stun,没有ICE的过程,但是可以通信.,相互之间,不明觉厉)

    2013.3.13


原创粉丝点击