CN102571797A - Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP) - Google Patents

Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP) Download PDF

Info

Publication number
CN102571797A
CN102571797A CN2012100115307A CN201210011530A CN102571797A CN 102571797 A CN102571797 A CN 102571797A CN 2012100115307 A CN2012100115307 A CN 2012100115307A CN 201210011530 A CN201210011530 A CN 201210011530A CN 102571797 A CN102571797 A CN 102571797A
Authority
CN
China
Prior art keywords
stun
nat
upnp
port mapping
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012100115307A
Other languages
Chinese (zh)
Other versions
CN102571797B (en
Inventor
何建亿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian chuanggao Zhilian Technology Co.,Ltd.
Original Assignee
何建亿
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 何建亿 filed Critical 何建亿
Priority to CN201210011530.7A priority Critical patent/CN102571797B/en
Publication of CN102571797A publication Critical patent/CN102571797A/en
Application granted granted Critical
Publication of CN102571797B publication Critical patent/CN102571797B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP). Port mapping request is sent to network address translation (NAT) through an UPnP port mapping client-side. If the port mapping request succeeds, port mapping successively established by the UPnP on the NAT is fed back to nodes. Established port mapping is transmitted to a STUN client-side to as to establish heartbeat message connection with an STUN server. If feedback data cannot be obtained, the STUN client-side is started to be connected with the STUN server to obtain ports. The nodes acquire external ports of the NAT from the position of the STUN client-side. The nodes are exchanged with peer nodes about external addresses and ports established on the NAT through an XML-based messaging and presence protocol (XMPP) or a session initiation protocol (SIP). The method for improving the penetration rate and the stability of the STUN-P2P through the UPnP has high efficiency of the UPnP and the penetrability of the STUN, enables connection success rate of the P2P to be improved and to be fast and stable, improves the stability of connection between network devices and users, thereby improving zero configuration of the nodes or using practical applicability of plug and play devices.

Description

