KR101586058B1 - Device for connecting peer-to-peer communication considering nat types and method connecting peer-to-peer communication using the same - Google Patents

Device for connecting peer-to-peer communication considering nat types and method connecting peer-to-peer communication using the same Download PDF

Info

Publication number
KR101586058B1
KR101586058B1 KR1020140177838A KR20140177838A KR101586058B1 KR 101586058 B1 KR101586058 B1 KR 101586058B1 KR 1020140177838 A KR1020140177838 A KR 1020140177838A KR 20140177838 A KR20140177838 A KR 20140177838A KR 101586058 B1 KR101586058 B1 KR 101586058B1
Authority
KR
South Korea
Prior art keywords
client
node
type
public
network address
Prior art date
Application number
KR1020140177838A
Other languages
Korean (ko)
Inventor
허의남
봉재식
Original Assignee
경희대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 경희대학교 산학협력단 filed Critical 경희대학교 산학협력단
Priority to KR1020140177838A priority Critical patent/KR101586058B1/en
Application granted granted Critical
Publication of KR101586058B1 publication Critical patent/KR101586058B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

According to the present invention, a method for connecting peer-to-peer (P2P) communication, which allows a device to connect P2P communication in a network address translator (NAT) environment, comprises the steps of: considering a distribution of a network address translator to explore a type of a network address translator to which clients belong; and establishing a P2P connection according to the type of the network address translator of a node to which clients to perform P2P communication belong, and applying a P2P connection algorithm according to whether information of the node to which the clients belong exists to perform the P2P connection.

Description

NAT환경을 고려한 피투피 통신 연결 장치 및 이를 이용한 피투피 통신 연결 방법{DEVICE FOR CONNECTING PEER-TO-PEER COMMUNICATION CONSIDERING NAT TYPES AND METHOD CONNECTING PEER-TO-PEER COMMUNICATION USING THE SAME}TECHNICAL FIELD [0001] The present invention relates to a peer-to-peer communication connection apparatus considering a NAT environment and a peer-to-peer communication connection method using the same. BACKGROUND ART [0002]

본 발명은 피투피 통신 연결 장치 및 이를 이용한 피투피 통신 연결 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a hand-held communication connection apparatus and a method for connecting a hand-held communication using the same.

종래 기술은 P2P 연결을 위해서 STUN(Session Traversal Utilities for NAT) 방식, TURN(Traversal Using Relay around NAT) 및 ICE(Interactive Connectiviy Establishment) 등을 통해 네트워크 주소 변환기(Network Address Translator, 이하 NAT)의 유형을 파악한다.In the prior art, the type of a network address translator (NAT) is identified through P2P connection using STUN (Session Traversal Utilities for NAT) method, TURN (Traversal Using Relay around NAT) and ICE (Interactive Connectiviy Establishment) do.

여기서, STUN은 공공 IP 주소와 공공 포트를 찾기 위한 방법에 대한 표준이며, STUN자체가 P2P연결을 수행하는 것은 아니고, P2P 연결을 수행할 때 쓰이는 IP, 포트 번호를 찾기 위해 사용되는 기술이다. 그리고, TURN은 중개 서버(Relaying server)를 통해 클라이언트 간의 데이터를 송수신할 수 있게 한다. 따라서, TURN은 모든 종류의 NAT에게 P2P 연결을 보장한다. 하지만, TURN은 궁극적으로 P2P 연결을 맺게 하지 못하고 중개 서버를 항상 사용해야 하므로, 데이터 전송시 마다 P2P 연결에 비해 큰 오버헤드를 가지게 된다.Here, STUN is a standard for searching public IP address and public port. STUN itself is not a P2P connection, but a technique used to find an IP and a port number used for P2P connection. And, TURN makes it possible to send and receive data between clients through a relaying server. Therefore, TURN guarantees P2P connection to all kinds of NAT. However, since TURN ultimately fails to establish a P2P connection and always uses the intermediary server, it has a large overhead compared to the P2P connection for each data transmission.

또한, ICE는 P2P 연결을 위해 가장 많이 사용되는 표준으로써, STUN과 TURN을 혼합해서 사용하는 방식이다.. 하지만 ICE는 P2P 연결을 위해서 항상 9번의 검사를 수행하게 되므로, 이는 오버헤드를 발생시키고, P2P 연결 시 많은 지연시간을 발생시킨다.Also, ICE is the most used standard for P2P connection. It is a mixture of STUN and TURN. However, since ICE always performs 9 checks for P2P connection, it causes overhead, P2P connection causes a lot of delay time.

이와 같이 종래 기술은 P2P 연결을 수행하기 위해 많은 메시지를 주고받게 되고, 대역폭을 많이 사용하게 되어 오버헤드를 발생시키는 어려움이 있다. As described above, in the conventional technology, many messages are exchanged in order to perform a P2P connection, and there is a problem that overhead is generated because a lot of bandwidth is used.

본 발명은 NAT의 분포 및 종류를 고려해서 피투피(P2P) 연결을 수행하도록 제어할 수 있는 피투피 통신 연결 장치 및 이를 이용한 피투피 통신 연결 방법을 제안하고자 한다.The present invention proposes a peer-to-peer communication connection apparatus capable of controlling a peer-to-peer (P2P) connection in consideration of the distribution and kind of a NAT, and a peer-to-peer communication connection method using the same.

본 발명의 피투피 통신 연결 방법은 피투피 통신 연결 장치가 네트워크 주소 변환기(Network Address Translator, NAT) 환경에서 피투피 통신을 연결하는 방법에서, 네트워크 주소 변환기의 분포를 고려해서 클라이언트들이 속한 네트워크 주소 변환기의 유형을 탐색하는 단계, 그리고 P2P 통신을 수행하고자 하는 클라이언트들이 속한 노드의 네트워크 주소 변환기의 유형에 따라 P2P 연결을 수립하며, 상기 클라이언트들이 속한 노드의 정보 유무에 따라 P2P 연결 알고리즘을 적용해 P2P 연결을 수행하는 단계를 포함한다.In the method of the present invention, the peer-to-peer communication connection unit connects the peer-to-peer communication in a network address translator (NAT) environment. In consideration of the distribution of the network address translator, And establishes a P2P connection according to the type of the network address translator of the node to which the clients want to perform P2P communication and establishes a P2P connection by applying a P2P connection algorithm according to the presence or absence of information of the nodes to which the clients belong .

상기 네트워크 주소 변환기의 유형을 탐색하는 단계는, 적어도 두 개 이상의 서버로 메시지를 보내는 단계, 그리고 각각의 서버에서 추출한 공공 IP 주소 및 포트 번호를 수신하고, 수신된 공공 IP 주소 및 포트 번호를 비교하는 단계를 포함하며, 상기 비교하는 단계, 각각의 서버에서 추출한 상기 공공 IP 주소와 상기 포트 번호가 다르다면, 상기 노드가 속한 네트워크 주소 변화기의 유형을 대칭 네트워크 주소 변환기(Symmetric NAT)로 판단하는 단계, 그리고 상기 공공 IP 주소가 사설 IP 주소와 같다면, 상기 노드가 속한 네트워크 주소 변환기의 유형이 공공망(public domain)에 포함되는 것으로 판단하고, 상기 노드의 클라이언트가 방화벽에 막혀있는지 확인하는 단계를 포함할 수 있다.The step of searching for the type of the network address translator may include sending a message to at least two or more servers, receiving public IP address and port number extracted from each server, comparing the received public IP address and port number Determining, by the symmetric network address translator (Symmetric NAT), the type of the network address changer to which the node belongs if the public IP address extracted from each server is different from the port number; And if the public IP address is the same as the private IP address, determining that the type of the network address translator to which the node belongs is included in the public domain and checking whether the client of the node is blocked by the firewall can do.

