CN101873359B - Method for implementing UDP hole punching - Google Patents

Method for implementing UDP hole punching Download PDF

Info

Publication number
CN101873359B
CN101873359B CN2010102102995A CN201010210299A CN101873359B CN 101873359 B CN101873359 B CN 101873359B CN 2010102102995 A CN2010102102995 A CN 2010102102995A CN 201010210299 A CN201010210299 A CN 201010210299A CN 101873359 B CN101873359 B CN 101873359B
Authority
CN
China
Prior art keywords
burrows
client
correspondent node
public network
protocol
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
CN2010102102995A
Other languages
Chinese (zh)
Other versions
CN101873359A (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.)
Beijing Shenzhou Taiyue Software Co Ltd
Original Assignee
Beijing Shenzhou Taiyue Software Co 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 Beijing Shenzhou Taiyue Software Co Ltd filed Critical Beijing Shenzhou Taiyue Software Co Ltd
Priority to CN2010102102995A priority Critical patent/CN101873359B/en
Publication of CN101873359A publication Critical patent/CN101873359A/en
Application granted granted Critical
Publication of CN101873359B publication Critical patent/CN101873359B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for implementing UDP hole punching, comprising the following steps: A. a client side and a communication opposite side respectively acquire public network IP addresses corresponding to self; B. the client side initiates conversation to the communication opposite side to notice the public network IP address corresponding to the client side to the communication opposite side and simultaneously acquire the public network IP address corresponding to the communication opposite side; and C. the client side and the communication opposite side perform UDP hole punching according to the public network IP addresses corresponding to the two sides. The invention actively initiates a hole punching request to the communication opposite side through the client side, the communication opposite side sends a hole punching response to the client side after receiving the hole punching request, then the client side sends hole punching identification to the communication opposite side, thus implementing UDP hole punching between the client side and the communication opposite side successfully, which not only shortens time consuming in UDP hole punching, but also implements bandwidth resource occupied in transmission data in the UDP hole punching process, and satisfies the demands of immediate communication system application, thereby improving network experience of users.

Description

