CN106210092B - A kind of P2P traversing method and its system merging UPNP and STUN - Google Patents

A kind of P2P traversing method and its system merging UPNP and STUN Download PDF

Info

Publication number
CN106210092B
CN106210092B CN201610569140.XA CN201610569140A CN106210092B CN 106210092 B CN106210092 B CN 106210092B CN 201610569140 A CN201610569140 A CN 201610569140A CN 106210092 B CN106210092 B CN 106210092B
Authority
CN
China
Prior art keywords
nat
client
type
burrows
server
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.)
Active
Application number
CN201610569140.XA
Other languages
Chinese (zh)
Other versions
CN106210092A (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.)
Sky Light Industrial Ltd
Original Assignee
Sky Light Industrial Ltd
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 Sky Light Industrial Ltd filed Critical Sky Light Industrial Ltd
Priority to CN201610569140.XA priority Critical patent/CN106210092B/en
Publication of CN106210092A publication Critical patent/CN106210092A/en
Application granted granted Critical
Publication of CN106210092B publication Critical patent/CN106210092B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Abstract

The present invention relates to a kind of P2P traversing method and its system for merging UPNP and STUN, this method includes the NAT mapping that IPC carries out UPNP to local router;IPC carries out UPNP registration to service control server;IPC is to P2P server reporting equipment information and keeps heartbeat, completes P2P server registration;After APP obtains the UPNP information of specified IPC to service control server, using the IP address information of UPNP feedback to access IPC, the NAT mapping step for successfully returning to UPNP is accessed, until receiving off signal;Access failure, APP are interacted with P2P server, complete P2P server registration;APP and IPC completes the process that burrows of STUN with P2P server, establishes the channel P2P, and APP accesses IPC according to the channel got through;The NAT mapping step of UPNP is repeated, until receiving off signal.The present invention is by communication, first carrying out the communications access of UPNP, when access failure, carries out the access of STUN, and in conjunction with UPNP, P2P is easily successful under single layer routing and quickly burrows penetration capacity with enhancing STUN in Symmetric NAT, and the NAT for improving P2P passes through success rate.

Description