상기 비교하는 단계는, 각각의 서버에서 추출한 상기 공공 IP 주소와 상기 포트 번호가 같거나 상기 공공 IP 주소와 상기 사설 IP 주소와 같지 않다면, 어느 한 서버에서 노드로 포트 번호를 바꿔서 메시지를 전송하고 응답 여부를 확인하는 단계를 더 포함하며, 상기 응답 여부를 확인하는 단계는, 상기 노드에서 응답이 있는 경우, 상기 노드가 속한 네트워크 주소 변화기 유형을 풀 콘 네트워크 주소 변환기(full cone NAT) 또는 제한 콘 네트워크 주소 변환기(Restricted Cone NAT)로 판단하는 단계, 그리고 상기 노드에서 응답이 없는 경우, 상기 노드가 속한 네트워크 주소 변화기 유형을 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)로 판단하는 단계를 포함할 수 있다.Wherein the comparison is performed such that if the public IP address and the port number extracted from the respective servers are the same or not the same as the public IP address and the private IP address, Wherein the step of verifying whether or not the response is to be performed comprises the step of, when a response is received from the node, transmitting the type of the network address changer to which the node belongs to a full cone NAT or limited cone network Determining whether the node is an address translator (Restricted Cone NAT), and if the node does not receive a response, determining a type of the network address changer to which the node belongs as a Port Restricted Cone NAT .

상기 P2P 연결을 수행하는 단계는, 클라이언트들이 연결된 노드들의 네트워크 주소 변환기 유형을 파악하는 단계, 제1 클라이언트가 연결된 노드가 속한 네트워크 주소 변환기의 유형이 공공망인 경우, 제2 클라이언트에게 공공 IP 주소 및 포트 번호를 전송해 P2P 연결을 수립하는 단계, 그리고 상기 제1 클라이언트가 연결된 노드의 유형이 풀 콘 네트워크 주소 변환기(full cone NAT) 또는 제한 콘 네트워크 주소 변환기(Restricted Cone NAT)인 경우, 상기 제1 클라이언트 및 상기 제2 클리이언트 모두에게 공공 IP 주소 및 포트 번호를 전송해 홀 펀칭(Hole Punching)을 수행하는 단계를 포함할 수 있다.The step of performing the P2P connection comprises: identifying a type of a network address translator of nodes to which the clients are connected; if the type of the network address translator to which the first client is connected belongs to the public network, And establishing a P2P connection by forwarding the first client to the second client when the type of the node to which the first client is connected is a full cone NAT or a Restricted Cone NAT, And performing hole punching by transmitting a public IP address and a port number to both the second client and the second client.

상기 P2P 연결을 수행하는 단계는, 상기 제1 클라이언트가 연결된 노드의 유형이 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)인 경우, 상기 제2 클라이언트가 연결된 노드의 네트워크 주소 변환기의 유형을 탐색하는 단계, 탐색 결과, 상기 제2 클라이언트가 연결된 노드가 대칭 네트워크 주소 변환기(Symmetric NAT)가 아니라면, 상기 제1 클라이언트 및 상기 제2 클리이언트 모두에게 공공 IP 주소 및 포트 번호를 전송해 홀 펀칭(Hole Punching)을 수행하는 단계, 그리고 상기 제2 클라이언트가 연결된 노드의 유형이 대칭 네트워크 주소 변환기(Symmetric NAT)라면, 별도의 중계 서버를 통해서 P2P 연결을 수립하는 단계를 더 포함할 수 있다.The step of performing the P2P connection may include searching for a type of a network address translator of a node to which the second client is connected when the type of the node to which the first client is connected is a Port Restricted Cone NAT If the node connected to the second client is not a symmetric network address translator (Symmetric NAT), it sends a public IP address and a port number to both the first client and the second client to perform hole punching, And establishing a P2P connection through a separate relay server if the type of the node to which the second client is connected is a symmetric network address translator (Symmetric NAT).

본 발명의 피투피 통신 연결 장치는 적어도 하나 이상의 클라이언트 및 노드와 메시지를 송수신하는 송수신부, 송수신된 메시지를 이용해서 클라이언트가 연결된 노드의 네트워크 주소 변환기(Network Address Translator, NAT)의 유형을 탐색하는 탐색부, 그리고 클라이언트들이 속한 노드들의 네트워크 주소 변환기의 유형에 따라 P2P 연결을 수립하며, 적어도 하나의 노드에 대한 네트워크 주소 변환기의 정보만 가지고 있는 경우, P2P 연결 알고리즘을 적용해 P2P 연결을 수행하도록 제어하는 피투피 연결부를 포함한다.The handover communication connection apparatus of the present invention includes a transmission / reception unit for transmitting / receiving messages to / from at least one client and a node, a search unit for searching a type of a network address translator (NAT) of a node connected to the client using the transmitted / And establishes a P2P connection according to the type of the network address translator of the nodes to which the clients belong and controls the P2P connection to be performed by applying the P2P connection algorithm when only the information of the network address translator for at least one node is included And a connection portion.

상기 네트워크 주소 변환기의 유형은, 공공망(public domain), 풀 콘 네트워크 주소 변환기 (full cone NAT), 제한 콘 네트워크 주소 변환기(Restricted Cone NAT), 포트 제한 콘 주소 변환기(Port Restricted Cone NAT) 또는 대칭 네트워크 주소 변환기(Symmetric NAT) 중 적어도 하나 이상을 포함할 수 있다.The type of the network address translator may be a public domain, a full cone NAT, a Restricted Cone NAT, a Port Restricted Cone NAT, And a network address translator (Symmetric NAT).

상기 탐색부는, 적어도 두개 이상의 서버에서 추출한 공공 IP 주소 및 포트 번호를 비교하는 비교부, 그리고 각각의 서버에서 추출한 상기 공공 IP 주소와 상기 포트 번호가 다르다면, 상기 노드가 속한 네트워크 주소 변화기의 유형을 대칭 네트워크 주소 변환기(Symmetric NAT)로 판단하고, 상기 공공 IP 주소가 사설 IP 주소와 같다면, 상기 노드가 속한 네트워크 주소 변환기의 유형을 공공망(public domain)으로 판단하는 판단부를 포함할 수 있다.The searching unit may include a comparison unit comparing the public IP address and the port number extracted from at least two servers and, if the public IP address extracted from each server is different from the port number, the type of the network address changer to which the node belongs The network address translator may be a symmetric network address translator (Symmetric NAT), and if the public IP address is the same as the private IP address, a determination unit that determines the type of the network address translator to which the node belongs as a public domain.

상기 판단부는, 상기 공공 IP 주소와 상기 포트 번호가 같거나 상기 공공 IP 주소와 상기 사설 IP 주소와 같지 않은 경우, 어느 한 서버에서 노드로 포트 번호를 바꿔서 전송한 메시지에 응답을 하는 경우, 상기 노드가 속한 유형이 풀 콘 네트워크 주소 변환기(full cone NAT) 또는 제한 콘 네트워크 주소 변환기(Restricted Cone NAT)로 판단하고, 응답이 없는 경우, 상기 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)로 판단할 수 있다.When the public IP address and the port number are the same or are not the same as the public IP address and the private IP address, when the server responds to a message transmitted by exchanging a port number from a server to a node, It can be determined as the Port Restricted Cone NAT if it is determined that the type is a full cone NAT or a Restricted Cone NAT and if there is no response, have.

상기 피투피 연결부는, 제1 클라이언트가 연결된 노드가 속한 네트워크 주소 변환기의 유형이 공공망인 경우, 제2 클라이언트에게 공공 IP 주소 및 포트 번호를 전송해 P2P 연결을 수립하도록 제어하고, 상기 제1 클라이언트가 연결된 노드의 유형이 풀 콘 네트워크 주소 변환기(full cone NAT) 또는 제한 콘 네트워크 주소 변환기(Restricted Cone NAT)인 경우, 상기 제1 클라이언트 및 상기 제2 클리이언트 모두에게 공공 IP 주소 및 포트 번호를 전송해 홀 펀칭(Hole Punching)을 수행하도록 제어할 수 있다.Wherein the peer-to-peer connection unit controls to establish a P2P connection by transmitting a public IP address and a port number to a second client when the type of the network address translator to which the first client is connected belongs to the public network, If the type of node is a full cone NAT or Restricted Cone NAT, it sends a public IP address and port number to both the first client and the second client, It can be controlled to perform hole punching.