Realize the method that UDP burrows
Technical field
The present invention relates to the Internet communication technology field, particularly relate to the method that a kind of UDP of realization burrows.
Background technology
At present, along with being on the increase of Internet user, the 4th edition (IPv4) address resource of the employed Internet protocol in the Internet is at full stretch, can not satisfy to allow each user all have directly the IPv4 address of access the Internet, i.e. a public network IP address.A large amount of business units only has a small amount of public network IP address, therefore enterprises can only with in a large number directly the private network IP address of access the Internet satisfy the internal network communication requirement of user in the enterprise, in order to allow the user in the enterprise can use Internet resources, Adoption Network address transition (Network Address Translation generally understands in enterprise, NAT) equipment converts the private network IP address of enterprises to can directly access the Internet public network IP address, so that the one or more users in the enterprise can use a public network IP address to visit the Internet.
Although the use of NAT device can respite the crisis of IPv4 address resource,, because NAT device can limit the Internet user to being positioned at the access of the enterprises user behind the NAT device, so it can affect the interoperability of the Internet.In recent years, the status of instantaneous communication system in internet, applications is more and more important.Utilize these instant communicating systems, the network user not only can carry out the interchange of literal, but also can carry out voice-enabled chat and video conference etc.For the user who makes enterprises can equally with the Internet user can by free access, need to adopt some strategies to come cross-over NAT equipment.
Internet Engineering task groups (IETF) has been formulated RFC5128, and this standard has proposed a kind of UDP method of burrowing and come cross-over NAT equipment.Fig. 1 is the network structure of realizing that NAT device passes through, and wherein: client has private network IP address, and NAT A converts the private network IP address of client to public network IP address; Equally, Correspondent Node has private network IP address, and NAT B converts the private network IP address of Correspondent Node to public network IP address; Described Correspondent Node is positioned at another client after the NAT B for what communicate with described client; Simple UDP message passing through NAT (STUN) server is that can help client and the Correspondent Node that meets IETF RFC3489 standard obtains the equipment of its public network IP address.Referring to Fig. 1, if client and Correspondent Node need direct communication, namely client wants sends data toward Correspondent Node, and Correspondent Node also is sick for client transmission data, and then the UDP method of burrowing described in the IETF RFC5128 comprises:
Step 1, client and Correspondent Node obtain each self-corresponding public network IP address by the STUN server;
Step 2, client and Correspondent Node obtain public network IP address corresponding to the other side by the STUN server;
Step 3, client send the message that burrows to public network IP address corresponding to Correspondent Node first;
Step 4, receive the message that burrows of client after, Correspondent Node sends the confirmation message that burrows to public network IP address corresponding to client;
At this moment, client is finished to burrowing of Correspondent Node.
Step 5, then Correspondent Node sends the message that burrows to public network IP address corresponding to client again;
Step 6, receive the message that burrows of Correspondent Node after, client sends the confirmation message that burrows to public network IP address corresponding to Correspondent Node.
At this moment, Correspondent Node is finished to burrowing of client.
Client and Correspondent Node need to be finished the process that a request is confirmed separately, just can get through bidirectional data path between the two, client and Correspondent Node could directly communicate, as seen, existing UDP burrows in the method, carries out at least the transmitting-receiving of 4 secondary data between client and the Correspondent Node and just can carry out direct communication, not only take user's bandwidth resources, and the time of the cost that burrows is longer, is unfavorable for the application of instant communicating system, has reduced user's network and has experienced.
Summary of the invention
The technical problem that (one) will solve
For the defective of existing NAT crossing technology, the technical problem to be solved in the present invention is: how to reduce UDP the burrow time of cost and the bandwidth resources that take, satisfy the demand that instant communicating system is used, thereby the network that improves the user is experienced.
(2) technical scheme
For solving the problems of the technologies described above, the method that provides a kind of UDP of realization to burrow, the method comprising the steps of:
A, client and Correspondent Node obtain respectively the public network IP address of self correspondence;
B, client are to the Correspondent Node initiation session, to inform public network IP address corresponding to this client of Correspondent Node, public network IP address corresponding to while obtaining communication opposite end;
C, client and Correspondent Node carry out UDP according to public network IP address corresponding to both sides and burrow.
Preferably, step C specifically comprises:
Client sends the request of burrowing to public network IP address corresponding to Correspondent Node; After receiving the described request of burrowing, this Correspondent Node returns the response that burrows to public network IP address corresponding to this client; After receiving the response that burrows from Correspondent Node, client sends the affirmation that burrows to public network IP address corresponding to Correspondent Node.
Preferably, client sends before the affirmation that burrows to public network IP address corresponding to Correspondent Node, and the method further comprises:
Judge whether this Correspondent Node needs to burrow to this client, if necessary, client sends the affirmation that burrows to public network IP address corresponding to Correspondent Node, otherwise, process ends.
Preferably, the described request of burrowing is the protocol massages that burrows, and this protocol massages comprises: protocol version territory, the Protocol Standard field of awareness, Transaction Identifier territory, protocol type territory and reservation territory;
Described protocol version domain representation generates the version of the employed agreement that burrows when burrowing request message;
What described protocol-identifier domain representation burrowed the request message use is any agreement, is the agreement that burrows here;
Which request message that burrows described Transaction Identifier domain representation is;
Described protocol type domain representation is any message in the agreement that burrows, and is the request message that burrows here.
Preferably, the described response that burrows is the protocol massages that burrows, and this protocol massages comprises: protocol version territory, the Protocol Standard field of awareness, Transaction Identifier territory, protocol type territory and answer identification field;
Described protocol version domain representation generates the version of the employed agreement that burrows when burrowing response message;
What described protocol-identifier domain representation burrowed the response message use is any agreement, is the agreement that burrows here;
Which response message that burrows described Transaction Identifier domain representation is;
Described protocol type domain representation is any message in the agreement that burrows, and is the response message that burrows here;
Whether described answer identification field need represents to reply, and default value is replied for needs in this territory.
Preferably, described burrowing confirmed as the protocol massages that burrows, and this protocol massages comprises: protocol version territory, the Protocol Standard field of awareness, Transaction Identifier territory, protocol type territory and reservation territory;
Described protocol version domain representation generates the version of the employed agreement that burrows when burrowing confirmation message;
What described protocol-identifier domain representation burrowed the confirmation message use is any agreement, is the agreement that burrows here;
Which confirmation message that burrows described Transaction Identifier domain representation is;
Described protocol type domain representation is any message in the agreement that burrows, and is the confirmation message that burrows here.
Preferably, step C specifically comprises:
C1, client send the request of burrowing to public network IP address corresponding to Correspondent Node;
C2, receive described burrow the request after, this Correspondent Node returns the response that burrows to public network IP address corresponding to this client;
C3, client judge the response that burrows of whether receiving at the appointed time from Correspondent Node, if receive, represent that then client to the burrowing successfully of Correspondent Node, enters step C4, otherwise, will double the stipulated time, after number of retransmissions adds 1, return step C1; If in the number of retransmissions of regulation, do not receive yet the response that burrows from Correspondent Node, then to judge overtimely, client burrows unsuccessfully to Correspondent Node;
C4, client send the affirmation that burrows to public network IP address corresponding to Correspondent Node;
C5, Correspondent Node judge the affirmation that burrows of whether receiving at the appointed time from client, if receive, then represent Correspondent Node to the burrowing successfully of client, otherwise, will double the stipulated time, after number of retransmissions adds 1, return step C2; If in the number of retransmissions of regulation, do not receive yet the affirmation that burrows from client, then to judge overtimely, Correspondent Node burrows unsuccessfully to client.
Preferably, the described initial stipulated time is 100 milliseconds, and number of retransmissions is 4 times, and initial number of retransmissions is set to 0.
Preferably, step B specifically comprises:
B1, client are initiated a public network IP address to Correspondent Node and are obtained request, carry public network IP address information corresponding to this client in this request;
B2, receive that described public network IP address obtains request after, this Correspondent Node returns a public network IP address to this client and obtains response;
B3, receive that described public network IP address obtains response after, this client is obtained the response from described public network IP address and is obtained public network IP address corresponding to this Correspondent Node.
Preferably, the described agreement that burrows is a kind of control protocol; The described protocol massages length that burrows is 14 bytes.
(3) beneficial effect
The present invention proposes the method that a kind of UDP of realization burrows, initiatively initiate the request of burrowing to Correspondent Node by client, Correspondent Node receives the backward client of the request of burrowing and sends the response that burrows, and client indicates client burrowing successfully to Correspondent Node to the response that burrows; Then client sends the affirmation that burrows to Correspondent Node again, Correspondent Node receives the acknowledgement indicator that burrows and Correspondent Node burrowing successfully to client, realized that successfully the UDP between client and the Correspondent Node burrows, not only shortened the time that UDP burrows and spends, and reduced and realized the UDP bandwidth resources that the transmission of data takies in the process that burrow, satisfy the demand that instant communicating system is used, thereby the network that improves the user is experienced
Description of drawings
Fig. 1 is the network structure of realizing that NAT device passes through;
Fig. 2 realizes the method flow diagram that UDP burrows according to one embodiment of the present invention.;
Fig. 3 is the method flow diagram of client corresponding public network IP address to Correspondent Node initiation session and obtaining communication opposite end in the inventive method;
Fig. 4 is that client and Correspondent Node carry out the method flow diagram that UDP burrows according to public network IP address corresponding to both sides in the inventive method.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used for explanation the present invention, but are not used for limiting the scope of the invention.
Main thought of the present invention is: client and Correspondent Node obtain respectively the public network IP address of self correspondence; Client is to the Correspondent Node initiation session, to inform public network IP address corresponding to this client of Correspondent Node, public network IP address corresponding to while obtaining communication opposite end; Client and Correspondent Node carry out UDP according to public network IP address corresponding to both sides and burrow.
Fig. 2 realizes the method flow diagram that UDP burrows according to one embodiment of the present invention.As shown in Figure 2, the method for the invention mainly may further comprise the steps:
Steps A, client and Correspondent Node obtain respectively the public network IP address of self correspondence.
Client or Correspondent Node at first to the third party device that can obtain its corresponding public network IP address, such as the STUN server, send public network IP address and obtain request after logining successfully; After receiving public network IP address that client or Correspondent Node send and obtaining request, the STUN server sends to this client or Correspondent Node with this client or public network IP address corresponding to Correspondent Node, how to obtain client or public network IP address corresponding to Correspondent Node is prior art about the STUN server.
Step B, client are to the Correspondent Node initiation session, to inform public network IP address corresponding to this client of Correspondent Node, public network IP address corresponding to while obtaining communication opposite end.
This session can be to adopt the conversation of the audio frequency and video of conversation initialized protocol (SIP).
Fig. 3 is the method flow diagram of client corresponding public network IP address to Correspondent Node initiation session and obtaining communication opposite end in the inventive method.As shown in Figure 3, the method comprises:
Step B1, client are initiated a public network IP address to Correspondent Node and are obtained request.
Carry public network IP address information corresponding to this client in this request.
Step B2, receive that described public network IP address obtains request after, this Correspondent Node returns a public network IP address to this client and obtains response.
This Correspondent Node obtains the request from the described public network IP address of receiving and obtains public network IP address information corresponding to this client, and obtains at this public network IP address and to carry public network IP address information corresponding to this Correspondent Node in the response.
Step B3, receive that described public network IP address obtains response after, this client is obtained the response from described public network IP address and is obtained public network IP address corresponding to this Correspondent Node.
In this step, client also can be to the third party device on the public network, such as sip server, sends the request of obtaining of public network IP address corresponding to Correspondent Node, carries public network IP address information corresponding to this client in this request; Sip server is transmitted to corresponding Correspondent Node with described request; This Correspondent Node obtains public network IP address information corresponding to this client from the described request of receiving, and the public network IP address information that this Correspondent Node is corresponding is carried at a public network IP address corresponding to Correspondent Node and obtains and send to this sip server in the response; This sip server is transmitted to this client with described response again; This client obtains public network IP address corresponding to this Correspondent Node from the described response of receiving.
Like this, this client and this Correspondent Node have all had public network IP address information corresponding to two ends.
Step C, client and Correspondent Node carry out UDP according to public network IP address corresponding to both sides and burrow.
In this step, client sends the request of burrowing to public network IP address corresponding to Correspondent Node; After receiving the described request of burrowing, this Correspondent Node returns the response that burrows to public network IP address corresponding to this client; After receiving the response that burrows from Correspondent Node, client sends the affirmation that burrows to public network IP address corresponding to Correspondent Node.
Further, client sends before the affirmation that burrows to public network IP address corresponding to Correspondent Node, can judge whether this Correspondent Node needs to burrow to this client, if necessary, client sends the affirmation that burrows to public network IP address corresponding to Correspondent Node, otherwise, process ends.
Fig. 4 is that client and Correspondent Node carry out the method flow diagram that UDP burrows according to public network IP address corresponding to both sides in the inventive method, and as shown in Figure 4, the method comprises:
Step C1, client send the request of burrowing to public network IP address corresponding to Correspondent Node;
In this step, the described request of burrowing is the protocol massages that burrows, and this request message structure that burrows is as shown in table 1,
Protocol version Protocol-identifier Transaction Identifier Protocol type Keep
Table 1
In table 1, the protocol version territory takies 2 bytes, the version of the employed agreement that burrows when expression generates and to burrow request message, and representing to use version such as 0X01 is 1 the agreement that burrows, the described agreement that burrows is a kind of control protocol; The Protocol Standard field of awareness takies 4 bytes, and what expression burrowed the request message use is any agreement, here be the agreement that burrows, this sign can be generated by self-defined random number, also can use global unique identification symbol (Globally Unique Identifier, GUID); The Transaction Identifier territory takies 4 bytes, and which request message that burrows expression is, this sign can be generated by self-defined random number, also can use global unique identification symbol (Globally Unique Identifier, GUID), this sign must be identical when the request message that burrows was retransmitted; The protocol type territory takies 2 bytes, and expression is any message in the agreement that burrows, and represents it is the request message that burrows with 0x01 here; Keep the territory, take 2 bytes.The message length of the agreement that as seen burrows is 14 bytes.
Step C2, receive described burrow the request after, this Correspondent Node returns the response that burrows to public network IP address corresponding to this client.
In this step, the described response that burrows is the protocol massages that burrows, and this response message structure that burrows is as shown in table 2,
Protocol version Protocol-identifier Transaction Identifier Protocol type Reply sign
Table 2
In table 2, the protocol version territory takies 2 bytes, the version of the employed agreement that burrows when expression generates and to burrow response message, and representing to use version such as 0X01 is 1 the agreement that burrows; The Protocol Standard field of awareness takies 4 bytes, and what expression burrowed the response message use is any agreement, here be the agreement that burrows, this sign can be generated by self-defined random number, also can use global unique identification symbol (Globally Unique Identifier, GUID); The Transaction Identifier territory takies 4 bytes, and which response message that burrows expression is, this sign can be generated by self-defined random number, also can use global unique identification symbol (Globally Unique Identifier, GUID), this sign must be identical when the response message that burrows was retransmitted; The protocol type territory takies 2 bytes, and expression is any message in the agreement that burrows, and represents it is the response message that burrows with 0x11 here; Reply identification field, take 2 bytes, whether expression needs to reply, wherein 1 expression needs to reply, 0 expression does not need to reply, need the initiator who replys this message of expression to burrow to the recipient of this message, do not need the initiator who replys this message of expression not wish to burrow to the recipient of this message, default value is 1 in this territory.
Step C3, client are judged the response that burrows of whether receiving at the appointed time from Correspondent Node, if receive, then represent client burrowing successfully to Correspondent Node, enter step C4, otherwise, will double the stipulated time, after number of retransmissions adds 1, return step C1; If in the number of retransmissions of regulation, do not receive yet the response that burrows from Correspondent Node, then to judge overtimely, client burrows unsuccessfully to Correspondent Node.
In this step, client receive from Correspondent Node burrow the response after, can judge further whether this Correspondent Node needs to burrow to this client, if necessary, enters step C4, otherwise, process ends.The initial stipulated time can be made as 100 milliseconds, and number of retransmissions is made as 4 times, and initial number of retransmissions is set to 0.
Step C4, client send the affirmation that burrows to public network IP address corresponding to Correspondent Node.
In this step, described burrowing confirmed as the protocol massages that burrows, and this confirmation message structure that burrows is as shown in table 1, protocol version territory wherein, take 2 bytes, the version of the employed agreement that burrows when expression generates and to burrow confirmation message, representing to use version such as 0X01 is 1 the agreement that burrows; The Protocol Standard field of awareness takies 4 bytes, and what expression burrowed the confirmation message use is any agreement, here be the agreement that burrows, this sign can be generated by self-defined random number, also can use global unique identification symbol (Globally Unique Identifier, GUID); The Transaction Identifier territory takies 4 bytes, and which confirmation message that burrows expression is, this sign can be generated by self-defined random number, also can use global unique identification symbol (Globally Unique Identifier, GUID); The protocol type territory takies 2 bytes, and expression is any message in the agreement that burrows, and represents it is the confirmation message that burrows with 0x21 here; Keep the territory, take 2 bytes.
Step C5, Correspondent Node judge the affirmation that burrows of whether receiving at the appointed time from client, if receive, then represent Correspondent Node to the burrowing successfully of client, otherwise, will double the stipulated time, after number of retransmissions adds 1, return step C2; If in the number of retransmissions of regulation, do not receive yet the affirmation that burrows from client, then to judge overtimely, Correspondent Node burrows unsuccessfully to client.
In this step, the initial stipulated time can be made as 100 milliseconds, and number of retransmissions is made as 4 times, and initial number of retransmissions is set to 0.
Since then, the UDP between client and the Correspondent Node burrows successfully, and both sides can directly communicate by cross-over NAT equipment.
As can be seen from the above embodiments, the embodiment of the invention has proposed the method that a kind of UDP burrows, initiatively initiate the request of burrowing to Correspondent Node by client, Correspondent Node receives the backward client of the request of burrowing and sends the response that burrows, and client indicates client burrowing successfully to Correspondent Node to the response that burrows; Then client sends the affirmation that burrows to Correspondent Node again, Correspondent Node receives the acknowledgement indicator that burrows and Correspondent Node burrowing successfully to client, realized that successfully the UDP between client and the Correspondent Node burrows, not only shortened the time that UDP burrows and spends, and reduced and realized the UDP bandwidth resources that the transmission of data takies in the process that burrow, satisfy the demand that instant communicating system is used, thereby the network that improves the user is experienced.
The above only is preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the technology of the present invention principle; can also make some improvement and modification, these improve and modification also should be considered as protection scope of the present invention.