A kind of method of improving STUN-P2P penetrance and stability through UPnP
Technical field
The invention belongs to the network multimedia technology field.
Background technology
Set up P2P (peer-to-peer network) connection basis and in NAT (network address translation), set up the address, inside and outside (perhaps being referred to as port mapping) of node exactly, thereby node can be received from the connection of initiating outside the NAT.Two kinds of P2P nat port mappings of main flow are at present set up standard and are: 1, UpnP (UPnP) agreement; 2, STUN (the UDP simple traversal of NAT) agreement.The UPnP agreement has the simple advantage of realization, and the network node that is linked into the NAT back can be set up the port mapping of appointment through the SOAP interface that the UPnP agreement is provided on NAT, and obtains the external address and the port of this mapping; Because being the internal network communication through local area network (LAN), the process of setting up port mapping this moment realizes, so the speed of setting up is fast and stable; But its shortcoming is: not every router is all supported UPnP function, restricted application.Simple Traversal of UDP Through Network Address Translators is a kind of P2P nat port mapping techniques based on the Internet; Node in the NAT back is given the STUN server that operates in the NAT outside through sending the STUN packet; The STUN server is tested external address and the port that this node package is distributed through reflection technology on NAT then; If these reflection packages can be forwarded to inner node smoothly from the NAT outside, then Simple Traversal of UDP Through Network Address Translators will successfully have been set up the address and the port mapping of an external-to-internal on NAT.Simple Traversal of UDP Through Network Address Translators does not rely on the inside of NAT and specifically realizes; Thereby can on any NAT, set up correct inside and outside port mapping in theory; But in the running environment of reality, NAT can be very strict, such as not allowing outside connection to be forwarded into inside; And the nat port of being set up is mapped with very short life cycle; So need to send message constantly between STUN client and the STUN server of node, and bring in constant renewal in port mapping, thus Simple Traversal of UDP Through Network Address Translators have than settling time of long port mapping be connected shortcoming such as instability.
The P2P technology is widely used in the network application system based on the Internet, like remote File Management System (connecting the network storage equipment the family from the PC of office), the real-time video monitoring of IP Camera and video file download and long-range playback system etc.In the network service of reality, Peer node (peer node) is the node in private network often, is positioned at after the fire compartment wall.Like this, the key issue that direct communication need solve between Peer and the Peer is passing fire wall and NAT.Because fire compartment wall can filter IP; Limited outer within the walls connection; Though and the NAT technology can require internal network at first to initiate external connection so that internal network address is mapped to outside network address, otherwise outside network device can't reach internal network.Main flow strategy and the standard agreement of passing fire wall and NAT are STUN; Node after fire compartment wall and NAT is through the STUN server; Set up the inside of node and the mapping table of outside ip address respectively, and through the outer agreement of other band (like XMPP, SIP) etc.; The external address of switching node connects thereby set up two internodal P2P each other.But the prerequisite that this P2P connects is the NAT or the fire compartment wall at node place allows to set up the port mapping of stable, transparent external address to home address; When this condition did not satisfy, two nodes just must carry out data forwarding by the outer forward node of NAT.In the P2P IP Camera supervisory control system based on the Simple Traversal of UDP Through Network Address Translators realization, find following phenomenon and data according to the test result of reality:
1, the inside and outside map addresses that has the NAT that surpasses 20% or more or fire compartment wall can not set up node promptly can not be set up play end and link to the P2P data of web camera end.
The all default support of home router of 2, newly dispatching from the factory is at present also opened UPnP port mapping function, and this function can make the network equipment in the home network on NAT, set up stable inside and outside address port mapping apace through the UPnP function.
Summary of the invention
The objective of the invention is for solving the problem that above-mentioned prior art exists, provide a kind of and improve the method for Simple Traversal of UDP Through Network Address Translators P2P penetrance and stability through UPnP, the settling time that makes the Simple Traversal of UDP Through Network Address Translators port mapping fast and connect stable.
For realizing above-mentioned purpose, technical scheme of the present invention is to adopt following steps:
The 1st step:, initiate the port mapping request to NAT through node UPnP port mapping client;
The 2nd step: if the port mapping successful request, feedback UPnP successfully sets up port mapping and gives node on NAT; Go on foot if can not obtain feedback data then change the 4th over to, connect the STUN server and obtain port;
The 3rd step: the port mapping that will set up is passed to the STUN client, sets up heartbeat message with the STUN server and is connected;
The 4th step: as not obtaining the feedback data in the 2nd step, then start the STUN client and be connected, obtain port with the STUN server;
The 5th step: node obtains the outside port of NAT from the STUN client;
The 6th step: through XMPP or Session Initiation Protocol, with its peer node exchange its external address of on NAT, setting up and port.
Compared with prior art; The present invention is with a kind of mode through integrated UPnP client and Simple Traversal of UDP Through Network Address Translators client; Ensure when node is set up the P2P port mapping on NAT, have the high efficiency of UPnP and the penetrability of STUN, make P2P connect into power raising and more stable more fast; Improved connection stability between the network equipment and the user, thus " zero be provided with " that also improved node perhaps use practicality of " plug and play " equipment.
Description of drawings
Below in conjunction with accompanying drawing and embodiment the present invention is done further explain;
Fig. 1 is a control flow chart of the present invention;
Among the figure: A, UPnP port mapping client; B, NAT; C, STUN server; 1-6, step number.
Embodiment
The present invention is made up of customized STUN client (can accept the nat port mapping of appointment) and the control program of process that operates in UPnP port mapping client on the network equipment node, operate on the network equipment node.Referring to Fig. 1, concrete steps of the present invention are following:
The 1st step: through node UPnP port mapping customer end A, to NAT BInitiate the port mapping request.
The 2nd step: if the port mapping successful request, feedback UPnP successfully sets up port mapping and gives node on NAT.Go on foot if can not obtain feedback data then carry out the 4th, connect STUN server C and obtain port.
The 3rd step: pass to the STUN client to the above port mapping of having set up,, set up heartbeat message etc. with the STUN server and be connected with optimization STUN client.The STUN client here is an emphasis, can accept the nat port mapping of appointment through the STUN client of optimizing, can the effective port of fast mapping, and obtain with data source and to be connected.
The 4th step: as not obtaining the feedback data in the 2nd step, then start the STUN client and be connected, obtain port with the STUN server.
The 5th step: accomplish after the 4th step, node obtains the outside port of NAT from the STUN client.
The 6th step: through agreements such as XMPP or SIP, with its peer node exchange its external address of on NAT, setting up and port.
No matter be to be performed in the 2nd step or the 4th step; Node all obtains the outside port mapping of NAT and passes through agreements such as XMPP or SIP from the STUN client of this locality; With its peer node exchange its external address of on NAT, setting up and port, ensured the penetrance and stability of P2P.