상기 피투피 연결부는, 제1 클라이언트가 연결된 노드의 유형이 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)인 경우, 상기 제2 클라이언트가 연결된 노드의 네트워크 주소 변환기의 유형을 탐색하고, 탐색 결과, 상기 제2 클라이언트가 연결된 노드가 대칭 네트워크 주소 변환기(Symmetric NAT)가 아니라면 제1 클라이언트 및 제2 클리이언트 모두에게 공공 IP 주소 및 포트 번호를 전송해 홀 펀칭(Hole Punching)을 수행하도록 제어하고, 상기 제2 클라이언트가 연결된 노드의 유형이 대칭 네트워크 주소 변환기(Symmetric NAT)라면, 별도의 중계 서버를 통해서 P2P 연결을 수립하도록 제어할 수 있다.Wherein if the type of the node to which the first client is connected is a Port Restricted Cone NAT, the peer-to-peer connection unit searches the type of the network address translator of the node to which the second client is connected, 2, if the node to which the client is connected is not a symmetric network address translator (Symmetric NAT), control to perform hole punching by transmitting a public IP address and port number to both the first client and the second client, If the type of the node to which the client is connected is a symmetric network address translator (Symmetric NAT), it can be controlled to establish a P2P connection through a separate relay server.

본 발명에 따르면, NAT의 유형 및 분포를 고려해서 NAT 유형을 탐색하고, NAT 유형에 따라 단계적으로 피투피 연결을 수행하도록 제어함으로써, P2P 연결에 대한 신뢰성을 보장하고, 메시지 량 및 지연시간 등의 여러 오버헤드를 줄일 수 있는 환경을 제공한다. According to the present invention, the NAT type is searched in consideration of the type and distribution of the NAT, and the control is performed so that the peer-to-peer connection is performed stepwise according to the NAT type, thereby assuring the reliability of the P2P connection, Provides an environment to reduce overhead.

도 1은 본 발명의 한 실시예에 따른 피투피 통신 연결 장치의 구조를 간략히 도시한 도면이다.
도 2는 단말들이 속한 노드들의 NAT 유형에 따른 피투피 연결 기술을 도시한 도면이다.
도 3는 본 발명의 한 실시예에 따라 피투피 통신 연결 장치가 NAT 유형을 탐색하는 과정을 간략히 도시한 흐름도이다.
도 4는 본 발명의 한 실시예에 따라 피투피 통신 연결 장치가 피투피 연결을 수립하는 과정을 간략히 도시한 흐름도이다.
도 5는 본 발명과 종래기술의 NAT 유형 탐색시 걸리는 시간에 대한 기대값을 비교한 도면이다.
도 6은 본 발명과 종래기술의 NAT 유형 탐색시 사용되는 메시지 량에 대한 기대값을 비교한 도면이다.
도 7은 본 발명과 종래기술의 피투피 연결시 각 시나리오에 대한 사용 메시지 기대값을 비교한 도면이다.
도 8은 본 발명의 한 실시예에 따른 피투피 연결시 각 시나리오에 대한 사용 메시지 기대값을 비교한 도면이다.
FIG. 1 is a view schematically showing a structure of a hand-held communication connection device according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a peer-to-peer connection technique according to the NAT type of nodes to which the terminals belong.
FIG. 3 is a flow chart briefly illustrating a process of searching for a NAT type by a peer-to-peer communication connection apparatus according to an embodiment of the present invention.
4 is a flowchart briefly illustrating a process of establishing a handoff connection by a handoff communication apparatus according to an embodiment of the present invention.
FIG. 5 is a graph comparing expected values of time required for searching NAT type of the present invention and prior art.
FIG. 6 is a graph comparing expected values of a message amount used in the search of the NAT type according to the present invention and the prior art.
FIG. 7 is a graph comparing expected message usage values for respective scenarios when a face-to-face connection of the present invention and the related art is performed.
FIG. 8 is a graph comparing expected message usage values for respective scenarios when a face-to-face is connected according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when an element is referred to as "comprising ", it means that it can include other elements as well, without excluding other elements unless specifically stated otherwise.

또한, 명세서에 기재된 "…부", "…모듈" 의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.Also, the terms of " part ", "... module" in the description mean units for processing at least one function or operation, which may be implemented by hardware or software or a combination of hardware and software.

이제 도 1 내지 도 8를 참고하여 본 발명의 한 실시예에 따른 피투피 통신 연결 장치 및 이를 이용한 피투피 통신 연결 방법에 대하여 상세하게 설명한다.1 is a block diagram illustrating a mobile communication system according to an embodiment of the present invention; FIG. 2 is a block diagram illustrating a mobile communication system according to an embodiment of the present invention; FIG.

도 1은 본 발명의 한 실시예에 따른 피투피 통신 연결 장치의 구조를 간략히 도시한 도면이다. 이때, 피투피 통신 연결 장치는 본 발명의 실시예에 따른 설명을 위해 필요한 개략적인 구성만을 도시할 뿐 이러한 구성에 국한되는 것은 아니다.FIG. 1 is a view schematically showing a structure of a hand-held communication connection device according to an embodiment of the present invention. At this time, the peer-to-peer communication connection device only shows the schematic configuration necessary for the explanation according to the embodiment of the present invention, and is not limited to this configuration.

우선, 본 발명의 한 실시예에 따른 피투피(P2P) 통신 연결 장치(100)는 클라이언트가 P2P 연결을 요청하기 전에, 클라이언트의 공인(Public) IP 주소, 공인 포트(Port) 번호 및 클라이언트가 속해있는 네트워크 주소 변환기(Network Address Translator, 이하 NAT) 환경에 대한 정보를 사전에 검사하고 서버에 저장한다. 이를 통해 본 발명의 한 실시예는 P2P 연결 요청이 있을 때, 보다 정확하게 P2P 연결을 수립 할 뿐만 아니라, P2P 연결 수립 시 필요한 메시지량 및 지연시간을 줄일 수 있다.First, a peer-to-peer (P2P) communication connection device 100 according to an embodiment of the present invention includes a public IP address, a public port number, and a public IP address of a client before a client requests a P2P connection The network address translator (NAT) environment is checked in advance and stored in the server. Accordingly, an embodiment of the present invention not only establishes a P2P connection more accurately when there is a P2P connection request, but also can reduce a message amount and a delay time required when establishing a P2P connection.

그리고, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 NAT의 유형을 검색할 때, 세계적으로 어떠한 NAT의 유형이 많이 쓰이는지, 그 분포에 따라 NAT 유형을 찾는 우선순위를 변경한다. 따라서, 세계적으로 많이 쓰이는 대칭 네트워크 주소 변환기(Symmetric NAT)와 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)을 먼저 찾고, 그 후에 다른 NAT 유형을 검사하고, 이를 통해 기존의 기술보다 전송 메시지량과 지연시간을 줄일 수 있는 효과를 기대할 수 있다.In addition, the peer-to-peer communication connection apparatus 100 according to an embodiment of the present invention changes the priorities of searching for the NAT type depending on the type of NAT used worldwide when searching for the type of NAT. Therefore, we first find symmetric network address translator (Symmetric NAT) and Port Restricted Cone NAT, which are widely used in the world, and then check other NAT types, The effect of reducing the time can be expected.

또한, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 P2P 연결 시, 두 클라이언트의 정보 유무에 따라, 두 클라이언트의 정보를 모두 알 경우, 두 클라이언트의 정보를 모두 모를 경우, 하나의 클라이언트에 대한 정보만 알 경우로 나누어, 각각 필요한 기술들을 단계적으로 수행한다. 이를 통해서, 본 발명의 한 실시예는 기존의 기술보다 P2P 연결을 보다 정확하게 연결할 수 있게 되고, 단계적으로 수행해 불필요한 검사 과정을 거치지 않으므로, P2P 연결 시 발생하는 오버헤드를 줄일 수 있다. In addition, when the peer-to-peer communication connection apparatus 100 according to an embodiment of the present invention recognizes information of two clients according to the presence or absence of information of two clients at the time of P2P connection, It is divided into cases of knowing only information about the clients, and each of the necessary technologies is performed step by step. Accordingly, an embodiment of the present invention can connect the P2P connection more accurately than the existing technology, and does not perform an unnecessary inspection process step by step, thereby reducing the overhead incurred in P2P connection.