Claims (9)

1. method that realizes that UDP burrows is characterized in that the method comprising the steps of:
A, client and Correspondent Node obtain respectively the public network IP address of self correspondence;
B, client are to the Correspondent Node initiation session, to inform public network IP address corresponding to this client of Correspondent Node, public network IP address corresponding to while obtaining communication opposite end;
C, client and Correspondent Node carry out UDP according to public network IP address corresponding to both sides and burrow;
Wherein, described step C specifically comprises:
Client sends the request of burrowing to public network IP address corresponding to Correspondent Node; After receiving the described request of burrowing, this Correspondent Node returns the response that burrows to public network IP address corresponding to this client; After receiving the response that burrows from Correspondent Node, client sends the affirmation that burrows to public network IP address corresponding to Correspondent Node.
2. the method for claim 1 is characterized in that, client sends before the affirmation that burrows to public network IP address corresponding to Correspondent Node, and the method further comprises:
Judge whether this Correspondent Node needs to burrow to this client, if necessary, client sends the affirmation that burrows to public network IP address corresponding to Correspondent Node, otherwise, process ends.
3. the method for claim 1 is characterized in that, the described request of burrowing is the protocol massages that burrows, and this protocol massages comprises: protocol version territory, the Protocol Standard field of awareness, Transaction Identifier territory, protocol type territory and reservation territory;
Described protocol version domain representation generates the version of the employed agreement that burrows when burrowing request message;
What described protocol-identifier domain representation burrowed the request message use is any agreement, is the agreement that burrows here;
Which request message that burrows described Transaction Identifier domain representation is;
Described protocol type domain representation is any message in the agreement that burrows, and is the request message that burrows here.
4. the method for claim 1 is characterized in that, the described response that burrows is the protocol massages that burrows, and this protocol massages comprises: protocol version territory, the Protocol Standard field of awareness, Transaction Identifier territory, protocol type territory and answer identification field;
Described protocol version domain representation generates the version of the employed agreement that burrows when burrowing response message;
What described protocol-identifier domain representation burrowed the response message use is any agreement, is the agreement that burrows here;
Which response message that burrows described Transaction Identifier domain representation is;
Described protocol type domain representation is any message in the agreement that burrows, and is the response message that burrows here;
Whether described answer identification field need represents to reply, and default value is replied for needs in this territory.
5. the method for claim 1 is characterized in that, described burrowing confirmed as the protocol massages that burrows, and this protocol massages comprises: protocol version territory, the Protocol Standard field of awareness, Transaction Identifier territory, protocol type territory and reservation territory;
Described protocol version domain representation generates the version of the employed agreement that burrows when burrowing confirmation message;
What described protocol-identifier domain representation burrowed the confirmation message use is any agreement, is the agreement that burrows here;
Which confirmation message that burrows described Transaction Identifier domain representation is;
Described protocol type domain representation is any message in the agreement that burrows, and is the confirmation message that burrows here.
6. the method for claim 1 is characterized in that, step C specifically comprises:
C1, client send the request of burrowing to public network IP address corresponding to Correspondent Node;
C2, receive described burrow the request after, this Correspondent Node returns the response that burrows to public network IP address corresponding to this client;
C3, client judge the response that burrows of whether receiving at the appointed time from Correspondent Node, if receive, represent that then client to the burrowing successfully of Correspondent Node, enters step C4, otherwise, will double the stipulated time, after number of retransmissions adds 1, return step C1; If in the number of retransmissions of regulation, do not receive yet the response that burrows from Correspondent Node, then to judge overtimely, client burrows unsuccessfully to Correspondent Node;
C4, client send the affirmation that burrows to public network IP address corresponding to Correspondent Node;
C5, Correspondent Node judge the affirmation that burrows of whether receiving at the appointed time from client, if receive, then represent Correspondent Node to the burrowing successfully of client, otherwise, will double the stipulated time, after number of retransmissions adds 1, return step C2; If in the number of retransmissions of regulation, do not receive yet the affirmation that burrows from client, then to judge overtimely, Correspondent Node burrows unsuccessfully to client.
7. method as claimed in claim 6 is characterized in that, the initial stipulated time is 100 milliseconds, and number of retransmissions is 4 times, and initial number of retransmissions is set to 0.
8. such as each described method among the claim 1-7, it is characterized in that step B specifically comprises:
B1, client are initiated a public network IP address to Correspondent Node and are obtained request, carry public network IP address information corresponding to this client in this request;
B2, receive that described public network IP address obtains request after, this Correspondent Node returns a public network IP address to this client and obtains response;
B3, receive that described public network IP address obtains response after, this client is obtained the response from described public network IP address and is obtained public network IP address corresponding to this Correspondent Node.
9. such as each described method among the claim 3-5, it is characterized in that the described agreement that burrows is a kind of control protocol; The described protocol massages length that burrows is 14 bytes.
CN2010102102995A 2010-06-28 2010-06-28 Method for implementing UDP hole punching Active CN101873359B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102102995A CN101873359B (en) 2010-06-28 2010-06-28 Method for implementing UDP hole punching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102102995A CN101873359B (en) 2010-06-28 2010-06-28 Method for implementing UDP hole punching