Claims (1)

  1. One kind through UPnP improve the STUN-P2P penetrance with stability method, it is characterized in that adopting following steps:
    The 1st step:, initiate the port mapping request to NAT through node UPnP port mapping client;
    The 2nd step: if the port mapping successful request, feedback UPnP successfully sets up port mapping and gives node on NAT; Go on foot if can not obtain feedback data then change the 4th over to, connect the STUN server and obtain port;
    The 3rd step: the port mapping that will set up is passed to the STUN client, sets up heartbeat message with the STUN server and is connected;
    The 4th step: as not obtaining the feedback data in the 2nd step, then start the STUN client and be connected, obtain port with the STUN server;
    The 5th step: node obtains the outside port of NAT from the STUN client;
    The 6th step: through XMPP or Session Initiation Protocol, with its peer node exchange its external address of on NAT, setting up and port.
CN201210011530.7A 2012-01-16 2012-01-16 Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP) Active CN102571797B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210011530.7A CN102571797B (en) 2012-01-16 2012-01-16 Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210011530.7A CN102571797B (en) 2012-01-16 2012-01-16 Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP)

Publications (2)

Publication Number Publication Date
CN102571797A true CN102571797A (en) 2012-07-11
CN102571797B CN102571797B (en) 2015-03-18

Family

ID=46416272

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210011530.7A Active CN102571797B (en) 2012-01-16 2012-01-16 Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP)

Country Status (1)

Country Link
CN (1) CN102571797B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516795A (en) * 2013-09-26 2014-01-15 传线网络科技(上海)有限公司 Distributed network connectivity improving method and distributed network utilizing method
CN106210092A (en) * 2016-07-19 2016-12-07 天彩电子(深圳)有限公司 A kind of P2P traversing method merging UPNP and STUN and system thereof
CN108123912A (en) * 2016-11-28 2018-06-05 央视国际网络无锡有限公司 A kind of micro services system for supporting P2P
CN113179315A (en) * 2021-04-26 2021-07-27 缀初网络技术(上海)有限公司 Method, system and readable storage medium for providing communication between devices in multiple local area networks

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557388A (en) * 2008-04-11 2009-10-14 中国科学院声学研究所 NAT traversing method based on combination of UPnP and STUN technologies
CN101977249A (en) * 2010-10-27 2011-02-16 北京易视腾科技有限公司 Method for penetrating NAT (Network Address Translation) equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557388A (en) * 2008-04-11 2009-10-14 中国科学院声学研究所 NAT traversing method based on combination of UPnP and STUN technologies
CN101977249A (en) * 2010-10-27 2011-02-16 北京易视腾科技有限公司 Method for penetrating NAT (Network Address Translation) equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
任浩等: "UPnP和STUN相结合的NAT穿越技术研究", 《计算机工程与应用》 *
邓勇等: "一种SIP穿越NAT的解决方案", 《小型微型计算机系统》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516795A (en) * 2013-09-26 2014-01-15 传线网络科技(上海)有限公司 Distributed network connectivity improving method and distributed network utilizing method
CN103516795B (en) * 2013-09-26 2015-06-10 传线网络科技(上海)有限公司 Distributed network connectivity improving method and distributed network utilizing method
CN106210092A (en) * 2016-07-19 2016-12-07 天彩电子(深圳)有限公司 A kind of P2P traversing method merging UPNP and STUN and system thereof
CN106210092B (en) * 2016-07-19 2019-08-06 天彩电子(深圳)有限公司 A kind of P2P traversing method and its system merging UPNP and STUN
CN108123912A (en) * 2016-11-28 2018-06-05 央视国际网络无锡有限公司 A kind of micro services system for supporting P2P
CN108123912B (en) * 2016-11-28 2020-07-10 央视国际网络无锡有限公司 Micro service system supporting P2P
CN113179315A (en) * 2021-04-26 2021-07-27 缀初网络技术(上海)有限公司 Method, system and readable storage medium for providing communication between devices in multiple local area networks
CN113179315B (en) * 2021-04-26 2022-11-29 缀初网络技术(上海)有限公司 Method, system and readable storage medium for providing communication between devices in multiple local area networks