도 1을 참조하면, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 송수신부(110), 탐색부(120) 및 피투피 연결부(130)을 포함한다. Referring to FIG. 1, a handheld communication device 100 according to an exemplary embodiment of the present invention includes a transceiver 110, a search unit 120, and a hand-held connection unit 130.

송수신부(110)는 적어도 하나 이상의 클라이언트 및 노드와 메시지를 송수신한다. 송수신부(110)는 공인 IP 주소, 포트 번호 및 NAT 환경에 대한 정보를 송수신 할 수 있다.The transmission / reception unit 110 transmits and receives messages to and from at least one client and node. The transceiver 110 can transmit and receive public IP address, port number, and information on the NAT environment.

탐색부(120)는 송수신부(110)에서 송수신된 메시지를 이용해서 클라이언트가 연결된 노드의 NAT의 유형을 탐색한다.The searching unit 120 searches for the type of NAT of the node to which the client is connected using the message transmitted / received by the transmitting / receiving unit 110.

탐색부(120)는 본 발명의 한 실시예에 따라 비교부(122) 및 판단부(124)를 포함한다.The search unit 120 includes a comparison unit 122 and a determination unit 124 according to an embodiment of the present invention.

비교부(122)는 적어도 두개 이상의 서버에서 추출한 공공 IP 주소 및 포트 번호를 비교한다.The comparing unit 122 compares the public IP address and the port number extracted from at least two servers.

그리고, 판단부(124)는 공공 IP 주소와 포트 번호 등의 비교 결과에 따라 노드의 NAT 유형을 판한다. 판단부(124)는 각각의 서버에서 추출한 공공 IP 주소와 포트 번호가 다르다면, 노드가 속한 NAT의 유형을 대칭 네트워크 주소 변환기(Symmetric NAT)로 판단한다. 그리고, 판단부(124)는 공공 IP 주소가 사설 IP 주소와 같은 경우, 노드가 속한 NAT의 유형을 공공망(public domain)으로 판단한다.Then, the determination unit 124 determines the NAT type of the node according to the result of comparison between the public IP address and the port number. If the public IP address and the port number extracted from the respective servers are different, the determination unit 124 determines the type of the NAT to which the node belongs as a symmetric network address translator (Symmetric NAT). If the public IP address is the same as the private IP address, the determination unit 124 determines that the type of the NAT to which the node belongs is a public domain.

또한, 판단부(124)는 공공 IP 주소와 포트 번호가 같고, 공공 IP 주소와 사설 IP 주소와 같지 않은 경우에, 노드가 속한 NAT의 유형을 풀 콘 네트워크 주소 변환기(full cone NAT), 제한 콘 네트워크 주소 변환기(Restricted Cone NAT) 또는 포트 제한 콘 주소 변환기(Port Restricted Cone NAT) 중 하나로 판단한다.If the public IP address and the port number are the same and not the public IP address and the private IP address, the determination unit 124 determines the type of the NAT to which the node belongs based on the full cone NAT, It is determined to be either a network address translator (Restricted Cone NAT) or a Port Restricted Cone NAT (Port Restricted Cone NAT).

피투피 연결부(130)는 클라이언트들이 속한 노드들의 NAT 유형에 따라 P2P 연결을 수립한다. 피투피 연결부(130)는 P2P를 연결하기 위해 두 클라이언트가 속해있는 NAT 유형에 대한 정보 유무에 따라 P2P 연결을 수립한다.The peer-to-peer connection unit 130 establishes a P2P connection according to the NAT type of the nodes to which the clients belong. The peer-to-peer connection unit 130 establishes a peer-to-peer connection according to the presence or absence of information about the NAT type to which the two clients belong to connect the P2P.

먼저, 클라이언트가 속해있는 NAT 유형에 대한 정보를 모두 가지고 있을 경우에는 필요 정보를 각각의 클라이언트에게 전송하여 P2P 연결을 수행하도록 제어한다.First, if the client has all the information about the NAT type to which the client belongs, it controls the P2P connection by transmitting necessary information to each client.

두 번째는, NAT 유형에 대한 정보를 모두 가지고 있지 않을 경우에는 양쪽 클라이언트가 속해 있는 노드의 NAT 유형을 찾고, 각각의 클라이언트 정보를 추출하여 P2P 연결을 수행한다.  Second, if you do not have all the information about the NAT type, it finds the NAT type of the node to which both clients belong, and extracts each client information to perform P2P connection.

세 번째는, 하나의 클라이언트에 대한 정보만 가지고 있는 경우이다. 이 경우에는 정보가 있는 클라이언트가 어떠한 환경에 속해있는지에 따라 P2P 연결을 수행하며, 이에 대해서는 이하 도 4를 통해 상세히 설명한다.   Third, there is only one client. In this case, the P2P connection is performed depending on the environment in which the client having the information belongs, which will be described in detail with reference to FIG.

피투피 연결부(130)는 본 발명의 한 실시예에 따라 노드 확인부(132) 및 연결 수립부(134)를 포함한다.The peer-to-peer connection unit 130 includes a node identification unit 132 and a connection establishment unit 134 according to an embodiment of the present invention.

노드 확인부(132)는 P2P 연결할 클라이언트들이 속하는 각 노드들의 NAT 유형을 파악한다. 그리고, 노드 확인부(132)는 두 클라이언트가 속해있는 NAT 유형에 대한 정보 유무에 따라 P2P 연결을 위한 방법을 결정한다.The node identifying unit 132 identifies the NAT type of each node to which the clients to be P2P connected belong. The node identifying unit 132 determines a method for P2P connection according to the presence or absence of information on the NAT type to which the two clients belong.

연결 수립부(134)는 제1 클라이언트가 연결된 노드가 속한 NAT의 유형이 공공망인 경우, 제2 클라이언트에게 공공 IP 주소 및 포트 번호를 전송해 P2P 연결을 수립하도록 제어한다.The connection establishing unit 134 controls the P2P connection to be established by transmitting the public IP address and the port number to the second client when the type of the NAT to which the node to which the first client is connected belongs is the public network.

그리고, 연결 수립부(134)는 제1 클라이언트가 연결된 노드의 유형이 풀 콘 네트워크 주소 변환기(full cone NAT) 또는 제한 콘 네트워크 주소 변환기(Restricted Cone NAT)인 경우, 제1 클라이언트 및 제2 클리이언트 모두에게 공공 IP 주소 및 포트 번호를 전송해 홀 펀칭(Hole Punching)을 수행하도록 제어한다. If the type of the node to which the first client is connected is a full cone NAT or a Restricted Cone NAT, the connection establishing unit 134 may set the first client and the second client, And sends the public IP address and port number to all to perform hole punching.

또한, 연결 수립부(134)는 제1 클라이언트가 연결된 노드의 유형이 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)인 경우, 상기 제2 클라이언트가 연결된 노드의 네트워크 주소 변환기의 유형을 탐색한다.If the type of the node to which the first client is connected is Port Restricted Cone NAT, the connection establishing unit 134 searches the type of the network address translator of the node to which the second client is connected.

탐색 결과에 따라, 제2 클라이언트가 연결된 노드가 대칭 네트워크 주소 변환기(Symmetric NAT)가 아니라면, 연결 수립부(134)는 제1 클라이언트 및 제2 클리이언트 모두에게 공공 IP 주소 및 포트 번호를 전송해 홀 펀칭(Hole Punching)을 수행하도록 제어하고, 제2 클라이언트가 연결된 노드의 유형이 대칭 네트워크 주소 변환기(Symmetric NAT)라면, 별도의 중계 서버를 통해서 P2P 연결을 수립하도록 제어한다.According to the search result, if the node to which the second client is connected is not a symmetric network address translator (Symmetric NAT), the connection establishing unit 134 transmits public IP address and port number to both the first client and the second client, If the type of the node to which the second client is connected is a symmetric network address translator (Symmetric NAT), control is performed to establish a P2P connection through a separate relay server.

도 2는 단말들이 속한 노드들의 NAT 유형에 따른 피투피 연결 기술을 도시한 도면이다.FIG. 2 is a diagram illustrating a peer-to-peer connection technique according to the NAT type of nodes to which the terminals belong.