Publications (2)

Publication Number Publication Date
CN101873359A CN101873359A (en) 2010-10-27
CN101873359B true CN101873359B (en) 2013-04-24

Family

ID=42998018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102102995A Active CN101873359B (en) 2010-06-28 2010-06-28 Method for implementing UDP hole punching

Country Status (1)

Country Link
CN (1) CN101873359B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014107894A1 (en) * 2013-01-11 2014-07-17 华为技术有限公司 Method for traversing firewall, client and media traversing server
CN105577851A (en) * 2015-12-29 2016-05-11 深圳市科漫达智能管理科技有限公司 P2P communication method, P2P server and terminal
CN107071079B (en) * 2017-03-07 2020-10-20 上海斐讯数据通信技术有限公司 Method and system for private network terminal to acquire public network IP
CN107517206A (en) * 2017-08-18 2017-12-26 北京北信源软件股份有限公司 A kind of method, apparatus of secure communication, computer-readable recording medium and storage control
CN108063921A (en) * 2017-12-26 2018-05-22 天津天地人和企业管理咨询有限公司 A kind of optimization application process of embedded network monitoring equipment in P2P
CN111147186B (en) * 2019-12-30 2023-07-18 深圳市网心科技有限公司 Data transmission method and device, computer equipment and storage medium
CN113965630A (en) * 2021-10-25 2022-01-21 深圳市元征科技股份有限公司 UDP connection method, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217536A (en) * 2007-12-28 2008-07-09 腾讯科技(深圳)有限公司 A method, system and client to traverse network address transferring device/firewall
CN101741914A (en) * 2010-02-03 2010-06-16 上海悠络客电子科技有限公司 Method and system for penetrating NAT to establish overlay network in P2P network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090240824A1 (en) * 2008-03-11 2009-09-24 Boris Rekhtman UDP Hole Punch Timeout Discovery Algorithm Over Network Address Translation Connection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217536A (en) * 2007-12-28 2008-07-09 腾讯科技(深圳)有限公司 A method, system and client to traverse network address transferring device/firewall
CN101741914A (en) * 2010-02-03 2010-06-16 上海悠络客电子科技有限公司 Method and system for penetrating NAT to establish overlay network in P2P network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
P. Srisuresh etc.State of Peer-to-Peer (P2P) Communication across Network Address Translators (NATs).《Network Working Group RFC5128》.2008,全文.
State of Peer-to-Peer (P2P) Communication across Network Address Translators (NATs);P. Srisuresh etc;《Network Working Group RFC5128》;20080331;7-21 *