A kind of P2P traversing method and its system merging UPNP and STUN
Technical field
The present invention relates to the technical field of P2P communication, more specifically refer to that a kind of P2P for merging UPNP and STUN is passed through The system that method and the P2P for merging UPNP and STUN are passed through.
Background technique
NAT: the masking of network address translation (Network Address Translation), also referred to as network or IP are covered Cover (IP masquerading), be it is a kind of source IP address or destination IP are rewritten when IP package is by router or firewall The technology of location, this technology, which is commonly used, to be had multiple host but is only accessing the privately owned of internet by a public ip address In network.
P2P, that is, point-to-point communication, or be Peer-To-Peer, there is apparent area with traditional server client mode Not.In P2P network, the status of all communication nodes be all it is reciprocity, it is double that each node plays client-server Weight role realizes various function application by direct communication between node.
In reality, client host is usually located at behind NAT gateway, although NAT technology solves to a certain extent The problem of IPv4 Address Run Short, has all played certain effect in terms of building firewall, guarantee network security, has but destroyed end To the network communication at end.The reason of NAT hinders host to carry out P2P communication is that NAT does not allow outer net host actively to access interior host Machine, but P2P technology but requires communicating pair that can actively initiate to access, so to be carried out in NAT network environment effective P2P communication, just necessary passing through NAT, the solution of use are typically based on the agreements such as UPNP, STUN, TURN.
Universal plug and play (UPNP) is that one kind is connected for PC machine with the common peer-to-peer network of smart machine (or instrument) Architecture;STUN (the UDP simple traversal of Simple Traversal of UDP over NATs, NAT) is a kind of network Agreement, it allows the client after NAT (or multiple NAT) to find out the public network address of oneself, finds which kind of class oneself is located at After the NAT of type and NAT is internet side port bound in some local port;TURN (full name Traversal Using Relay NAT), it is a kind of data transmission agreement (data-transfer protocol), allows TCP's or UDP NAT or firewall are crossed on line.
But UPNP port mapping success or not, the function of UPNP whether is supported dependent on uncontrolled router model Can, and whether open this function, if P2P host is located under multilayer router relative to global network, UPNP can not Support the P2P main-machine communication across public network, and STUN has can not penetrate Symmetric NAT (SymmetricNAT) and similar The defect of Firewall equipment.TURN's is limited in that all messages all have to pass through TURNServer forwarding, increases packet Delay and a possibility that packet loss, and the network charges of TURN server are high.
Chinese patent 201010231283.2 disclose in a kind of P2P network application system private network detection with pass through it is compound Method, comprising the following steps: step 1 sets different priority, priority orders to tri- kinds of methods of UPNP, STUN, TURN Are as follows: UPNP, STUN, TURN;Then network locating for node is detected and is classified;Step 2, if testing result is aobvious Show that network environment locating for node can realize the opening to external node by UPNP technology, then realizes institute using UPNP technology The NAT for stating internal nodes of network is passed through;Otherwise step 3 is executed;Step 3 utilizes if network environment supports STUN technology STUN technology realizes that the private network of node passes through;Otherwise step 4 is executed;Step 4, if network environment supports TURN technology, Realize that the private network of node passes through using TURN technology.The open one kind of Chinese patent 201210011530.7, which passes through UPnP, to be improved The method of STUN-P2P penetrance and stability is asked by node UPnP port mapping client to the mapping of NAT initiating port It asks;If port mapping requests success, feedback UPnP is successfully established port mapping to node on NAT;By established port Mapping is transmitted to STUN client, establishes heartbeat message with STUN server and connect;Feedback data cannot be such as obtained, then starts STUN Client is connect with STUN server, obtains port;Node obtains the outside port of NAT from STUN client;Pass through XMPP Or Session Initiation Protocol, the external address and port that it is established on NAT are exchanged with its peer node.Chinese patent 200810103849.6 are related to a kind of NAT through method combined based on UPNP and STUN technology, this method by UPNP and STUN is effectively combined, and is passed through again using STUN method is secondary to NAT progress after the failure of UPNP passing through NAT, by drawing Two kinds of respective effectively improve a little of traversing method pass through success rate;For passing through for Symmetric NAT, proposition is used to be added based on NAT Add the sample value of port mapping to estimate that the method for port mapping distribution carries out port conjecture, is forwarded to avoid due to third-party agent Caused by defect and simple port be incremented by the blindness of conjecture method;NAT is all located at for communicating pair in P2P stream media system Situation afterwards, propose using make fractional bandwidth abundant positioned at outer net common communications node charge alternative routing node method come The pressure for alleviating Relay Server, to effectively eliminate system communication bottleneck.
In three above-mentioned patents, what first patent utilized is that UPNP, STUN, TURN successively judge to pass through, and is not collected It closes and uses;Second patent and third patent do not refer to how being passed through again to NAT or P2P.
Therefore, it is necessary to design a kind of P2P traversing method for merging UPNP and STUN, realizes and UPNP is combined to route in single layer Lower P2P is easily successful and quickly feature and enhancing STUN burrow penetration capacity in Symmetric NAT, improves and passes through success in the NAT of P2P Rate realizes P2P communication.
Summary of the invention
It is an object of the invention to overcome the deficiencies of existing technologies, a kind of side of passing through P2P for merging UPNP and STUN is provided Method and its system.
To achieve the above object, the invention adopts the following technical scheme: a kind of side of passing through P2P for merging UPNP and STUN Method, comprising the following specific steps
Step 1: NAT mapping step, the NAT that IPC carries out UPNP to local router maps;
Step 2: UPNP registration step, IPC carries out UPNP registration to service control server;
Step 3: P2P server registration step, IPC is to P2P server reporting equipment information and keeps heartbeat, completes P2P Server registration;
Step 4: UPNP mode accesses starting step, APP obtains the UPNP information of specified IPC to service control server Afterwards, IPC is accessed using the IP address information of UPNP feedback, if accessed successfully, carries out step 7, if accessing failure Carry out step 5;
Step 5: P2P server registration step, APP is registered and is interacted with P2P server;
Step 6: the step that burrows, APP and IPC complete the process that burrows of STUN with P2P server, the channel P2P, APP are established According to the channel access IPC got through;
Step 7: end step, repeats step 1, until receiving off signal.
Its further technical solution are as follows: in the step 6, burrow process when, APP and IPC is respectively necessary for carrying out NAT type detection obtains the NAT type respectively relative to public network, and then APP and IPC can notice mutually oneself by server NAT type, client simultaneously cooperates with this and determined the strategy that burrows.
Its further technical solution are as follows: the step of NAT type detection is as follows:
Step 1, the first judgment step, client send the STUN bind request without any mark and response address properties Message is to server, if server is not replied, client is that UDP blocks completely, if server has response, carries out next Step;
Step 2, the second judgment step judge whether outer net IP that server receives and local IP are consistent, and client The STUN bind request message of band " change IP " and " change port " mark is sent to server, if outer net IP and local IP mono- It causes, while the server that IP is different and port is different is unresponsive, then client is symmetrical firewall, if outer net IP and local IP mono- It causes, while the server that IP is different and port is different has response, then client is no NAT public network, if outer net IP and local IP are not Unanimously, when while IP is different and port is different server has response, then the type of NAT is perfect form NAT, if outer net IP and this Ground IP is inconsistent, while when the server that IP is different and port is different is unresponsive, carrying out next step;
Step 3, third judgment step, client continue to send the STUN binding without any mark and response address properties The request message server different to IP, and judge the outer net [IP:Port] that receives and the return of the first judgment step whether phase Together, if the result returned is identical, next step is carried out, if the result returned is different, the type of NAT is symmetric form NAT;
Step 4, the 4th judgment step, client send the STUN bind request message of only band " change port " mark to clothes It is engaged in device, if the different server in port has response, the type of NAT is restricted type NAT, if the different server in port is without answering It answers, then the type of NAT is port restricted type NAT.
Its further technical solution are as follows: the strategy that burrows in the step 6 is that client is based on one's own side NAT and other side NAT What type was made, not distinguishing one's own side is APP or IPC.
Its further technical solution are as follows: the specific strategy of the strategy that burrows in the step 6 is as follows:
Step 1, first burrow strategy, when the RemotePort of one's own side is identical with the RemotePort of other side, client Message is sent to the localPort of other side localIP;
Step 2, second burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is asymmetric NAT&& one's own side is asymmetric form NAT) | | (other side is that perfect form NAT&& one's own side is symmetric NAT) | | (other side is address limitation Type NAT&& one's own side is symmetric NAT) when, client sends message to the RemotePort of other side RemoteIP;
Step 3, third burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is port limitation Type NAT&& one's own side is fixed step size symmetric NAT) when, RemotePort-a from client to other side RemoteIP extremely The port RemotePort+a and RemotePort add 1 step-length to adding the total b port of b step-length to send message, and a value exists Between 50-200, b value is between 1-64;
Step 4, the 4th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is port limitation Type NAT&& one's own side is arbitrary width symmetric NAT), client is by localPort-c to the port localPort+c to other side RemoteIP RemotePort send message, c value is between 50-200;
Step 5, the 5th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is symmetric form NAT&& one's own side is perfect form NAT) | | (other side is that Dui ChengxingNAT && one's own side is address restricted type NAT), client is to other side The RemotePort of RemoteIP sends message;
Step 6, the 6th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is fixed step size Dui ChengxingNAT && one's own side is port restricted type NAT), client by local localPort-d to the port localPort+d to The RemotePort of other side RemoteIP sends message, and d value is between 50-200;
Step 7, the 7th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is arbitrary width Dui ChengxingNAT && one's own side is port restricted type NAT) when, client is existed by the random e port local localPort, e value Between 500-2000, message is sent to the RemotePort of other side RemoteIP;
Step 8, the 8th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is symmetric form NAT&& one's own side is symmetric NAT) when, client to the RemotePort of other side RemoteIP add 1 step-length to plus f step-length Total f port send message, f value is between 1-64.
Its further technical solution are as follows: the message is UDP access detection packet, and the step-length is symmetric NAT continuous two Port changing value when a mapping.
The present invention also provides a kind of P2P ride through system for merging UPNP and STUN, including NAT mapping block, UPNP note Volume module, P2P server registration module, UPNP mode access modules, NAT type detection module and the module that burrows;
The NAT mapping block is mapped for the IPC NAT for establishing UPNP to local router;
The UPNP registration module realizes IPC to Service control service after the completion of NAT mapping block mapping The UPNP registration that device carries out, receives the map information from the NAT mapping block;
The P2P server registration module, for IPC after the completion of the UPNP registration module register, realization IPC to P2P server reporting equipment information simultaneously drives IPC and P2P server to keep heartbeat, is accessed for APP according to the UPNP mode When module fails, being registered and interacted with P2P server by APP, IPC is executed after UPNP registration module completion, APP is executed after UPNP mode access modules failure;
The UPNP mode access modules, for being protected in P2P server registration module driving IPC and P2P server After holding heartbeat, after the UPNP information that specified IPC is obtained from APP to service control server, the IP address using UPNP feedback is believed Breath can be performed after UPNP registration module completion to access IPC;
The NAT type detection module, after UPNP mode access modules starting access, the module that burrows is beaten When the process of hole, APP and IPC are respectively necessary for carrying out NAT type detection, obtain the NAT type respectively relative to public network, then APP It can notice mutually the NAT type of oneself by server with IPC, client simultaneously cooperates with and determines the strategy that burrows with this, for The module that burrows selects the strategy that burrows, and completes the process that burrows, and completes before the module that burrows executes;
The module that burrows, after detecting NAT type according to the NAT type detection module, APP and IPC take with P2P Business device completes the process that burrows, and establishes the channel P2P, APP is according to the P2P channel access IPC got through.
Its further technical solution are as follows: the NAT type detection module judges submodule including the first judging submodule, second Block, third judging submodule and the 4th judging submodule;
First judging submodule, for it is described burrow module execute before complete, according to client send without It is any mark and response address properties STUN bind request message to server, it is unresponsive to judge that server has, server without Client is that UDP blocks completely when response, is completed before the module that burrows executes;
The second judgment submodule, the server for being obtained according to first judging submodule have the judgement of response As a result, further judge whether outer net IP that server receives and local IP consistent, and client transmission with " changing IP " and The STUN bind request message of " change port " mark is to server, and judging IP is different and port is different server, whether there is or not answer It answers, it is complete in first judging submodule to determine whether client is symmetrical firewall, without NAT public network and perfect form NAT At execution before the rear and described module that burrows;
The third judging submodule, for according to the second judgment submodule judge as a result, client after supervention It send the STUN bind request message without any mark and response address properties to give IP different server, judges the outer net received Whether the return of [IP:Port] and first judging submodule is identical, to determine whether client is symmetric NAT, described It is executed after the completion of second judgment submodule and before the module that burrows;
4th judging submodule, for the judging result according to the third judging submodule, client is sent only The STUN bind request message of band " change port " mark it is unresponsive to judge that the different server in port has, with true to server Determine whether client is restricted type NAT and port restricted type NAT, completes and described burrow in the third judging submodule It is executed before module.
Its further technical solution are as follows: the module that burrows includes burrowing after the 4th judging submodule completion Master control submodule, first burrow submodule, second burrow submodule, third burrow submodule, the 4th burrow submodule, the 5th dozen Hole module, the 6th burrow submodule, the 7th burrow and submodule and the 8th burrow submodule;
Described first burrows submodule, for when the RemotePort of one's own side is identical with the RemotePort of other side, institute Stating the master control submodule that burrows drives client to send message to the localPort of the localIP of other side, is controlled by the master that burrows Control submodule;
Described second burrows submodule, for meeting (other side's right and wrong when the NAT type of client and the NAT type of other side Symmetric NAT one's own side is asymmetric form NAT) | | (other side is that perfect form NAT&& one's own side is symmetric NAT) | | (other side is ground Location restricted type NAT&& one's own side is symmetric NAT) when, the master control submodule driving client that burrows is to other side RemoteIP's RemotePort sends message, is controlled by the master control submodule that burrows;
The third burrows submodule, meets that (other side is port for the NAT type of client and the NAT type of other side Restricted type NAT&& one's own side is fixed step size symmetric NAT) when, the master control submodule that burrows drives client to other side The port RemotePort-a to RemotePort+a of RemoteIP and RemotePort add 1 step-length to the total b for adding b step-length A port sends message, and for a value between 50-200, b value is controlled by the master control submodule that burrows between 1-64;
Described 4th burrows submodule, meets that (other side is port for the NAT type of client and the NAT type of other side Restricted type NAT&& one's own side is arbitrary width symmetric NAT) when, the master control submodule driving client that burrows passes through The RemotePort of RemoteIP of the localPort-c to from the port localPort+c to other side sends message, and c value is in 50- Between 200, it is controlled by the master control submodule that burrows;
Described 5th burrows submodule, meets that (other side is symmetrical for the NAT type of client and the NAT type of other side Type NAT&& one's own side is perfect form NAT) | | (other side is that Dui ChengxingNAT && one's own side is address restricted type NAT), the master control that burrows Submodule drives client to send message to the RemotePort of other side RemoteIP, is controlled by the master control submodule that burrows;
Described 6th burrows submodule, for when the NAT type of client and the NAT type of other side meet, (other side to be solid Fixed step size Dui ChengxingNAT && one's own side is port restricted type NAT) when, the master control submodule driving client that burrows passes through local LocalPort-d sends message to the port localPort+d to the RemotePort of other side RemoteIP, and d value is in 50-200 Between, it is controlled by the master control submodule that burrows;
Described 7th burrows submodule, for meet when the NAT type of client and the NAT type of other side (other side be with Machine step-length Dui ChengxingNAT && one's own side is port restricted type NAT) when, the master control submodule driving client that burrows passes through local The random e port localPort, e value send message between 500-2000, to the RemotePort of other side RemoteIP, It is controlled by the master control submodule that burrows;
Described 8th burrows submodule, for when the NAT type of client and the NAT type of other side meet, (other side to be pair Title type NAT&& one's own side is symmetric NAT) when, the master control submodule driving client that burrows is to other side RemoteIP's RemotePort adds 1 step-length to adding the total f port of f step-length to send message, and f value is controlled by described between 1-64 Burrow master control submodule.
Compared with the prior art, the invention has the advantages that: the P2P of fusion UPNP and STUN of the invention a kind of is passed through Method, by communication when, first carry out UPNP communications access, when access failure when, the access of STUN is carried out, in conjunction with UPNP P2P is easily successful under single layer routing and quickly feature and enhancing STUN burrow penetration capacity in Symmetric NAT, improves P2P's NAT passes through success rate, realizes P2P communication.
The invention will be further described in the following with reference to the drawings and specific embodiments.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the P2P traversing method for fusion UPNP and STUN that the specific embodiment of the invention provides;
Fig. 2 is the flow chart for the NAT type detection step that the specific embodiment of the invention provides;
Fig. 3 is the strategic process figure that burrows that the specific embodiment of the invention provides;
Fig. 4 is a kind of structural block diagram of the P2P ride through system for fusion UPNP and STUN that the specific embodiment of the invention provides.
Appended drawing reference
10 NAT mapping block, 20 UPNP registration module
30 P2P server registration module, 40 UPNP mode access modules
50 NAT type detection module, 51 first judging submodule
52 second judgment submodule, 53 third judging submodule
54 the 4th judging submodules 60 burrow module
The 61 master control submodules 62 first that burrow burrow submodule
63 second 64 thirds of submodule that burrow burrow submodule
65 the 4th submodules 66 the 5th that burrow burrow submodule
67 the 6th submodules 68 the 7th that burrow burrow module
69 the 8th burrow submodule
Specific embodiment
In order to more fully understand technology contents of the invention, combined with specific embodiments below to technical solution of the present invention into One step introduction and explanation, but not limited to this.
Specific embodiment as shown in figures 1-4, a kind of side of passing through P2P for merging UPNP and STUN provided in this embodiment Method during being used in communication, is realized and combines UPNP P2P under single layer routing easily successful and quickly feature and enhancing STUN burrows penetration capacity in Symmetric NAT, improves and passes through success rate in the NAT of P2P.
A kind of P2P traversing method merging UPNP and STUN, comprising the following specific steps
Step 1: NAT mapping step, the NAT that IPC carries out UPNP to local router maps;
Step 2: UPNP registration step, IPC carries out UPNP registration to service control server;
Step 3: P2P server registration step, IPC is to P2P server reporting equipment information and keeps heartbeat, completes P2P Server registration;
Step 4: UPNP mode accesses starting step, APP obtains the UPNP information of specified IPC to service control server Afterwards, IPC is accessed using the IP address information of UPNP feedback, if accessed successfully, carries out step 7, if asking in reply failure Carry out step 5;
Step 5: P2P server registration step, APP is registered and is interacted with P2P server;
Step 6: the step that burrows, APP and IPC complete the process that burrows of STUN with P2P server, the channel P2P, APP are established According to the channel access IPC got through;
Step 7: end step, repeats step 1, until receiving off signal.
The P2P traversing method of above-mentioned fusion UPNP and STUN a kind of, the communication by communication, first carrying out UPNP are visited It asks, when access failure, carries out the access of STUN, the easily successful and quick feature of P2P and enhancing under single layer routing in conjunction with UPNP STUN burrows penetration capacity in Symmetric NAT, improves and passes through success rate in the NAT of P2P, realizes P2P communication.
Specifically, in the step 6, burrow process when, APP and IPC are respectively necessary for carrying out NAT type detection, The NAT type respectively relative to public network is obtained, then APP and IPC can notice mutually the NAT type of oneself, visitor by server Family end is simultaneously cooperateed with this and is determined the strategy that burrows.
Further, specific step is as follows for above-mentioned NAT type detection:
Step 1, the first judgment step, client send the STUN bind request without any mark and response address properties Message is to server, if server is not replied, client is that UDP blocks completely, if server has response, carries out next Step;
Step 2, the second judgment step judge whether outer net IP that server receives and local IP are consistent, and client The STUN bind request message of band " change IP " and " change port " mark is sent to server, if outer net IP and local IP mono- It causes, while the server that IP is different and port is different is unresponsive, then client is symmetrical firewall, if outer net IP and local IP mono- It causes, while the server that IP is different and port is different has response, then client is no NAT public network, if outer net IP and local IP are not Unanimously, when while IP is different and port is different server has response, then the type of NAT is perfect form NAT, if outer net IP and this Ground IP is inconsistent, while when the server that IP is different and port is different is unresponsive, carrying out next step;
Step 3, third judgment step, client continue to send the STUN binding without any mark and response address properties The request message server different to IP, and judge the outer net [IP:Port] that receives and the return of the first judgment step whether phase Together, if the result returned is identical, next step is carried out, if the result returned is different, the type of NAT is symmetric form NAT;
Step 4, the 4th judgment step, client send the STUN bind request message of only band " change port " mark to clothes It is engaged in device, if the different server in port has response, the type of NAT is restricted type NAT, if the different server in port is without answering It answers, then the type of NAT is port restricted type NAT.
In addition, the strategy that burrows in the step 6 is that client is based on one's own side NAT and other side in the step 6 NAT type is made, and not distinguishing one's own side is APP or IPC.Specific strategy is as follows:
Step 1, first burrow strategy, when the RemotePort of one's own side is identical with the RemotePort of other side, client Message is sent to the localPort of the localIP of other side;
Step 2, second burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is asymmetric NAT&& one's own side is asymmetric form NAT) | | (other side is that perfect form NAT&& one's own side is symmetric NAT) | | (other side is address limitation Type NAT&& one's own side is symmetric NAT) when, client sends message to the RemotePort of other side RemoteIP;
Step 3, third burrow strategy, the NAT type of client and the NAT type of other side meet that (other side is port limitation Type NAT&& one's own side is fixed step size symmetric NAT) when, RemotePort-a from client to other side RemoteIP extremely The port RemotePort+a and RemotePort add 1 step-length to adding the total b port of b step-length to send message, and a value exists Between 50-200, b value is between 1-64;
Step 4, the 4th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is port limitation Type NAT&& one's own side is arbitrary width symmetric NAT), client is by localPort-c to the port localPort+c to other side RemoteIP RemotePort send message, c value is between 50-200;
Step 5, the 5th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is symmetric form NAT&& one's own side is perfect form NAT) | | (other side is that Dui ChengxingNAT && one's own side is address restricted type NAT), client is to other side The RemotePort of RemoteIP sends message;
Step 6, the 6th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is fixed step size Dui ChengxingNAT && one's own side is port restricted type NAT), client by local localPort-d to the port localPort+d to The RemotePort of other side RemoteIP sends message, and d value is between 50-200;
Step 7, the 7th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is arbitrary width Dui ChengxingNAT && one's own side is port restricted type NAT) when, client is existed by the random e port local localPort, e value Between 500-2000, message is sent to the RemotePort of other side RemoteIP;
Step 8, the 8th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is symmetric form NAT&& one's own side is symmetric NAT) when, client to the RemotePort of other side RemoteIP add 1 step-length to plus f step-length Total f port send message, f value is between 1-64.
In the present embodiment, above-mentioned message is UDP access detection packet.
In addition, the port changing value when step-length maps for symmetric NAT continuous two.
The channel that STUN is got through means that APP and IPC receive the UDP access detection packet of other side, also anticipates while receiving Taste network between APP and IPC there is necessary UDP connection to map, can be with the network of intercommunication.
The present invention also provides a kind of P2P ride through system for merging UPNP and STUN, including NAT mapping block 10, UPNP Registration module 20, P2P server registration module 30, UPNP mode access modules 40, NAT type detection module 50 and the mould that burrows Block 60, wherein NAT mapping block 10 is mapped for the IPC NAT for establishing UPNP to local router;UPNP registration module 20, After the completion of being mapped for NAT mapping block 10, realizes the UPNP registration that IPC is carried out to service control server, receive and come from institute State the map information of NAT mapping block 10;P2P server registration module 30 is registered in UPNP registration module 20 for IPC and is completed Afterwards, IPC is realized to P2P server reporting equipment information and IPC and P2P server is driven to keep heartbeat, for APP according to When UPNP mode access modules fail, is registered and interacted with P2P server by APP, IPC is complete in the UPNP registration module At executing later, APP is executed after UPNP mode access modules failure;UPNP mode access modules 40, in P2P After server registration module 30 drives IPC and P2P server to keep heartbeat, specified IPC is obtained from APP to service control server UPNP information after, access IPC using the IP address information of UPNP feedback, can after the UPNP registration module 20 completion It executes;NAT type detection module 50, after the starting access of UPNP mode access modules 40, the module that burrows 60 carries out the stream that burrows Cheng Shi, APP and IPC are respectively necessary for carrying out NAT type detection, obtain the NAT type respectively relative to public network, then APP and IPC The NAT type of oneself can be noticed mutually by server, client simultaneously cooperates with and determine the strategy that burrows with this, for the mould that burrows Block 60 selects the strategy that burrows, and completes the process that burrows, and completes before the module 60 that burrows executes;The module that burrows 60 is used for root After detecting NAT type according to the NAT type detection module 50, APP and IPC burrow process with the completion of P2P server, establish P2P Channel, APP access IPC according to the channel P2P got through.
Specifically, above-mentioned NAT type detection module 50 include the first judging submodule 51, second judgment submodule 52, Third judging submodule 53 and the 4th judging submodule 54, wherein the first judging submodule 51, for the module 60 that burrows It completes before executing, is sent without the STUN bind request message of any mark and response address properties according to client to service It is unresponsive to judge that server has for device, and client is that UDP blocks completely when server is unresponsive, executes in the module 60 that burrows It completes before;Second judgment submodule 52, the server for being obtained according to the first judging submodule 51 have the judgement knot of response Fruit further judge whether outer net IP that server receives and local IP consistent, and while client transmission with " changing IP " and The STUN bind request message of " change port " mark is to server, and judging IP is different and port is different server, whether there is or not answer It answers, to determine whether client is symmetrical firewall, without NAT public network and perfect form NAT, in first judging submodule 51 It executes after the completion and before the module 60 that burrows;Third judging submodule 53, for being sentenced according to second judgment submodule 52 It is disconnected as a result, client, which continues to send, gives IP difference clothes without the STUN bind request message of any mark and response address properties Be engaged in device, judge the outer net [IP:Port] received and the first judging submodule 51 return it is whether identical, with determine client whether be Symmetric NAT executes after the completion of second judgment submodule 52 and before the module 60 that burrows;4th judges submodule Block 54, for the judging result according to third judging submodule 53, the STUN that client sends only band " change port " mark is tied up Determine request message to server, it is unresponsive to judge that the different server in port has, with determine client whether be restricted type NAT with And port restricted type NAT, it is executed before the third judging submodule 53 completion and the module 60 that burrows.
In the present embodiment, the module that burrows 60 includes the master control submodule that burrows after the completion of the 4th judging submodule 54 61, the first burrow tactful submodule 62, second tactful submodule 63, third tactful submodule the 64, the 4th that burrows that burrows burrows plan Slightly tactful submodule the 66, the 6th tactful submodule the 67, the 7th that burrows that burrows of submodule the 65, the 5th burrows submodule 68 and the 8th Burrow submodule 69, wherein first burrow tactful submodule 62, for the RemotePort and other side as one's own side When RemotePort is identical, the master control submodule 61 that burrows drives the localPort of localIP of from the client to other side to send Message is controlled by the master control submodule 61 that burrows;Second burrows tactful submodule 63, for when client NAT type with The NAT type of other side meets (other side is that asymmetric form NAT one's own side is asymmetric form NAT) | | (other side be perfect form NAT&& oneself Side is symmetric NAT) | | when (other side is that address restricted type NAT&& one's own side is symmetric NAT), the master control submodule 61 that burrows It drives client to send message to the RemotePort of other side RemoteIP, is controlled by the master control submodule 61 that burrows;Third burrows Tactful submodule 64, for client NAT type and other side NAT type meet (other side is port restricted type NAT&& one's own side It is fixed step size symmetric NAT) when, the master control submodule 61 that burrows drives client to other side RemoteIP's RemotePort-a to the port RemotePort+a and RemotePort add 1 step-length to plus b step-length the transmission of total b port Message, for a value between 50-200, b value is controlled by the master control submodule 61 that burrows between 1-64;4th burrows plan Slightly submodule 65, for client NAT type and other side NAT type meet (other side is that port restricted type NAT&& one's own side is Arbitrary width symmetric NAT) when, the master control submodule 61 that burrows drives client to pass through localPort-c to localPort The port+c sends message to the RemotePort of the RemoteIP of other side, and c value is controlled by the master that burrows between 50-200 Control submodule 61;5th burrows tactful submodule 66, meets that (other side is for the NAT type of client and the NAT type of other side Dui ChengxingNAT && one's own side is perfect form NAT) | | (other side is that Dui ChengxingNAT && one's own side is address restricted type NAT), it is described to burrow Master control submodule 61 drives client to send message to the RemotePort of other side RemoteIP, is controlled by master control that burrows Module 61;6th burrows tactful submodule 67, for when the NAT type of client and the NAT type of other side meet, (other side to be solid Fixed step size Dui ChengxingNAT && one's own side is port restricted type NAT) when, the master control submodule 61 that burrows drives client to pass through this Ground localPort-d sends message to the port localPort+d to the RemotePort of other side RemoteIP, and d value is in 50- Between 200, it is controlled by the master control submodule 61 that burrows;Described 7th burrows submodule 68, for working as the NAT type of client It is described to burrow when meeting (other side is that arbitrary width Dui ChengxingNAT && one's own side is port restricted type NAT) with the NAT type of other side Master control submodule 61 drives client by the random e port local localPort, and e value is between 500-2000, to other side The RemotePort of RemoteIP sends message, is controlled by the master control submodule 61 that burrows;Described 8th burrows submodule 69, For when the NAT type of client and other side NAT type meet (other side is that Dui ChengxingNAT && one's own side is symmetric NAT) when, It is described burrow master control submodule 61 drive client to the RemotePort of other side RemoteIP add 1 step-length to add f step-length Total f port send message, f value is controlled by the master control submodule 61 that burrows between 1-64.
It is above-mentioned that technology contents of the invention are only further illustrated with embodiment, in order to which reader is easier to understand, but not It represents embodiments of the present invention and is only limitted to this, any technology done according to the present invention extends or recreation, by of the invention Protection.Protection scope of the present invention is subject to claims.

Claims (9)

1. a kind of P2P traversing method for merging UPNP and STUN, which is characterized in that comprising the following specific steps
Step 1: NAT mapping step, the NAT that IPC carries out UPNP to local router maps;
Step 2: UPNP registration step, IPC carries out UPNP registration to service control server;
Step 3: P2P server registration step, IPC is to P2P server reporting equipment information and keeps heartbeat, completes P2P service Device registration;
Step 4: UPNP mode accesses starting step to be made after APP obtains the UPNP information of specified IPC to service control server IPC is accessed with the IP address information of UPNP feedback, if accessed successfully, carries out step 7, is carried out if accessing failure Step 5;
Step 5: P2P server registration step, APP is registered and is interacted with P2P server;
Step 6: the step that burrows, APP and IPC complete the process that burrows of STUN with P2P server, establish the channel P2P, APP according to The channel access IPC got through;
Step 7: end step, repeats step 1, until receiving off signal.
2. a kind of P2P traversing method for merging UPNP and STUN according to claim 1, which is characterized in that in the step In rapid six, burrow process when, APP and IPC are respectively necessary for carrying out NAT type detection, obtain the NAT respectively relative to public network Type, then APP and IPC can notice mutually the NAT type of oneself by server, and client is simultaneously beaten with this to cooperate with and determine Hole strategy.
3. a kind of P2P traversing method for merging UPNP and STUN according to claim 2, which is characterized in that the NAT class The step of type detects is as follows:
Step 1, the first judgment step, client send the STUN bind request message without any mark and response address properties To server, if server is not replied, client is that UDP blocks completely, if server has response, is carried out in next step Suddenly;
Step 2, the second judgment step judge whether outer net IP that server receives and local IP are consistent, and client is sent The STUN bind request message of band " change IP " and " change port " mark is to server, if outer net IP is consistent with local IP, together When IP is different and port is different server it is unresponsive, then client is symmetrical firewall, if outer net IP is consistent with local IP, together When IP is different and port is different server have response, then client is no NAT public network, if outer net IP and local IP are inconsistent, When the server that IP is different simultaneously and port is different has response, then the type of NAT is perfect form NAT, if outer net IP and local IP It is inconsistent, while when IP is different and port is different server is unresponsive, carry out next step;
Step 3, third judgment step, client continue to send the STUN bind request without any mark and response address properties The message server different to IP, and judge whether the outer net [IP:Port] received and the first judgment step return identical, such as The result that fruit returns is identical, then carries out next step, if the result returned is different, the type of NAT is symmetric NAT;
Step 4, the 4th judgment step, client send the STUN bind request message of only band " change port " mark to service Device, if the different server in port has response, the type of NAT is restricted type NAT, if port it is different server it is unresponsive, Then the type of NAT is port restricted type NAT.
4. a kind of P2P traversing method for merging UPNP and STUN according to claim 2, which is characterized in that the step The strategy that burrows in six is client to be made based on one's own side NAT and other side NAT type, do not distinguish one's own side be APP or IPC。
5. a kind of P2P traversing method for merging UPNP and STUN according to claim 4, which is characterized in that the step The specific strategy of the strategy that burrows in six is as follows:
Step 1, first burrow strategy, and when the RemotePort of one's own side is identical with the RemotePort of other side, client is to right The localPort of square localIP sends message;
Step 2, second burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is asymmetric form NAT One's own side is asymmetric form NAT) | | (other side is that perfect form NAT&& one's own side is symmetric NAT) | | (other side is address restricted type NAT&& one's own side is symmetric NAT) when, client sends message to the RemotePort of other side RemoteIP;
Step 3, third burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is port restricted type NAT&& one's own side is fixed step size symmetric NAT) when, RemotePort-a from client to other side RemoteIP extremely The port RemotePort+a and RemotePort add 1 step-length to adding the total b port of b step-length to send message, and a value exists Between 50-200, b value is between 1-64;
Step 4, the 4th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is port restricted type NAT&& one's own side is arbitrary width symmetric NAT), client is by localPort-c to the port localPort+c to other side's The RemotePort of RemoteIP sends message, and c value is between 50-200;
Step 5, the 5th burrow strategy, the NAT type of client and the NAT type of other side meet (other side be Dui ChengxingNAT && oneself Side is perfect form NAT) | | (other side is that Dui ChengxingNAT && one's own side is address restricted type NAT), client is to other side RemoteIP's RemotePort sends message;
Step 6, the 6th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is that fixed step size is symmetrical Type NAT&& one's own side is port restricted type NAT), client is by local localPort-d to the port localPort+d to other side The RemotePort of RemoteIP sends message, and d value is between 50-200;
Step 7, the 7th burrow strategy, and the NAT type of client and the NAT type of other side meet that (other side is that arbitrary width is symmetrical Type NAT&& one's own side is port restricted type NAT) when, client is by the random e port local localPort, and e value is in 500- Between 2000, message is sent to the RemotePort of other side RemoteIP;
Step 8, the 8th burrow strategy, the NAT type of client and the NAT type of other side meet (other side be Dui ChengxingNAT && oneself Side is symmetric NAT) when, client to the RemotePort of other side RemoteIP add 1 step-length to plus f step-length total f it is a Port sends message, and f value is between 1-64.
6. a kind of P2P traversing method for merging UPNP and STUN according to claim 5, which is characterized in that the message It detects and wraps for UDP access, the port changing value when step-length maps for symmetric NAT continuous two.
7. a kind of P2P ride through system for merging UPNP and STUN, which is characterized in that register mould including NAT mapping block, UPNP Block, P2P server registration module, UPNP mode access modules, NAT type detection module and the module that burrows;
The NAT mapping block is mapped for the IPC NAT for establishing UPNP to local router;
The UPNP registration module, for the NAT mapping block mapping after the completion of, realize IPC to service control server into Capable UPNP registration, receives the map information from the NAT mapping block;
The P2P server registration module realizes that IPC takes to P2P for IPC after the completion of the UPNP registration module is registered Business device reporting equipment information simultaneously drives IPC and P2P server to keep heartbeat, for APP according to the UPNP mode access modules It when failure, is registered and is interacted with P2P server by APP, IPC is executed after UPNP registration module completion, and APP exists It is executed after the UPNP mode access modules failure;
The UPNP mode access modules, for keeping the heart in P2P server registration module driving IPC and P2P server After jump, after the UPNP information that specified IPC is obtained from APP to service control server, the IP address information using UPNP feedback is come IPC is accessed, can be performed after UPNP registration module completion;
The NAT type detection module, after UPNP mode access modules starting access, the module that burrows carries out the stream that burrows Cheng Shi, APP and IPC are respectively necessary for carrying out NAT type detection, obtain the NAT type respectively relative to public network, then APP and IPC The NAT type of oneself can be noticed mutually by server, client simultaneously cooperates with and determine the strategy that burrows with this, for the mould that burrows Block selects the strategy that burrows, and completes the process that burrows, and completes before the module that burrows executes;
The module that burrows, after detecting NAT type according to the NAT type detection module, APP and IPC are the same as P2P server Completion burrows process, establishes the channel P2P, APP is according to the P2P channel access IPC got through.
8. a kind of P2P ride through system for merging UPNP and STUN according to claim 7, which is characterized in that the NAT class Type detecting module includes the first judging submodule, second judgment submodule, third judging submodule and the 4th judging submodule;
First judging submodule is sent according to client without any for completing before the module that burrows executes The STUN bind request message of mark and response address properties it is unresponsive to judge that server has, server is unresponsive to server When client be UDP block completely, it is described burrow module execute before complete;
The second judgment submodule, the server for being obtained according to first judging submodule have the judgement knot of response Fruit further judge whether outer net IP that server receives and local IP are consistent, and client transmission is with " changing IP " and " more Changing port " to server, it is unresponsive to judge that IP is different and port is different server has the STUN bind request message of mark, with Determine whether client is symmetrical firewall, without NAT public network and perfect form NAT, after the completion of first judging submodule And it is executed before the module that burrows;
The third judging submodule, for according to the second judgment submodule judge as a result, client continue send not IP different server is given with any mark and the STUN bind request messages of response address properties, the outer net that judges to receive [IP: Port] and first judging submodule return it is whether identical, to determine whether client is symmetric NAT, described second It is executed after the completion of judging submodule and before the module that burrows;
4th judging submodule, for the judging result according to the third judging submodule, client is sent only with " more Change port " mark STUN bind request message to server, it is unresponsive to judge that the different server in port has, to determine client End whether be restricted type NAT and port restricted type NAT, the third judging submodule complete and it is described burrow module it Preceding execution.
9. a kind of P2P ride through system for merging UPNP and STUN according to claim 8, which is characterized in that described to burrow Module include the master control submodule that burrows after the 4th judging submodule completion, first burrow submodule, second burrow Submodule, third burrow submodule, the 4th burrow submodule, the 5th burrow submodule, the 6th burrow submodule, the 7th burrow son It module and the 8th burrows submodule;
Described first burrows submodule, described to beat for when the RemotePort of one's own side is identical with the RemotePort of other side Master control submodule in hole drives client to send message to the localPort of the localIP of other side, is controlled by master control that burrows Module;
Described second burrows submodule, for when the NAT type of client and the NAT type of other side meet, (other side to be asymmetric Type NAT&& one's own side is asymmetric form NAT) | | (other side is that perfect form NAT&& one's own side is symmetric NAT) | | (other side is address limit Type NAT&& one's own side processed is symmetric NAT) when, the master control submodule driving client that burrows is to other side RemoteIP's RemotePort sends message, is controlled by the master control submodule that burrows;
The third burrows submodule, meets that (other side is port limitation for the NAT type of client and the NAT type of other side Type NAT&& one's own side is fixed step size symmetric NAT) when, the master control submodule that burrows drives client to other side RemoteIP The port RemotePort-a to RemotePort+a and RemotePort add 1 step-length to plus b step-length total b port hair Message is sent, for a value between 50-200, b value is controlled by the master control submodule that burrows between 1-64;
Described 4th burrows submodule, meets that (other side is port limitation for the NAT type of client and the NAT type of other side Type NAT&& one's own side is arbitrary width symmetric NAT) when, the master control submodule driving client that burrows passes through localPort-c Message is sent to the port localPort+c to the RemotePort of the RemoteIP of other side, c value is controlled between 50-200 In the master control submodule that burrows;
Described 5th burrows submodule, meets that (other side is symmetric form for the NAT type of client and the NAT type of other side NAT&& one's own side is perfect form NAT) | | (other side is that Dui ChengxingNAT && one's own side is address restricted type NAT), master control that burrows Module drive client sends message to the RemotePort of other side RemoteIP, is controlled by the master control submodule that burrows;
Described 6th burrows submodule, for when the NAT type of client and the NAT type of other side meet, (other side to be fixed step Long Dui ChengxingNAT && one's own side is port restricted type NAT) when, the master control submodule driving client that burrows passes through local LocalPort-d sends message to the port localPort+d to the RemotePort of other side RemoteIP, and d value is in 50-200 Between, it is controlled by the master control submodule that burrows;
Described 7th burrows submodule, for when the NAT type of client and the NAT type of other side meet, (other side to be chance move Long Dui ChengxingNAT && one's own side is port restricted type NAT) when, the master control submodule driving client that burrows passes through local The random e port localPort, e value send message between 500-2000, to the RemotePort of other side RemoteIP, It is controlled by the master control submodule that burrows;
Described 8th burrows submodule, for when the NAT type of client and the NAT type of other side meet, (other side to be symmetric form NAT&& one's own side is symmetric NAT) when, the master control submodule driving client that burrows is to other side RemoteIP's RemotePort adds 1 step-length to adding the total f port of f step-length to send message, and f value is controlled by described between 1-64 Burrow master control submodule.
CN201610569140.XA 2016-07-19 2016-07-19 A kind of P2P traversing method and its system merging UPNP and STUN Active CN106210092B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610569140.XA CN106210092B (en) 2016-07-19 2016-07-19 A kind of P2P traversing method and its system merging UPNP and STUN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610569140.XA CN106210092B (en) 2016-07-19 2016-07-19 A kind of P2P traversing method and its system merging UPNP and STUN

Publications (2)

Publication Number Publication Date
CN106210092A CN106210092A (en) 2016-12-07
CN106210092B true CN106210092B (en) 2019-08-06

Family

ID=57493159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610569140.XA Active CN106210092B (en) 2016-07-19 2016-07-19 A kind of P2P traversing method and its system merging UPNP and STUN

Country Status (1)

Country Link
CN (1) CN106210092B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107071039B (en) * 2017-04-24 2017-12-12 深圳至上移动科技有限公司 A kind of private data cloud storage system and private data cloud storage method
CN108063921A (en) * 2017-12-26 2018-05-22 天津天地人和企业管理咨询有限公司 A kind of optimization application process of embedded network monitoring equipment in P2P
CN109194778B (en) * 2018-09-12 2021-11-05 杭州趣链科技有限公司 KCP (KCP) -protocol-based NAT (network Address translation) penetration method
CN109510810A (en) * 2018-09-20 2019-03-22 广州亦云信息技术股份有限公司 A kind of virtual resource access method and device based on P2P
CN109660637B (en) * 2018-11-16 2024-01-19 深圳市网心科技有限公司 P2P hole punching transmission method and system, electronic device and computer readable storage medium
CN109831547B (en) * 2019-03-14 2022-02-22 腾讯科技(深圳)有限公司 NAT (network Address translation) penetration method, device, equipment and storage medium
CN110099120B (en) * 2019-05-07 2021-11-02 浙江中控技术股份有限公司 Communication method and device, storage medium and electronic equipment
CN110730203A (en) * 2019-09-04 2020-01-24 华为技术有限公司 P2P communication method and device
CN114666612A (en) * 2020-12-24 2022-06-24 华为技术有限公司 Method for reducing network live broadcast time delay and computer readable storage medium
CN113179315B (en) * 2021-04-26 2022-11-29 缀初网络技术(上海)有限公司 Method, system and readable storage medium for providing communication between devices in multiple local area networks
CN114500062B (en) * 2022-01-30 2024-04-02 北京百度网讯科技有限公司 NAT traversal method and device, electronic equipment and storage medium
CN115022279B (en) * 2022-06-02 2024-04-16 京东科技信息技术有限公司 Intranet penetration method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478493A (en) * 2009-02-10 2009-07-08 杭州华三通信技术有限公司 Method and device for NAT through communication
CN101557388A (en) * 2008-04-11 2009-10-14 中国科学院声学研究所 NAT traversing method based on combination of UPnP and STUN technologies
CN101599992A (en) * 2009-05-27 2009-12-09 南京欣网视讯科技股份有限公司 P2PNAT traversal scheme based on SIP
CN101715008A (en) * 2008-09-22 2010-05-26 美国索尼电脑娱乐公司 Method for host selection based on discovered nat type
CN102340520A (en) * 2010-07-20 2012-02-01 上海未来宽带技术及应用工程研究中心有限公司 Private network detection and traverse compounding method for P2P (Peer-to-Peer) network application system
CN102571797A (en) * 2012-01-16 2012-07-11 何建亿 Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP)
CN105610999A (en) * 2016-03-30 2016-05-25 上海斐讯数据通信技术有限公司 Method, device, server and system for implementing P2P communication by penetrating NAT (network address translator)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4411332B2 (en) * 2007-03-20 2010-02-10 パナソニック株式会社 IP communication apparatus, IP communication system, and these IP communication methods
TW200920030A (en) * 2007-10-18 2009-05-01 D Link Corp The method to puncture the firewall for building the linking channel between the network terminal devices

Patent Citations (8)

* 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
WO2009124450A1 (en) * 2008-04-11 2009-10-15 中国科学院声学研究所 Nat traversal method based on combination of technique of upnp and stun
CN101715008A (en) * 2008-09-22 2010-05-26 美国索尼电脑娱乐公司 Method for host selection based on discovered nat type
CN101478493A (en) * 2009-02-10 2009-07-08 杭州华三通信技术有限公司 Method and device for NAT through communication
CN101599992A (en) * 2009-05-27 2009-12-09 南京欣网视讯科技股份有限公司 P2PNAT traversal scheme based on SIP
CN102340520A (en) * 2010-07-20 2012-02-01 上海未来宽带技术及应用工程研究中心有限公司 Private network detection and traverse compounding method for P2P (Peer-to-Peer) network application system
CN102571797A (en) * 2012-01-16 2012-07-11 何建亿 Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP)
CN105610999A (en) * 2016-03-30 2016-05-25 上海斐讯数据通信技术有限公司 Method, device, server and system for implementing P2P communication by penetrating NAT (network address translator)

Also Published As

Publication number Publication date
CN106210092A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN106210092B (en) A kind of P2P traversing method and its system merging UPNP and STUN
Ford et al. Peer-to-peer communication across network address translators.
US7756983B2 (en) Symmetrical bi-directional communication
US8296437B2 (en) Server-mediated setup and maintenance of peer-to-peer client computer communications
Guha et al. Characterization and measurement of tcp traversal through nats and firewalls
TWI408936B (en) Network traversal method and network communication system
CN101557388B (en) NAT traversing method based on combination of UPnP and STUN technologies
CN102685268B (en) Fast private network traversal method based on ICE (Information and Content Exchange) protocol in VoIP (Voice over Internet Protocol)
Müller et al. Behavior and classification of NAT devices and implications for NAT traversal
JP2010535004A (en) Collaborative NAT behavior discovery
CN105847343B (en) Public network information detection method, apparatus and system for point-to-point transmission
CN101599992A (en) P2PNAT traversal scheme based on SIP
CN104144218B (en) A kind of end to end connection method for building up and device
CN102647483A (en) Method for obtaining network address translation (NAT) types, peer-to-peer (P2P) endpoint entity and NAT entity
Tseng et al. Can: A context-aware NAT traversal scheme
CN107124478A (en) Network communication method, device and server
US9215215B2 (en) Method and device for passing through isolation device in surveillance network
Müller et al. On the applicability of knowledge based nat-traversal for home networks
CN108810189A (en) A kind of Novel Communication method of equipment under the environment based on NAT
CN104104740B (en) Method for exchanging distributed network information
Thu et al. Combining stun protocol and udp hole punching technique for peer-to-peer communication across network address translation
CN105491178B (en) A kind of host network card IP address acquisition methods based on software defined network
Camarillo et al. Reducing delays related to nat traversal in p2psip session establishments
CN108337331A (en) Network penetrating method, device, system and network connectivty inspection method
CN113179315B (en) Method, system and readable storage medium for providing communication between devices in multiple local area 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
GR01 Patent grant
GR01 Patent grant