우선, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 각 단말은 P2P 연결을 요청하기 전, 서버에 등록하는 단계에서 서버는 단말의 Public IP 주소, Public Port 번호를 추출할 뿐만 아니라, 단말이 속한 NAT에 대한 정보도 함께 전송하게 된다. First, in the peer-to-peer communication connection apparatus 100 according to the embodiment of the present invention, the server not only extracts the public IP address and the public port number of the terminal in registering with the server before requesting the P2P connection, , And information about the NAT to which the terminal belongs is also transmitted.

그리고, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 단말들이 P2P 연결을 요청했을 때, 단말이 어떠한 NAT에 속해있는지를 검사하고, 도 2에서와 같이 각 단말이 속한 노드들의 NAT 유형에 따라 P2P 연결을 수립하도록 제어 한다.When the peer-to-peer communication connection apparatus 100 according to an embodiment of the present invention requests a terminal to make a P2P connection, it checks which NAT the terminal belongs to and, as shown in FIG. 2, Control to establish P2P connection according to type.

도 3는 본 발명의 한 실시예에 따라 피투피 통신 연결 장치가 NAT 유형을 탐색하는 과정을 간략히 도시한 흐름도이다. 이하의 흐름도는 도 1의 구성과 연계하여 동일한 도면부호를 사용하여 설명한다.FIG. 3 is a flow chart briefly illustrating a process of searching for a NAT type by a peer-to-peer communication connection apparatus according to an embodiment of the present invention. The following flowchart will be described using the same reference numerals in conjunction with the configuration of Fig.

도 3를 참조하면, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 두 개의 서버에 동시에 메시지를 보내게 되고, 두 개의 서버는 공공 IP 주소 및 포트 번호를 추출해 비교하게 된다(S102, S104). Referring to FIG. 3, the peer-to-peer communication connection apparatus 100 according to an exemplary embodiment of the present invention simultaneously sends a message to two servers, and the two servers extract and compare a public IP address and a port number (S102 , S104).

이때, 두 서버에서 추출한 IP 주소와 Port 번호가 다르다면, 이는 클라이언트가 Symmetric NAT에 속해있음을 의미한다(S106). 여기서, Symmetric NAT은 같은 내부 단말이 메시지를 보내더라도 목적지가 바뀌게 되면, 다른 IP주소 및 Port 번호로 맵핑하기 때문이다.At this time, if the IP address and port number extracted from the two servers are different, this means that the client belongs to Symmetric NAT (S106). Here, the symmetric NAT maps to another IP address and port number when the destination is changed even if the same internal terminal sends a message.

만약, 공인 IP주소와 사설(Private) IP주소가 같다면, 이는 클라이언트가 공공망에 속해있음을 의미한다(S108, S114). 그리고, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 클라이언트가 방화벽에 막히는 지 확인해야 하므로, 다시 클라이언트에게 메시지를 전송해 응답여부를 확인할 필요가 있다(S110, S112).If the public IP address and the private IP address are the same, this means that the client belongs to the public network (S108, S114). Since the peer-to-peer communication connection apparatus 100 according to an embodiment of the present invention checks whether the client is blocked by the firewall, it is necessary to transmit a message to the client again to check whether the client is responding (S110, S112).

그리고, 위와 달리 공공 IP 주소와 상기 포트 번호가 같고 공공 IP 주소와 사설 IP 주소와 같지 않은 경우에는 서버에서 포트 번호를 바꾸어 메시지를 전송하여 이에 응답하는지 확인한다(S118, S120). If the public IP address is the same as the public IP address and the public IP address is not the same as the private IP address, the server changes the port number and transmits a message to confirm whether the public IP address and the private IP address are in response (S118, S120).

그리고, 포트 번호가 바뀌더라도 응답을 할 경우에는 Full cone NAT 혹은 Restricted cone NAT로 판단한다(S124). 여기서, Full cone NAT은 맵핑된 주소에 대해, 수신자의 IP 주소와 Port번호가 바뀌더라도 내부 단말에게 메시지를 전송하고, Restricted cone NAT은 IP주소가 같다면, 내부 단말에게 메시지를 전송하기 때문이다. If the port number is changed, the response is determined to be Full cone NAT or Restricted cone NAT (S124). Here, full cone NAT transmits a message to the internal terminal even if the IP address and port number of the recipient are changed for the mapped address. Restricted cone NAT transmits the message to the internal terminal if the IP address is the same.

반면에, 메시지에 대한 응답을 받지 못한다면, 이는 Port restricted cone NAT로 판단한다(S122).On the other hand, if the response to the message is not received, it is determined to be Port restricted cone NAT (S122).

이와 같이 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 Port restricted cone NAT과 Symmetric NAT이 전 세계적으로 가장 많이 사용되는 것을 고려하여, 우선적으로 NAT 유형을 검사함으로써, 기존의 기술들에 비해 NAT 유형을 찾는데 걸리는 지연시간과 메시지량을 줄일 수 있는 환경을 제공한다.As described above, the peer-to-peer communication connection apparatus 100 according to an embodiment of the present invention considers that the port restricted cone NAT and the symmetric NAT are the most used in the world, It provides an environment that can reduce the latency and the amount of messages required to find the NAT type.

도 4는 본 발명의 한 실시예에 따라 피투피 통신 연결 장치가 피투피 연결을 수립하는 과정을 간략히 도시한 흐름도이다. 이하의 흐름도는 도 1의 구성과 연계하여 동일한 도면부호를 사용하여 설명한다.4 is a flowchart briefly illustrating a process of establishing a handoff connection by a handoff communication apparatus according to an embodiment of the present invention. The following flowchart will be described using the same reference numerals in conjunction with the configuration of Fig.

우선, 도 4는 제1 클리이언트 및 제2 클라이언트가 속해있는 NAT 유형에 대한 정보 유무를 바탕으로 P2P 연결을 수행할 때, 제1 클라이언트가 속해있는 제1 노드에 대해서만 NAT 정보를 가지고 있는 경우를 가정한다.4 illustrates a case where the first client and the second client have NAT information only for the first node to which the first client belongs when the P2P connection is performed based on the presence or absence of information on the NAT type to which the first client and the second client belong I suppose.

도 4을 참조하면, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 NAT 유형에 대한 정보가 있는 제1 클라이언트가 연결된 제1 노드의 유형을 체크한다(S202).Referring to FIG. 4, a peer-to-peer communication connection apparatus 100 according to an exemplary embodiment of the present invention checks a type of a first node to which a first client having information on a NAT type is connected (S202).

그리고, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 제1 클라이언트가 공공망에 속해있는 경우, 상대방인 제2 클라이언트에게 공공 IP 주소 및 포트 번호를 전송해 바로 P2P 연결을 수립할 수 있도록 제어한다(S206 내지 S210).When the first client belongs to the public network, the peer-to-peer communication connection apparatus 100 according to an embodiment of the present invention transmits the public IP address and the port number to the second client, (S206 to S210).

또한, 제1 노드가 Full cone NAT 또는 Restricted cone NAT에 속해있는 경우, 양쪽 클라이언트 모두에게 서로의 공공 IP 주소 및 포트 번호를 전송하여 홀 펀칭(Hole punching)을 수행하도록 제어한다(S212).If the first node belongs to the Full cone NAT or the Restricted cone NAT, control is performed to perform hole punching by transmitting public IP addresses and port numbers of both clients to both clients (S212).

그리고, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 제1 클라이언트가 Port restricted cone NAT에 속해 있는 경우, NAT 정보가 없는 제2 클라이언트에게 NAT 유형을 찾는 알고리즘을 적용해 어떠한 NAT환경에 속해있는지 검사를 수행한다(S214, S216). In the peer-to-peer communication connection apparatus 100 according to an embodiment of the present invention, when the first client belongs to a port restricted cone NAT, an algorithm for finding a NAT type is applied to a second client having no NAT information, (S214, S216).

제2 클라이언트가 속해있는 제2 노드가 만약 Symmetric NAT가 아니라면, 양쪽 클라이언트에게 서로의 공공 IP 주소 및 포트 번호를 전송하여 홀 펀칭을 수행할 수 있게 한다(S218, S212). If the second node to which the second client belongs is not a Symmetric NAT, it sends a public IP address and a port number to both clients so that hole punching can be performed (S218, S212).