Also Published As

Publication number Publication date
CN101873359A (en) 2010-10-27

Similar Documents

Publication Publication Date Title
CN101873359B (en) Method for implementing UDP hole punching
CN101437036B (en) Document transmission method and system capable of supporting NAT/firewall traversing
CN110933180B (en) Communication establishment method, device, load equipment and storage medium
CN108833487A (en) A kind of TCP transmission protocol agent method
CN101883156B (en) Method for traversing NAT (Network Address Translation) equipment
KR101368615B1 (en) Method for realizing end-to-end call, end-to-end call terminal and system
CN102420774B (en) Method for realizing intranet penetration by using Internet group management protocol (IGMP) and intranet penetration system
WO2006136908A3 (en) System, terminal, method, and computer program product for establishing a transport- level connection with a server located behind a network address translator and/or firewall
US10601880B2 (en) Conference reconstruction in SIP networks
WO2009053646A8 (en) Method of traversing address translation equipment for sip signalling messages by temporary use of the tcp transport protocol.
CN101964785A (en) Method, terminal and system for transmitting file between SIP (Session Initiation Protocol) terminals in NAT (Network Address Translation) network
CN103688516B (en) There is provided the method for public accessibility and in relation to system and device
CN105357212A (en) DNS end-to-end analysis method capable of ensuring safety and privacy
CN102739815A (en) Method for reducing system time delaying of network address translation of video conference system
CN109995734A (en) A kind of communication means of the WebRTC based on Session Initiation Protocol
CN104601649A (en) Method and system for providing origin insight for web applications
CN105262847B (en) Communication means and system between terminal device
CN101909019A (en) Method and system for processing request message
CN101374139A (en) Proxy equipment, method and system for detecting session survival
CN108123912A (en) A kind of micro services system for supporting P2P
CN103916489B (en) The many IP of a kind of single domain name domain name analytic method and system
CN104168302B (en) Equipment manipulation implementation method, system and proxy gateway
CN100420196C (en) Method for realizing remote accession management for network equipment in NAT
CN107046537A (en) A kind of discovery method that OCF clients based on DNS SD are serviced AllJoyn
CN109120578B (en) Method and device for realizing link connection processing

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
CP02 Change in the address of a patent holder

Address after: Room 818, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building A block 5 layer

Patentee before: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

CP02 Change in the address of a patent holder