Also Published As

Publication number Publication date
CN102571797B (en) 2015-03-18

Similar Documents

Publication Publication Date Title
CN101309237B (en) Home gateway, system and method for remotely sharing multimedia data
US9973567B2 (en) System and method for terminal management in a home network using a virtual client
US8560607B2 (en) Method based on the combination of the UPnP and STUN for NAT traversal
CN105376299B (en) Network communication method, equipment and network attached storage equipment
CN101699801B (en) Data transmission method and virtual peer-to-peer network for data transmission
CN103107983B (en) Data management method of network system and related system thereof
CN106604119B (en) Network penetration method and system for private cloud equipment of smart television
US8526352B2 (en) Method of controlling an entity of a remote network from a local network
US20150089025A1 (en) Method And Apparatus For Sharing DLNA Device
TWI565261B (en) Network address translation traversal system and method for real-time communications
US8832285B2 (en) Method and apparatus for providing remote access service
CN102571797B (en) Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP)
WO2019184262A1 (en) Multi-type media data network address translation traversing method, terminal and system
CN102291473B (en) NAT (Network Address Translation) penetrating method of home network equipment management system
Hwang et al. Personal mobile A/V control point for home-to-home media streaming
US8379533B2 (en) Universal plug and play method and apparatus to provide remote access service
CN101212449B (en) Method for normal operation of IP extension telephone under FW/NAT multiple-port mapping condition
TWI574536B (en) Domain name resolution using web address translation
Zhang et al. A NAT traversal mechanism for peer-to-peer networks
Arslan et al. A New State-Based Connectivity Model for Peer-to-Peer Networks
Lin et al. TT-STUN protocol design for effective TCP NAT traversal
TW201545502A (en) Policy management device of network connection and method thereof
KR101082851B1 (en) System and method for p2p connection based on udp
Chen et al. An efficient source allocation approach for QoS support in p2ptv systems
Tien et al. H-box: Interconnecting devices across local networks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20160225

Address after: 212006 Zhenjiang city of Jiangsu province science and technology park by twelve Dingmao Road 99, 41 floor of Building 2

Patentee after: Jiangsu Wanlian new trillion Mdt InfoTech Ltd (foreign joint ventures)

Address before: 212009 Zhenjiang City, Jiangsu province science and Technology Park Dingmao Road No. 470 room 955 twelve

Patentee before: He Jianyi

TR01 Transfer of patent right

Effective date of registration: 20210312

Address after: 350000 617, overseas Chinese Pioneer Park, 108 Jiangbin East Avenue, Fuzhou Development Zone, Fuzhou City, Fujian Province

Patentee after: CHUANGO SECURITY TECHNOLOGY Corp.

Address before: 212006 2nd floor, building 41, 99 jing12 Road, Dingmao science and technology new town, Zhenjiang City, Jiangsu Province

Patentee before: Jiangsu Wanlian Xinzhao Information Technology Co.,Ltd. (foreign joint venture)

TR01 Transfer of patent right
CP03 Change of name, title or address

Address after: 350000 6th floor, building 3, Fuzhou Internet of things industrial innovation and development center, No. 136, Kuiqi Road, Mawei District, Fuzhou City, Fujian Province

Patentee after: Fujian chuanggao Zhilian Technology Co.,Ltd.

Address before: 350000 617, overseas Chinese Pioneer Park, 108 Jiangbin East Avenue, Fuzhou Development Zone, Fuzhou City, Fujian Province

Patentee before: CHUANGO SECURITY TECHNOLOGY Corp.

CP03 Change of name, title or address