그리고, 만약 제2 클라이언트가 속해있는 제2 노드가 Symmetric NAT라면, 중개 서버를 통해 P2P 연결을 수립하도록 한다(S224).If the second node to which the second client belongs is Symmetric NAT, the P2P connection is established through the intermediary server (S224).

제1 클라이언트가 속해 있는 제1 노드가 Symmetric NAT라면, 제2 클라이언트에게 NAT 유형을 찾는 알고리즘을 적용해 어떠한 NAT환경에 속해있는지 검사하게 된다(S214, S220). 그 후, 제2 클라이언트가 Symmetric NAT 또는 Port restricted cone NAT에 속해있다면, 중개 서버를 통해 P2P 연결을 수립하고(S224), 공공망 이나 다른 NAT 환경에 속해있다면 홀 펀칭을 통해 P2P 연결을 수립하도록 제어한다(S226).If the first node to which the first client belongs is Symmetric NAT, an algorithm for finding a NAT type is applied to the second client to check whether it is in any NAT environment (S214, S220). Then, if the second client belongs to Symmetric NAT or Port restricted cone NAT, the P2P connection is established through the intermediary server (S224). If the second client belongs to the public network or another NAT environment, control is performed to establish a P2P connection through hole punching (S226).

이와 같이, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 기존의 기술들과 다르게 각각의 상황을 고려해 필요한 기술을 단계적으로 P2P 연결을 수립할 수 있도록 제어함으로써, P2P 수립을 위한 오버헤드를 줄일 수 있는 환경을 제공한다.As described above, the peer-to-peer communication connection apparatus 100 according to an embodiment of the present invention controls the peer-to-peer communication connection device 100 so that necessary technologies can be established step-by-step in consideration of each situation, It provides an environment to reduce the head.

도 5는 본 발명과 종래기술의 NAT 유형 탐색시 걸리는 시간에 대한 기대값을 비교한 도면이고, 도 6은 본 발명과 종래기술의 NAT 유형 탐색시 사용되는 메시지 량에 대한 기대값을 비교한 도면이며, 도 7은 본 발명과 종래기술의 피투피 연결시 각 시나리오에 대한 사용 메시지 기대값을 비교한 도면이다.FIG. 5 is a graph comparing expected values of time required for searching NAT type according to the present invention and FIG. 6, and FIG. 6 is a graph comparing expected values of a message amount used in searching NAT type according to the present invention. And FIG. 7 is a diagram comparing expected message usage values for each scenario when the present invention is connected to the conventional art.

도 5 내지 도 6을 참조하면, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 종래 기술인 STUN (Session Traversal Utilities for NAT)에 비해 NAT 유형 탐색시 걸리는 시간을 줄이고, NAT 유형 탐색시 사용되는 메시지량을 줄일 수 있음을 보여준다.5 to 6, the peer-to-peer communication connection apparatus 100 according to an exemplary embodiment of the present invention reduces the time taken to search for a NAT type as compared with the related art STUN (Session Traversal Utilities for NAT) And the amount of messages used can be reduced.

그리고, 도 7을 참조하면, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 종래 기술인 ICE(Interactive Connectiviy Establishment)에 비해 NAT 유형 탐색시 사용되는 메시지량을 줄일 수 있음을 보여준다.Referring to FIG. 7, the peer-to-peer communication connection apparatus 100 according to an embodiment of the present invention can reduce the amount of messages used in the NAT type search as compared with the conventional ICE (Interactive Connectivity Establishment).

그리고, 도 8은 본 발명의 한 실시예에 따른 피투피 연결시 각 시나리오에 대한 사용 메시지 기대값을 비교한 도면이다. FIG. 8 is a graph comparing expected message usage values for respective scenarios when a face-to-face is connected according to an embodiment of the present invention.

본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 P2P 연결을 위한 클라이언트들의 노드 유형을 알고 있는지 여부에 따라 P2P 연결을 수립할 수 있다. 그리고, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치(100)는 도 8에서와 같이, 어느 하나의 노드에 대한 유형만 알고 있는 경우에도, 2개의 노드들의 유형을 모두 알고 있는 경우와 비슷하게 P2P 연결시 사용되는 메시지 양을 충분히 줄일 수 있음을 보여준다.The peer-to-peer communication connection apparatus 100 according to an embodiment of the present invention can establish a P2P connection according to whether or not the node type of clients for P2P connection is known. As shown in FIG. 8, the peer-to-peer communication connection apparatus 100 according to an exemplary embodiment of the present invention includes a P2P The amount of messages used in the connection can be sufficiently reduced.

이와 같이, 본 발명의 한 실시예에 따른 피투피 통신 연결 장치는 NAT 환경에서 NAT의 유형 및 분포를 고려해서 NAT 유형을 탐색하고, NAT 유형에 따라 단계적으로 피투피(P2P) 연결을 수행하도록 제어함으로써, P2P 연결에 대한 신뢰성을 보장하고, 메시지 량 및 지연시간 등 여러 오버헤드를 줄일 수 있는 환경을 제공한다.As described above, the peer-to-peer communication connection apparatus according to an embodiment of the present invention searches the NAT type in consideration of the type and distribution of the NAT in the NAT environment and controls the peer-to-peer connection (P2P) It provides a reliable P2P connection environment and reduces the overhead such as message volume and delay time.

이상에서 설명한 본 발명의 실시예는 장치 및 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하는 프로그램 또는 그 프로그램이 기록된 기록 매체를 통해 구현될 수도 있다. 이러한 기록 매체는 서버뿐만 아니라 사용자 단말에서도 실행될 수 있다.The embodiments of the present invention described above are not implemented only by the apparatus and method, but may be implemented through a program for realizing the function corresponding to the configuration of the embodiment of the present invention or a recording medium on which the program is recorded. Such a recording medium can be executed not only on a server but also on a user terminal.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다. While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, It belongs to the scope of right.

Claims (11)

