WO2007019809A1 - Procede et systeme d'etablissement d'un canal direct point par point - Google Patents
Procede et systeme d'etablissement d'un canal direct point par point Download PDFInfo
- Publication number
- WO2007019809A1 WO2007019809A1 PCT/CN2006/002111 CN2006002111W WO2007019809A1 WO 2007019809 A1 WO2007019809 A1 WO 2007019809A1 CN 2006002111 W CN2006002111 W CN 2006002111W WO 2007019809 A1 WO2007019809 A1 WO 2007019809A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- host
- data packet
- receiving
- nat
- address information
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/164—Adaptation or special uses of UDP protocol
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
Definitions
- the present invention relates to a connection technology for nodes in a computer network, and more particularly to a method and system for establishing a Peer to Peer (P2P) channel.
- P2P Peer to Peer
- this connection is a one-to-many relationship, such as As shown in Figure 1, a server can receive applications from multiple clients and provide services to multiple clients.
- the relationship between the two is non-reciprocal; the other is P2P, as shown in Figure 2.
- the connection in the P2P mode refers to the direct connection of every two nodes in the computer network, that is, the relationship between the two nodes is a peer-to-peer connection.
- the server In the client/server mode, since the server needs to provide services to multiple clients, it is usually necessary to use a high-performance machine, and the cost is generally large.
- the communication between the two parties in the P2P mode is a peer-to-peer relationship. The two provide each other with a monthly service. Therefore, the outstanding advantage of the P2P mode is that a large number of PCs with low performance can be connected to realize resource sharing and communication.
- the method has greatly reduced the cost and gradually become a new direction of network development.
- the main applications are file exchange, distributed computing, collaborative work, distributed search, and e-commerce.
- NAT Network Address Translator
- NAT is roughly classified into two types: Basic NAT, Cone NAT, and Symmetric NAT.
- Basic NAT private IP address, private port
- public network IP address, public network port The binding between Basic NAT (private IP address, private port) and (public network IP address, public network port), Basic NAT performs address translation for the bound port.
- Cone NAT establishes (private IP address, private port) and (public network IP address, public network port) binding relationship, and then, for application connections from the same private IP and port number, this binding will be reused. Port, as long as there is a connection session, the bound port will remain active.
- Cone NAT is divided into several subtypes: Full Cone NAT, Restricted Cone NAT, and Port-Restricted Cone NAT.
- Full Cone NAT establishes a public/private port binding for a new external session, it can receive data traffic from any external endpoint on the public network through this public port.
- Restricted Cone NAT will receive the packet of this external IP address after the internal host sends one or more packets to the IP address of an external host.
- Port-Restricted Cone NAT receives the external IP address and port number packet after the internal host sends one or more packets to the IP address and port number of an external host. It can be seen that Restricted Cone NAT and Port-Restricted Cone NAT can effectively protect internal hosts from receiving unrequested packets.
- Symmetric NAT does not maintain (private IP, private port number) and (public network IP, public network port number) binding relationship in all session devices. Instead, it will reassign a new public to each new session. Network port or public IP address.
- P2P is established between two nodes located in different types of NAT.
- a host A in the network needs to establish a P2P channel with host B, it usually needs an external server with dual IP to determine the NAT type of the network where it is located, and then submit the NAT type to the server. Similarly, the server also stores the host. The type of NAT submitted by B. Host A obtains the NAT type of the network where Host B is located from the server. If Host B is on the public network, or the NAT type of the network is Full Cone NAT, Host A adopts the active mode. As shown in Figure 3, Host A sends data directly. After the packet is sent to the host B, the host B returns the response packet to the host A to establish a P2P connection. Otherwise, the host A adopts the passive mode. As shown in FIG. 4, the host A notifies the host B to send the data packet to the host A through the server. A returns a response packet to host B to establish a P2P connection.
- the main object of the present invention is to provide a method and system for establishing a P2P channel, which improves the success rate of P2P channel establishment.
- a method of establishing a peer-to-peer direct channel including: After receiving the synchronization request sent by the first host, the server simultaneously sends the synchronization data packet including the address information of the other party to the first and second hosts;
- the first and second hosts After receiving the synchronization data packet, the first and second hosts send a User Datagram Protocol UDP data packet to the other party according to the received counterpart address information.
- the method further includes:
- the first host and the second host log in to the server, and the server records the network identifier and address information of the first and second hosts, respectively.
- the synchronization request sent by the first host to the server includes at least network identification and address information of the second host.
- the method further includes:
- the second host After receiving the synchronization data packet, the second host determines whether to establish a peer-to-peer direct connection with the first host, and if so, immediately sends a UDP data packet to the first host; otherwise, the process ends.
- the method further includes:
- the first host and the second host After receiving the UDP packet sent by the other party, the first host and the second host return the response packet to the other party.
- the package includes:
- the first host After receiving the synchronous data packet, the first host sends a UDP packet to the second host according to the received address information of the second host;
- the second host After receiving the synchronization data packet, the second host sends a UDP data packet to the first host according to the received address information of the first host.
- the second host After receiving the synchronization data packet, the second host sends the UDP data packet to the other party, including: after receiving the synchronization data wave packet, the second host sends the UDP data packet to the first host according to the received address information of the first host;
- the first host After receiving the synchronization data packet, the first host sends a UDP data packet to the second host according to the received address information of the second host.
- the second host is located in the Restricted Cone NAT or the Port-Restricted Cone NAT. After receiving the synchronization data packet, the first and second hosts send the UDP data packet to the other party, including:
- the first host After receiving the synchronous data packet, the first host sends a UDP packet to the second host according to the received address information of the second host;
- the second host After receiving the synchronization data packet, the second host sends a UDP data packet to the first host according to the received address information of the first host.
- the package includes:
- the second host After receiving the synchronous data packet, the second host sends a UDP packet to the first host according to the received address information of the first host;
- the first host After receiving the synchronization data packet, the first host sends a UDP data packet to the second host according to the received address information of the second host.
- the address information includes at least a public network internet protocol IP address and a port number.
- the address information further includes a private network IP address and a port number.
- a system for establishing a peer-to-peer direct connection channel includes a server, a first host, and a second host; After receiving the synchronization request sent by the first host, the server simultaneously sends the synchronization data packet including the address information of the other party to the first and second hosts;
- the first and second hosts After receiving the synchronization data packet, the first and second hosts send a User Datagram Protocol UDP data packet to the other party according to the received counterpart address information.
- a method of establishing a peer-to-peer direct connection channel comprising:
- the first host obtains address information of the second host from the server and network address converter NAT information of the network where the second host is located;
- the first host directly sends the UDP data packet to the second host according to the obtained second host address information
- the first host further determines the NAT information of the network in which it is located;
- the first host If the first host is located in the public network or is in the fully symmetric Full Cone NAT jurisdiction, the first host notifies the second host to send the UDP data packet to the first host A through the server;
- the first host sends a synchronization request to the server, and after receiving the synchronization request, the server simultaneously sends the synchronization data packet including the address information of the other party to the first and second hosts;
- the first and second hosts After receiving the synchronization data packet, the first and second hosts send a User Datagram Protocol UDP data packet to the other party according to the received counterpart address information.
- two hosts simultaneously send UDP data packets to each other, and when receiving the data packet sent by the other party, since the data packet has been sent to the other party, the NAT will receive
- the arriving packet is regarded as a valid data packet
- the P2P channel can be successfully established between the two hosts.
- the NAT of the network where the host is located is both Restricted Cone NAT or Port-Restricted Cone NAT, The problem of the inability to successfully establish a P2P tunnel due to the rejection of unsolicited packets by these two NATs.
- the P2P connection can be successfully established. Thereby greatly improving the success rate of P2P connection establishment.
- Figure 1 is a schematic diagram of a host in a network connected in a client/server manner.
- Figure 2 is a schematic diagram of a host connected in a network in a P2P manner.
- FIG. 3 is a schematic diagram of a prior art method for establishing a P2P channel in an active manner.
- FIG. 4 is a schematic diagram of a prior art method for establishing a P2P channel in a passive manner.
- Figure 5 is a schematic diagram of the present invention for establishing a P2P channel in a synchronous manner.
- Figure 6 is a flow chart of the present invention for establishing a P2P channel in a synchronous manner. Mode for carrying out the invention
- the present invention provides a method for establishing a P2P channel in a synchronous manner.
- Host A wishes to establish a P2P connection with Host B, it first sends a synchronization request packet to the server, and the server receives it. After the data packet is synchronously requested, the synchronous data packet including the network information of both parties is simultaneously sent to the host A and the host B. After the host A and the host B respectively receive the synchronization data packet, the user datagram protocol (UDP) data packet is immediately sent to the other party. After receiving the UDP packet sent by the other party, the UDP response packet is returned to the other party.
- UDP user datagram protocol
- Figure 6 is a flow chart of the present invention for establishing a P2P channel in a synchronous manner. As can be seen from Figure 6, The process specifically includes the following steps:
- Step 601 Host A and Host B log in to the server respectively.
- the server records the public IP address and public network port number, private network IP address, private network port number, and network identifier of Host A and Host B.
- Step 602 When the host A wants to establish a P2P connection between the host and the host B, the host sends a synchronization request packet to the server, where the synchronization packet includes at least the private network IP address and port number of the host A, and the public network IP of the host A.
- Step 603 After receiving the synchronization request data packet sent by host A, the server simultaneously sends synchronization data packets to host A and host B, and the synchronization data packet sent to host A includes at least The public network IP address and port number of host B, the private network IP address and port number of host B, and the synchronization data packet sent to host B contains at least the public network IP address and port number of host A and the private network IP address of host B. And port number, and then perform steps 604 and 606, respectively;
- Step 604 After receiving the synchronization data packet sent by the server, the host A immediately sends a UDP data packet to the host B according to the IP address and port number of the public network and the private network of the host B.
- Step 605 Host A receives the host. After the UDP packet sent by B, since host A has sent a UDP packet to host B, the NAT of the network where host B is located accepts the packet, host A returns a response packet to host B, and then exits the process.
- Step 606 After receiving the synchronization data packet sent by the server, the host B determines whether to establish a P2P connection with the host A. If yes, step 607 is performed; otherwise, the P2P channel establishment fails;
- Step 607 Host B immediately sends a UDP data packet to host A according to the IP address and port number of the public network and private network of host A.
- Step 608 After receiving the UDP data packet sent by the host A, the host B sends a UDP data packet to the host A, so the NAT of the network where the host A is located also accepts the data packet, and the host B returns to the host A. A response packet. Thereby, the establishment process of the P2P channel between the host ⁇ and the host B is completed.
- the method for establishing the P2P channel in the synchronous manner can successfully establish the P2P channel.
- step 604 For the case where host A is located within the jurisdiction of Restricted Cone NAT, Port-Restricted Cone NAT, or Symmetric NAT, and the host is located within the jurisdiction of the public network or Full Cone NAT, as long as step 604 has been performed before step 608, host A is Before receiving the UDP packet sent by host B, it has sent UDP packet to host B to ensure that the P2P channel can be successfully established.
- host A can be controlled to send a UDP packet to host B first, and then host B goes to Host A sends a UDP packet.
- step 607 For the case where host A is located within the jurisdiction of the public network or Full Cone NAT, and host B is located within the jurisdiction of Restricted Cone NAT, Port-Restricted Cone NAT, or Symmetric NAT, as long as step 607 has been performed before step 605, that is, host B is The UDP packet has been sent to Host A before receiving the UDP packet sent by Host A, which ensures that the P2P channel can be successfully established.
- the host B in order to ensure that the host B has sent the UDP packet to the host B before receiving the UDP packet sent by the host A, the host B can be controlled to send the UDP packet to the host A first, and then the host A sends the packet again. Host B sends a UDP packet.
- host A can be controlled to send UDP packets to host B first, and then host B Then, the host A sends a UDP packet; or, the host B can first send a UDP packet to the host A, and then the host A sends the UDP packet to the host B.
- Some systems use the Port-Restricted Cone NAT method to map the IP address and port number in the case of the detected Symmetric NAT.
- the Symmetric mapping method such as iptables, is used, and the two parties can establish a P2P connection. .
- establishing a P2P connection by using the synchronization mode of the present invention can at least solve the problem that the P2P channel cannot be established when the two hosts cannot be established within the jurisdiction of the Restricted Cone NAT or the Port-Restricted Cone NAT in the prior art, as long as it is ensured.
- the host of the two parties has already sent the data packet to the other party when receiving the data packet of the other party.
- the host A sends the UDP data packet to the host B.
- the time is greater than the time when the server sends the synchronization packet to the host B. In reality, this condition is easily satisfied. Therefore, the present invention can successfully establish a P2P connection in many cases, thereby improving the success rate of the P2P connection establishment.
- the present invention further includes a solution combining the foregoing scheme for simultaneously transmitting a data packet with a scheme for establishing a P2P channel in the prior art, which is specifically as follows:
- Host A obtains the address information of host B and the NAT type of the network where host B is located. If host B is on the public network or the NAT type of the network is Full Cone NAT, host A adopts the active mode, as shown in Figure 3. The host A directly sends a data packet to the host B according to the address information of the host B, and the host B returns the response data packet to the host A, thereby Establish a P2P connection;
- host A further determines whether it is within the jurisdiction of the public network or Full Cone NAT;
- host A If host A is located within the jurisdiction of the public network or Full Cone NAT, host A adopts the passive mode. As shown in FIG. 4, host A notifies host B to send a data packet to host A through the server, and host A returns a response packet to Host B, thereby establishing a P2P connection;
- the foregoing method for simultaneously transmitting the data packet is adopted, that is, the host A sends a synchronization request to the server, and the server simultaneously sends the host A and the host B at least the address information of the other party.
- the server After synchronizing the data packet, after receiving the synchronization data packet, Host A and Host B send the data packet to the other party.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Description
Claims
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
BRPI0616599-0A BRPI0616599A2 (pt) | 2005-08-18 | 2006-08-18 | método e sistema para estabelecer uma conexão ponto a ponto |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200510092810.5A CN1917512B (zh) | 2005-08-18 | 2005-08-18 | 一种建立对等直连通道的方法 |
CN200510092810.5 | 2005-08-18 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2007019809A1 true WO2007019809A1 (fr) | 2007-02-22 |
Family
ID=37738407
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2006/002111 WO2007019809A1 (fr) | 2005-08-18 | 2006-08-18 | Procede et systeme d'etablissement d'un canal direct point par point |
Country Status (4)
Country | Link |
---|---|
CN (1) | CN1917512B (zh) |
BR (1) | BRPI0616599A2 (zh) |
RU (1) | RU2373654C1 (zh) |
WO (1) | WO2007019809A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112468610A (zh) * | 2020-11-17 | 2021-03-09 | 杭州安恒信息安全技术有限公司 | 数据传输方法、监控节点、监控服务器及监控网络系统 |
CN112804285A (zh) * | 2020-11-08 | 2021-05-14 | 北京明瑞之光科技有限公司 | 一种景观照明系统及其文件传输方法 |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8060626B2 (en) * | 2008-09-22 | 2011-11-15 | Sony Computer Entertainment America Llc. | Method for host selection based on discovered NAT type |
CN101217536B (zh) * | 2007-12-28 | 2011-11-09 | 腾讯科技(深圳)有限公司 | 穿越网络地址转换设备/防火墙的方法、系统及客户端 |
CN101980508B (zh) * | 2010-11-01 | 2013-05-15 | 深圳市鼎盛威电子有限公司 | 网络监控系统上的网络自适应运行模式 |
CN103516795B (zh) * | 2013-09-26 | 2015-06-10 | 传线网络科技(上海)有限公司 | 分布式网络连通性改善方法以及使用该方法的分布式网络 |
CN104660722A (zh) * | 2013-11-21 | 2015-05-27 | 倚强科技股份有限公司 | 网络连线方法及其网络系统 |
CN110661860B (zh) * | 2019-09-18 | 2021-08-20 | 华为技术有限公司 | 一种建立通话的方法及通话设备 |
CN111506013A (zh) * | 2020-04-08 | 2020-08-07 | 上海汉枫电子科技有限公司 | 一种基于虚拟串口的plc设备远程数据通信实现方法 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1493140A (zh) * | 2001-02-20 | 2004-04-28 | �������繫˾ | 允许数据传输穿越防火墙的方法和设备 |
JP2004180003A (ja) * | 2002-11-27 | 2004-06-24 | Kitt Peak:Kk | 通信ネットワークシステムおよび通信の接続方法 |
US20040139228A1 (en) * | 2003-01-15 | 2004-07-15 | Yutaka Takeda | Peer-to-peer (P2P) connection despite network address translators (NATs) at both ends |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1166124C (zh) * | 2002-09-16 | 2004-09-08 | 联想(北京)有限公司 | 家庭网络中实现动态组网时的设备对等连接方法 |
-
2005
- 2005-08-18 CN CN200510092810.5A patent/CN1917512B/zh active Active
-
2006
- 2006-08-18 BR BRPI0616599-0A patent/BRPI0616599A2/pt not_active Application Discontinuation
- 2006-08-18 RU RU2008109140/09A patent/RU2373654C1/ru active
- 2006-08-18 WO PCT/CN2006/002111 patent/WO2007019809A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1493140A (zh) * | 2001-02-20 | 2004-04-28 | �������繫˾ | 允许数据传输穿越防火墙的方法和设备 |
JP2004180003A (ja) * | 2002-11-27 | 2004-06-24 | Kitt Peak:Kk | 通信ネットワークシステムおよび通信の接続方法 |
US20040139228A1 (en) * | 2003-01-15 | 2004-07-15 | Yutaka Takeda | Peer-to-peer (P2P) connection despite network address translators (NATs) at both ends |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112804285A (zh) * | 2020-11-08 | 2021-05-14 | 北京明瑞之光科技有限公司 | 一种景观照明系统及其文件传输方法 |
CN112804285B (zh) * | 2020-11-08 | 2023-08-04 | 北京明瑞之光科技有限公司 | 一种景观照明系统及其文件传输方法 |
CN112468610A (zh) * | 2020-11-17 | 2021-03-09 | 杭州安恒信息安全技术有限公司 | 数据传输方法、监控节点、监控服务器及监控网络系统 |
CN112468610B (zh) * | 2020-11-17 | 2023-06-06 | 杭州安恒信息安全技术有限公司 | 数据传输方法、监控节点、监控服务器及监控网络系统 |
Also Published As
Publication number | Publication date |
---|---|
CN1917512A (zh) | 2007-02-21 |
CN1917512B (zh) | 2010-09-29 |
RU2373654C1 (ru) | 2009-11-20 |
BRPI0616599A2 (pt) | 2011-06-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114866521B (zh) | 会议服务器 | |
CN112911027B (zh) | 用于建立媒体会话的方法和装置 | |
EP2112788B1 (en) | A method and node for p2p content sharing | |
US7227864B2 (en) | Methods and systems for establishing communications through firewalls and network address translators | |
US8868757B1 (en) | Two-way web service router gateway | |
US7366894B1 (en) | Method and apparatus for dynamically securing voice and other delay-sensitive network traffic | |
WO2007019809A1 (fr) | Procede et systeme d'etablissement d'un canal direct point par point | |
EP3225014B1 (en) | Source ip address transparency systems and methods | |
US11425216B2 (en) | Virtual private network (VPN) whose traffic is intelligently routed | |
WO2003021931A1 (fr) | Procede et appareil d'egalisation de la charge d'un serveur de transmission multimedia en continu | |
WO2010127610A1 (zh) | 一种虚拟专用网节点信息的处理方法、设备及系统 | |
WO2016210202A1 (en) | Media relay server | |
WO2010063242A1 (zh) | 时钟同步的方法、设备以及网络系统 | |
US20140123267A1 (en) | Method and system for tcp turn operation behind a restrictive firewall | |
US20140337478A1 (en) | Peer-to-peer network communications | |
US20120300776A1 (en) | Method for creating virtual link, communication network element, and ethernet network system | |
CA2884382C (en) | Method and system for tcp turn operation behind a restrictive firewall | |
US11716222B2 (en) | Communications bridge | |
WO2023116165A1 (zh) | 网络负载均衡方法、装置、电子设备、介质和程序产品 | |
WO2011044810A1 (zh) | 实现多方通信的方法、装置及系统 | |
KR100660123B1 (ko) | Nat 통과를 위한 브이.피.엔 서버 시스템 및 브이.피.엔클라이언트 단말기 | |
Komu et al. | Basic host identity protocol (HIP) extensions for traversal of network address translators | |
KR101996588B1 (ko) | Arp 프로토콜을 지원하는 분리망 연계장치 및 그 제어방법 | |
CN117439815B (zh) | 一种基于反向透明桥接的内网穿透系统及方法 | |
US20240171641A1 (en) | Data service management of proxy devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
WWE | Wipo information: entry into national phase |
Ref document number: 783/CHENP/2008 Country of ref document: IN |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2008109140 Country of ref document: RU |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSANT TO RULE 112(1) EPC OF 26-06-2008 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 06775429 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: PI0616599 Country of ref document: BR Kind code of ref document: A2 Effective date: 20080218 |