피투피 통신 연결 장치가 네트워크 주소 변환기(Network Address Translator, NAT) 환경에서 피투피 통신을 연결하는 방법에서,
네트워크 주소 변환기의 분포를 고려해서 클라이언트들이 속한 네트워크 주소 변환기의 유형을 탐색하는 단계, 그리고
P2P 통신을 수행하고자 하는 클라이언트들이 속한 노드의 네트워크 주소 변환기의 유형에 따라 P2P 연결을 수립하며, 상기 클라이언트들이 속한 노드의 정보 유무에 따라 P2P 연결 알고리즘을 적용해 P2P 연결을 수행하는 단계를 포함하며,
상기 P2P 연결을 수행하는 단계는,
제1 클라이언트가 연결된 노드의 정보만 알고 있는 경우에는, 상기 제1 클라이언트가 연결된 노드가 속한 네트워크 주소 변환기의 유형이 공공망인 경우에 P2P 연결을 수립하도록 제어하는 단계,
상기 제1 클라이언트가 연결된 노드의 유형이 풀 콘 네트워크 주소 변환기(full cone NAT) 또는 제한 콘 네트워크 주소 변환기(Restricted Cone NAT)인 경우에 P2P 연결을 수립하도록 제어하는 단계,
상기 제1 클라이언트가 연결된 노드의 유형이 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)이나 제2 클라이언트가 연결된 노드가 대칭 네트워크 주소 변환기(Symmetric NAT)가 아닌 경우에 P2P 연결을 수립하도록 제어하는 단계, 그리고
상기 제1 클라이언트가 연결된 노드의 유형이 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)이고 상기 제2 클라이언트가 연결된 노드의 유형이 대칭 네트워크 주소 변환기(Symmetric NAT)인 경우에 P2P 연결을 수립하도록 제어하는 단계
를 포함하는 피투피 통신 연결 방법.
In a method for a peer-to-peer communication connection device to connect peer-to-peer communication in a network address translator (NAT) environment,
Exploring the type of network address translator to which clients belong, taking into account the distribution of the network address translator; and
Establishing a P2P connection according to the type of the network address translator of the node to which the clients intending to perform P2P communication belong and performing a P2P connection by applying a P2P connection algorithm according to the presence or absence of information of the node to which the clients belong,
The step of performing the P2P connection comprises:
Controlling to establish a P2P connection when the type of the network address translator to which the first client is connected belongs to the public network when the first client only knows information of the connected node,
Controlling to establish a P2P connection when the type of the node to which the first client is connected is a full cone NAT or a Restricted Cone NAT,
Controlling the P2P connection to be established when the type of the node to which the first client is connected is a Port Restricted Cone NAT or the node to which the second client is connected is not a symmetric network address translator, And
A P2P connection is established when the type of the node to which the first client is connected is Port Restricted Cone NAT and the type of the node to which the second client is connected is a symmetric network address translator step
Wherein the method comprises the steps of:
제1항에서,
상기 네트워크 주소 변환기의 유형을 탐색하는 단계는,
적어도 두 개 이상의 서버로 메시지를 보내는 단계, 그리고
각각의 서버에서 추출한 공공 IP 주소 및 포트 번호를 수신하고, 수신된 공공 IP 주소 및 포트 번호를 비교하는 단계를 포함하며,
상기 비교하는 단계는,
각각의 서버에서 추출한 상기 공공 IP 주소와 상기 포트 번호가 다르다면, 상기 노드가 속한 네트워크 주소 변화기의 유형을 대칭 네트워크 주소 변환기(Symmetric NAT)로 판단하는 단계, 그리고
상기 공공 IP 주소가 사설 IP 주소와 같다면, 상기 노드가 속한 네트워크 주소 변환기의 유형이 공공망(public domain)에 포함되는 것으로 판단하고, 상기 노드의 클라이언트가 방화벽에 막혀있는지 확인하는 단계
를 포함하는 피투피 통신 연결 방법.
The method of claim 1,
Wherein searching for the type of network address translator comprises:
Sending a message to at least two servers, and
Receiving public IP addresses and port numbers extracted from the respective servers, and comparing the received public IP addresses and port numbers,
Wherein the comparing comprises:
If the public IP address extracted from each server is different from the port number, determining a type of a network address changer to which the node belongs as a symmetric network address translator (Symmetric NAT); and
Determining that the type of the network address translator to which the node belongs is included in the public domain if the public IP address is the same as the private IP address and checking whether the client of the node is blocked by the firewall
Wherein the method comprises the steps of:
제2항에서,
상기 비교하는 단계는,
각각의 서버에서 추출한 상기 공공 IP 주소와 상기 포트 번호가 같거나 상기 공공 IP 주소와 상기 사설 IP 주소와 같지 않다면, 어느 한 서버에서 노드로 포트 번호를 바꿔서 메시지를 전송하고 응답 여부를 확인하는 단계를 더 포함하며,
상기 응답 여부를 확인하는 단계는,
상기 노드에서 응답이 있는 경우, 상기 노드가 속한 네트워크 주소 변화기 유형을 풀 콘 네트워크 주소 변환기(full cone NAT) 또는 제한 콘 네트워크 주소 변환기(Restricted Cone NAT)로 판단하는 단계, 그리고
상기 노드에서 응답이 없는 경우, 상기 노드가 속한 네트워크 주소 변화기 유형을 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)로 판단하는 단계
를 포함하는 피투피 통신 연결 방법.
3. The method of claim 2,
Wherein the comparing comprises:
If the public IP address extracted from each server is the same as the public IP address or is not the same as the public IP address and the private IP address, a step of transmitting a message by exchanging a port number from a server to a node, Further,
The step of confirming whether or not the response is made,
Determining that the network address changer type to which the node belongs is a full cone NAT or a restricted cone NAT if there is a response from the node;
Determining that the network address changer type to which the node belongs is a Port Restricted Cone NAT if there is no response from the node;
Wherein the method comprises the steps of:
제3항에서,
상기 P2P 연결을 수행하는 단계는,
클라이언트들이 연결된 노드들의 네트워크 주소 변환기 유형을 파악하는 단계,
제1 클라이언트가 연결된 노드가 속한 네트워크 주소 변환기의 유형이 공공망인 경우, 제2 클라이언트에게 공공 IP 주소 및 포트 번호를 전송해 P2P 연결을 수립하는 단계, 그리고
상기 제1 클라이언트가 연결된 노드의 유형이 풀 콘 네트워크 주소 변환기(full cone NAT) 또는 제한 콘 네트워크 주소 변환기(Restricted Cone NAT)인 경우, 상기 제1 클라이언트 및 상기 제2 클라이언트 모두에게 공공 IP 주소 및 포트 번호를 전송해 홀 펀칭(Hole Punching)을 수행하는 단계
를 포함하는 피투피 통신 연결 방법.
4. The method of claim 3,
The step of performing the P2P connection comprises:
Identifying the network address translator type of the nodes to which the clients are connected,
Establishing a P2P connection by sending a public IP address and port number to a second client if the type of network address translator to which the first client is connected belongs to the public network; and
If the type of the node to which the first client is connected is a full cone NAT or a Restricted Cone NAT, both the first client and the second client are provided with a public IP address and port The step of performing hole punching by transmitting a number
Wherein the method comprises the steps of:
제4항에서,
상기 P2P 연결을 수행하는 단계는,
상기 제1 클라이언트가 연결된 노드의 유형이 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)인 경우, 상기 제2 클라이언트가 연결된 노드의 네트워크 주소 변환기의 유형을 탐색하는 단계,
탐색 결과, 상기 제2 클라이언트가 연결된 노드가 대칭 네트워크 주소 변환기(Symmetric NAT)가 아니라면, 상기 제1 클라이언트 및 상기 제2 클라이언트 모두에게 공공 IP 주소 및 포트 번호를 전송해 홀 펀칭(Hole Punching)을 수행하는 단계, 그리고
상기 제2 클라이언트가 연결된 노드의 유형이 대칭 네트워크 주소 변환기(Symmetric NAT)라면, 별도의 중계 서버를 통해서 P2P 연결을 수립하는 단계
를 더 포함하는 피투피 통신 연결 방법.
5. The method of claim 4,
The step of performing the P2P connection comprises:
Searching for a type of a network address translator of a node to which the second client is connected if the type of the node to which the first client is connected is a Port Restricted Cone NAT,
As a result of the search, if the node to which the second client is connected is not a symmetric network address translator (Symmetric NAT), hole punching is performed by transmitting public IP address and port number to both the first client and the second client And
If the type of the node to which the second client is connected is a symmetric network address translator (Symmetric NAT), establishing a P2P connection through a separate relay server
Further comprising the steps of:
적어도 하나 이상의 클라이언트 및 노드와 메시지를 송수신하는 송수신부,
송수신된 메시지를 이용해서 클라이언트가 연결된 노드의 네트워크 주소 변환기(Network Address Translator, NAT)의 유형을 탐색하는 탐색부, 그리고
클라이언트들이 속한 노드들의 네트워크 주소 변환기의 유형에 따라 P2P 연결을 수립하며, 적어도 하나의 노드에 대한 네트워크 주소 변환기의 정보만 가지고 있는 경우, P2P 연결 알고리즘을 적용해 P2P 연결을 수행하도록 제어하는 피투피 연결부
를 포함하며,
상기 피투피 연결부는,
제1 클라이언트가 연결된 노드가 속한 네트워크 주소 변환기의 유형이 공공망인 경우, 제2 클라이언트에게 공공 IP 주소 및 포트 번호를 전송해 P2P 연결을 수립하도록 제어하고, 상기 제1 클라이언트가 연결된 노드의 유형이 풀 콘 네트워크 주소 변환기(full cone NAT) 또는 제한 콘 네트워크 주소 변환기(Restricted Cone NAT)인 경우, 상기 제1 클라이언트 및 상기 제2 클라이언트 모두에게 공공 IP 주소 및 포트 번호를 전송해 홀 펀칭(Hole Punching)을 수행하도록 제어하며,
상기 제1 클라이언트가 연결된 노드의 유형이 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)인 경우, 상기 제2 클라이언트가 연결된 노드의 네트워크 주소 변환기의 유형을 탐색하고, 탐색 결과, 상기 제2 클라이언트가 연결된 노드가 대칭 네트워크 주소 변환기(Symmetric NAT)가 아니라면 제1 클라이언트 및 제2 클라이언트 모두에게 공공 IP 주소 및 포트 번호를 전송해 홀 펀칭(Hole Punching)을 수행하도록 제어하고, 상기 제2 클라이언트가 연결된 노드의 유형이 대칭 네트워크 주소 변환기(Symmetric NAT)라면, 별도의 중계 서버를 통해서 P2P 연결을 수립하도록 제어하는 피투피 통신 연결 장치.
A transmitting and receiving unit for transmitting and receiving messages with at least one client and a node,
A search unit for searching for a type of a network address translator (NAT) of a node connected to the client using the transmitted and received message, and
A P2P connection is established according to the type of the network address translator of the nodes to which the clients belong, and when the P2P connection algorithm is applied to the network address translator for at least one node,
/ RTI >
Wherein the to-
If the type of the network address translator to which the first client is connected belongs to the public network, control to establish a P2P connection by transmitting the public IP address and port number to the second client, A public IP address and a port number are transmitted to both the first client and the second client to perform hole punching in case of a full cone NAT or a Restricted Cone NAT. Control,
If the type of the node to which the first client is connected is a Port Restricted Cone NAT, the type of the network address translator of the node to which the second client is connected is searched for, and as a result of the search, If the node is not a symmetric network address translator (Symmetric NAT), control to perform hole punching by transmitting a public IP address and port number to both the first client and the second client, If the type is symmetric network address translator (Symmetric NAT), a peer-to-peer communication connection that controls to establish a peer-to-peer connection through a separate relay server.
제6항에서,
상기 네트워크 주소 변환기의 유형은,
공공망(public domain), 풀 콘 네트워크 주소 변환기 (full cone NAT), 제한 콘 네트워크 주소 변환기(Restricted Cone NAT), 포트 제한 콘 주소 변환기(Port Restricted Cone NAT) 또는 대칭 네트워크 주소 변환기(Symmetric NAT) 중 적어도 하나 이상을 포함하는 피투피 통신 연결 장치.
The method of claim 6,
The type of the network address translator,
It is possible to use a public domain, full cone NAT, Restricted Cone NAT, Port Restricted Cone NAT, or symmetric NAT And at least one of the at least one peer communication connection device.
제6항에서,
상기 탐색부는,
적어도 두개 이상의 서버에서 추출한 공공 IP 주소 및 포트 번호를 비교하는 비교부, 그리고
각각의 서버에서 추출한 상기 공공 IP 주소와 상기 포트 번호가 다르다면, 상기 노드가 속한 네트워크 주소 변화기의 유형을 대칭 네트워크 주소 변환기(Symmetric NAT)로 판단하고, 상기 공공 IP 주소가 사설 IP 주소와 같다면, 상기 노드가 속한 네트워크 주소 변환기의 유형을 공공망(public domain)으로 판단하는 판단부
를 포함하는 피투피 통신 연결 장치.
The method of claim 6,
The searching unit searches,
A comparison unit for comparing public IP addresses and port numbers extracted from at least two servers, and
If the public IP address extracted from each server is different from the port number, the network address converter determines the type of the network address changer to which the node belongs as a symmetric network address translator (Symmetric NAT). If the public IP address is the same as the private IP address A determination unit that determines the type of the network address translator to which the node belongs as a public domain,
And a second communication link.
제8항에서,
상기 판단부는,
상기 공공 IP 주소와 상기 포트 번호가 같거나 상기 공공 IP 주소와 상기 사설 IP 주소와 같지 않은 경우, 어느 한 서버에서 노드로 포트 번호를 바꿔서 전송한 메시지에 응답을 하는 경우, 상기 노드가 속한 유형이 풀 콘 네트워크 주소 변환기(full cone NAT) 또는 제한 콘 네트워크 주소 변환기(Restricted Cone NAT)로 판단하고, 응답이 없는 경우, 상기 포트 제한 콘 주소 변환기(Port Restricted Cone NAT)로 판단하는 피투피 통신 연결 장치.
9. The method of claim 8,
Wherein,
When the public IP address and the port number are equal to each other or when the public IP address and the private IP address are different from each other, And determines that the terminal is a full cone NAT or a Restricted Cone NAT, and determines that the terminal is a Port Restricted Cone NAT when there is no response.
삭제delete 삭제delete
KR1020140177838A 2014-12-10 2014-12-10 Device for connecting peer-to-peer communication considering nat types and method connecting peer-to-peer communication using the same KR101586058B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140177838A KR101586058B1 (en) 2014-12-10 2014-12-10 Device for connecting peer-to-peer communication considering nat types and method connecting peer-to-peer communication using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140177838A KR101586058B1 (en) 2014-12-10 2014-12-10 Device for connecting peer-to-peer communication considering nat types and method connecting peer-to-peer communication using the same

Publications (1)

Publication Number Publication Date
KR101586058B1 true KR101586058B1 (en) 2016-01-22

Family

ID=55309024

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140177838A KR101586058B1 (en) 2014-12-10 2014-12-10 Device for connecting peer-to-peer communication considering nat types and method connecting peer-to-peer communication using the same

Country Status (1)

Country Link
KR (1) KR101586058B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900502A (en) * 2022-05-17 2022-08-12 北京奇艺世纪科技有限公司 Network registration method and device, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120073489A (en) * 2010-12-27 2012-07-05 삼성에스디에스 주식회사 System and method for data transmission using relay server
CN102739815A (en) * 2011-06-03 2012-10-17 北京天地互连信息技术有限公司 Method for reducing system time delaying of network address translation of video conference system
KR20140121520A (en) * 2013-04-05 2014-10-16 삼성에스디에스 주식회사 System and terminal for p2p connection in a mobile environment and method the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120073489A (en) * 2010-12-27 2012-07-05 삼성에스디에스 주식회사 System and method for data transmission using relay server
CN102739815A (en) * 2011-06-03 2012-10-17 北京天地互连信息技术有限公司 Method for reducing system time delaying of network address translation of video conference system
KR20140121520A (en) * 2013-04-05 2014-10-16 삼성에스디에스 주식회사 System and terminal for p2p connection in a mobile environment and method the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900502A (en) * 2022-05-17 2022-08-12 北京奇艺世纪科技有限公司 Network registration method and device, electronic equipment and readable storage medium
CN114900502B (en) * 2022-05-17 2024-02-27 北京奇艺世纪科技有限公司 Network registration method, device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US10079803B2 (en) Peer-to-peer connection establishment using TURN
US8457014B2 (en) Method for configuring control tunnel and direct tunnel in IPv4 network-based IPv6 service providing system
US9515995B2 (en) Method and apparatus for network address translation and firewall traversal
EP1892887B1 (en) Communication method between communication devices and communication apparatus
RU2543304C2 (en) Packet relay method and device
WO2020248963A1 (en) Method and apparatus for establishing end-to-end network connection, and network system
EP3219087B1 (en) Methods, systems, and computer readable media for facilitating the resolving of endpoint hostnames in test environments with firewalls, network address translators(nats), or clouds
US20110055392A1 (en) Network traversal method and network communication system
US11388138B2 (en) Communication system, address notification apparatus, communication control apparatus, terminal, communication method, and program
TWI599201B (en) Network system and method for establishing data connection
KR20120059077A (en) System and method for peer-to-peer connection in multiple network environment
RU2373654C1 (en) Method for making peer-to-peer connection and system designed for it
JP2023542398A (en) Data processing methods, devices, related equipment and storage media
US9350606B2 (en) System and method for assigning server to terminal and efficiently delivering messages to the terminal
JP2006203575A (en) Communicating method
US11637874B2 (en) Communications apparatus, systems, and methods for preventing and/or minimizing session data clipping
KR101586058B1 (en) Device for connecting peer-to-peer communication considering nat types and method connecting peer-to-peer communication using the same
CN114598532B (en) Connection establishment method, device, electronic equipment and storage medium
CN112019641B (en) Data transmission method and device
US9369523B2 (en) Method for exchanging network messages in distributed manner
US9516575B2 (en) Mobile device based proxy for browser-originated procedures
JP5840575B2 (en) Multi-home communication method and system
WO2008069504A1 (en) Method for configuring control tunnel and direct tunnel in ipv4 network-based ipv6 service providing system
US20170311135A1 (en) Control Signaling Transmission Method in MCPTT Architecture and Related Device
CN114401114B (en) Data transmission method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20190109

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20191205

Year of fee payment: 5