JP4602247B2 - Communication method - Google Patents
Communication method Download PDFInfo
- Publication number
- JP4602247B2 JP4602247B2 JP2005379958A JP2005379958A JP4602247B2 JP 4602247 B2 JP4602247 B2 JP 4602247B2 JP 2005379958 A JP2005379958 A JP 2005379958A JP 2005379958 A JP2005379958 A JP 2005379958A JP 4602247 B2 JP4602247 B2 JP 4602247B2
- Authority
- JP
- Japan
- Prior art keywords
- router
- endpoint
- computer
- open
- connection
- 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
Links
Images
Description
本発明は、NAT機能を有するネットワーク機器に接続されたコンピュータからP2P型通信を行うための通信方法に関する。 The present invention relates to a communication method for performing P2P communication from a computer connected to a network device having a NAT function.
近年、インターネットに接続するホストコンピュータの増大により、IP(Internet Protocol)アドレスの不足という問題が顕著化している。そこで、IPアドレスの不足を解消するための一つの方法として、NAT(Network Address Translator)機能が利用されている。NAT機能は、閉域網であるLAN(local area network)内のプライベートアドレス(プライベートIPアドレス)を有するホストコンピュータと、インターネット内のグローバルアドレス(グローバルIPアドレス)を有するホストコンピュータとの間で通信を行うために、アドレス変換を行う。また、NATの拡張された機能として、NAPT(network address port translation)機能も周知であり利用されている。NAPT機能は、別にIPマスカレードとも呼ばれ、プライベートIPアドレスとポート番号を変更することで、一つのグローバルIPアドレスを使って、複数のホストコンピュータを共有できるようにする技術である。本明細書においては、以下、NATとNAPTとをまとめて広義にNATと呼ぶこととする。 In recent years, with the increase of host computers connected to the Internet, the problem of lack of IP (Internet Protocol) addresses has become prominent. Therefore, a NAT (Network Address Translator) function is used as one method for solving the shortage of IP addresses. The NAT function performs communication between a host computer having a private address (private IP address) in a local area network (LAN) that is a closed network and a host computer having a global address (global IP address) in the Internet. Therefore, address conversion is performed. As an extended function of NAT, a network address port translation (NAPT) function is also known and used. The NAPT function is also called IP masquerading, and is a technology that allows a plurality of host computers to be shared using a single global IP address by changing the private IP address and port number. In the present specification, hereinafter, NAT and NAPT are collectively referred to as NAT.
また、オンラインゲームやビデオチャットなどのP2P(peer to peer)型通信を利用したアプリケーション(以下、P2Pアプリケーションという)の利用が増えている。P2P型通信は、サーバを介さずに、端末間で直接通信をおこなう。NAT機能を利用した接続環境において、P2Pアプリケーションを利用するために、IETF(Internet Engineering Task Force)の規格であるSTUN(例えば、非特許文献1参照)技術が知られている。 In addition, the use of applications using P2P (peer to peer) type communication such as online games and video chats (hereinafter referred to as P2P applications) is increasing. P2P type communication directly communicates between terminals without going through a server. In order to use a P2P application in a connection environment using the NAT function, STUN (see Non-Patent Document 1, for example) technology that is a standard of IETF (Internet Engineering Task Force) is known.
さらに、NAT機能を有するネットワーク機器を使用した通信方法を開示した文献がある(例えば、特許文献1参照)。 Further, there is a document disclosing a communication method using a network device having a NAT function (see, for example, Patent Document 1).
しかしながら、STUN技術によっても端末間で通信ができない場合がある。これは、規格が詳細な部分まで規定されていなかったり、ルータによって実装する部分が異なるためである。また、通信経路の途中に、UDP(User Datagram Protocol)による通信が行えないファイアウォールが接続されていると、端末間で通信することができない。即ち、通信を行う2つ以上の端末がある場合に、それらの端末の間に、NAT機能が存在するネットワーク機器(ルータ等)が接続されている場合、通信を行うことができなかった(所謂、NAT越え問題)。又は端末の間に、ファイアウォール機能が存在するネットワーク機器(WEBプロキシサーバ等)が接続されている場合、通信を行うことができなかった(所謂、ファイアウォール越え問題)。 However, communication may not be possible between terminals even with the STUN technology. This is because the standard is not stipulated in detail, or the parts to be implemented differ depending on the router. Further, if a firewall that cannot perform UDP (User Datagram Protocol) communication is connected in the middle of the communication path, communication between terminals cannot be performed. That is, when there are two or more terminals that perform communication and a network device (router or the like) having a NAT function is connected between the terminals, the communication cannot be performed (so-called “so-called”). , NAT traversal problem). Alternatively, when a network device (WEB proxy server or the like) having a firewall function is connected between terminals, communication cannot be performed (so-called firewall traversal problem).
従来、これらのNAT越え問題及びファイアウォール越え問題に対処するために、端末に実装されているアプリケーションを、NAT越え及びファイアウォール越え用の市販のSDK(Software Development Kit)等を使用して変更する必要があった。さらに、NAT越え問題及びファイアウォール越え問題に対処するためには、ルータ等の設定を変更する必要があった。 Conventionally, in order to cope with these NAT traversal problems and firewall traversal problems, it is necessary to change the application installed in the terminal by using a commercially available SDK (Software Development Kit) for NAT traversal and firewall traversal. there were. Further, in order to cope with the NAT traversal problem and the firewall traversal problem, it is necessary to change the setting of the router or the like.
図5(a)、(b)、(c)は、従来のTCP(Transmission Control Protocol)のNAT越えの仕組みを説明する図である。図5(a)は、従来のTCPのNAT越えの手順I〜IIIを例示した図である。図5(b)は、従来のTCPのNAT越えの手順IV〜VIを例示した図である。図5(c)は、従来のTCPのNAT越えの手順VII〜IXを例示した図である。図5において、ノードA501及びノードB502に実装されているアプリケーションは、NAT越え及びファイアウォール越え用の市販のSDK等を使用して予め変更されているものとする。
FIGS. 5A, 5B, and 5C are diagrams for explaining a mechanism for NAT traversal of a conventional TCP (Transmission Control Protocol). FIG. 5A is a diagram exemplifying conventional TCP NAT traversal procedures I to III. FIG. 5B is a diagram exemplifying conventional TCP NAT traversal procedures IV to VI. FIG. 5C illustrates a conventional TCP NAT traversal procedure VII to IX. In FIG. 5, it is assumed that the applications installed in the
図5において、従来のTCPのNAT越えは、以下の手順I〜IXのように行われる。
I:ノードA501のポートaからSTUNサーバ503(TCP)に対してSTUNリクエストを送り、レスポンスを受け取り、ポートaがルータ505の何番にマップされたかを調べる。
II:Iの結果とルータ505の特性から、ノードB502との通信に何番ポートを使えばいいかを予測する。
III:呼制御サーバ504を通じて、IIで予測したソケットアドレスをノードB502に通知する。
IV:ノードB502のポートbからSTUNサーバ503(TCP)に対してSTUNリクエストを送り、レスポンスを受け取り、ポートbがルータ506の何番にマップされたかを調べる。
V:IVの結果とルータ506の特性から、ノードA501との通信に何番ポートを使えばいいかを予測する。
VI:呼制御サーバ504を通じてVで予測したソケットアドレスをノードA501に通知する。
VII:ノードB502はノードA501から通知されたソケットアドレスに対してSynを送る。ノードA501のルータ505はノードB502からSynを異常とみなし、dropする。
VIII:ノードB502はSynを送るのに利用したポートを閉じ、再度開きなおし、listenして待ち受ける。
IX:ノードA501はノードB502から通知されたソケットアドレスに対してSynを送る。VIIのSynパケットにより、ノードB502のルータ506にマッピングが作成されているため、ノードB502に届き、通信が成立する。
In FIG. 5, the conventional TCP NAT traversal is performed in the following procedures I to IX.
I: A STUN request is sent from the port a of the
II: Based on the result of I and the characteristics of the
III: The socket address predicted in II is notified to the
IV: A STUN request is sent from the port b of the
V: The number of ports that should be used for communication with the
VI: The socket address predicted by V is notified to the
VII: Node B 502 sends Syn to the socket address notified from
VIII: Node B 502 closes the port used to send Syn, reopens it, listens and waits.
IX: Node A 501 sends Syn to the socket address notified from Node B 502. Since the mapping is created in the
図6(a)、(b)は、図5の手順II、Vにおけるポートの予測の説明図である。図6(a)はFullconeルータのポートの予測の説明図である。図6(b)は、非Fullconeルータのポートの予測の説明図である。ポートの予測はルータの性質を元に行う。ポート予測で重要なルータの性質は、ローカルポートとルータにマップされるポートの規則性である。マップされるポートの規則性は大きくわけて以下のように二つある。 6A and 6B are explanatory diagrams of port prediction in the procedures II and V of FIG. FIG. 6A is an explanatory diagram for predicting the port of the Fullcone router. FIG. 6B is an explanatory diagram of port prediction of a non-Fullcone router. Port prediction is based on the nature of the router. An important router property in port prediction is the regularity of local ports and ports mapped to routers. The regularity of the mapped port is roughly divided into the following two.
図6(a)に示すように、Fullconeルータ601を使用する場合、あるローカルポートaで、ルータ601外のサーバ602、603に接続・切断を繰り返しても必ずルータ601にマップされるポート番号はポートbで同一である。
As shown in FIG. 6A, when the Fullcone
一方図6(b)に示すように、非Fullconeルータ604を使用する場合、あるローカルポートaでルータ604外のサーバ602、603に接続・切断を繰り返すと、ルータ604にマップされるポートがポートbからポートcへと変わる。
On the other hand, as shown in FIG. 6B, when a
FullconeルータではSTUNで調べた結果のポートがピアとの通信に利用できる。非Fullconeルータではマッピングの法則性を調べ、ピアとの通信に利用されるポートを予測する。多くの非Fullconeルータはセッション毎にルータにマップされるポート番号が一定数増減する。 In the Fullcone router, the port determined by STUN can be used for communication with the peer. Non-Fullcone routers examine the mapping rules and predict the ports used for communication with peers. Many non-Fullcone routers increase or decrease a certain number of port numbers mapped to the router for each session.
次いで、図5の手順VII、VIIIにおけるSyn-out/Syn-inとステート管理について述べる。TCPのNAT越えのVII、VIIIの手順では、synパケットを送出した後相手からのsynパケットを待ち受ける。通常のTCPの3-wayハンドシェークは、アクティブオープンする側は、
・アウトバウンドsyn
・インバウンドsyn-ack
・アウトバウンドack
の3パケット(パッシブオープンする側はインバウンド・アウトバウンドが逆)で構成される。
Next, Syn-out / Syn-in and state management in procedures VII and VIII of FIG. 5 will be described. In the procedures of VII and VIII over TCP NAT, after sending a syn packet, it waits for a syn packet from the other party. In the normal TCP 3-way handshake, the active open side is
・ Outbound syn
・ Inbound syn-ack
・ Outbound ack
3 packets (inbound and outbound are reversed on the passive open side).
一方、TCPのNAT越えのパッシブオープン側は、
・アウトバウンドsyn(相手に到達しない)
・インバウンドsyn
・アウトバウンドsyn-ack
・インバウンドack
の手順で行われる。ルータによってはTCPのセッションのステートをしっかり管理するものもあり、アウトバウンドsyn後のインバウンドsynを不正な状態遷移と見なし、dropすることがある。
On the other hand, the passive open side over NAT of TCP is
・ Outbound syn (not reach the opponent)
・ Inbound syn
・ Outbound syn-ack
・ Inbound ack
It is performed in the procedure. Some routers manage TCP session state firmly, and inbound syn after outbound syn is regarded as an illegal state transition and may be dropped.
アクティブオープンする側では、
・アウトバウンドsyn
・インバウンドsyn-ack
・アウトバウンドack
と、通常の3-wayハンドシェークと同じ手順で行われるため、ルータのステート管理によって阻害されることはない。
On the active open side,
・ Outbound syn
・ Inbound syn-ack
・ Outbound ack
Since it is performed in the same procedure as a normal 3-way handshake, it is not hindered by the state management of the router.
片側のルータのみステート管理を行っている場合、双方でアクティブオープン側とパッシブオープン側を行うことで接続が可能となる。 When state management is performed on only one router, connection is possible by performing active open side and passive open side on both sides.
ここで、NAT内にいる機器同士で接続する方法としては、
・TCPのNAT越え
・中継サーバ
・(同じLAN内にいるならば)直接通信
の三つの手法がある。これらを並行して試行し、通信できる経路を選択することで、素早くピアとの通信を開始できる。
Here, as a method of connecting between devices in the NAT,
There are three methods: TCP NAT traversal, relay server, and direct communication (if in the same LAN). By trying these in parallel and selecting a communication path, communication with the peer can be started quickly.
しかし、非Fullconeのルータでは、ピアとの通信に利用するポートを予測するため、実際にピアとの通信を始める前に、予測したポートを間違えて利用してしまうことがある。図7〜9を参照し、以下にその例を挙げる。 However, since a non-Fullcone router predicts a port to be used for communication with a peer, the predicted port may be mistakenly used before actually starting communication with the peer. Examples are given below with reference to FIGS.
(例1)二つ目のTCPのNAT越えのためのチェックで利用される
図7(a)、(b)は、予測したポートを間違えて利用してしまう例1の説明図である。図7(a)は1回目のSTUNのチェックの説明図である。図7(b)は2回目のSTUNのチェックの説明図である。接続の成功率向上のためにアクティブオープンとパッシブオープンを並行して行おうとすると、図7のようにルータ604にマップされるポート(1000)をSTUNサーバ701でチェックする際に、図7(b)の2回目のSTUNのチェックが図7(a)1回目のチェックで予測したポート(1001)を使ってしまうことがある。
(Example 1) FIGS. 7A and 7B used in the second TCP check for NAT traversal are explanatory diagrams of Example 1 in which a predicted port is mistakenly used. FIG. 7A is an explanatory diagram of the first STUN check. FIG. 7B is an explanatory diagram of the second STUN check. When active open and passive open are performed in parallel to improve the success rate of connection, when the port (1000) mapped to the
(例2)中継サーバへの接続
図8(a)、(b)は、予測したポートを間違えて利用してしまう例2の説明図である。図8(a)はSTUNのチェックの説明図である。図8(b)は中継サーバへの接続の説明図である。図8(a)のようにSTUNサーバ801でチェックし、利用するポートを予測した後、図8(b)のように中継サーバ802への接続を行うと、予測したポートが中継サーバ802の接続で利用されてしまう。
(Example 2) Connection to relay server FIGS. 8A and 8B are explanatory diagrams of Example 2 in which a predicted port is mistakenly used. FIG. 8A is an explanatory diagram of STUN check. FIG. 8B is an explanatory diagram of connection to the relay server. After checking with the
(例3)相手のローカルアドレスへの接続
図9は、予測したポートを間違えて利用してしまう例3の説明図である。直接接続ができないネットワーク構成で、相手のIPアドレスに対して接続を試行すると、パケットはゲートウェイであるルータ604に届く。ルータ604のルーティングテーブルによっては、上流のルータ901にそのパケットが送られ、STUNのチェックで予測したポートが利用される。
(Example 3) Connection to a partner's local address FIG. 9 is an explanatory diagram of Example 3 in which a predicted port is mistakenly used. When trying to connect to the other party's IP address in a network configuration where direct connection is not possible, the packet reaches the
従って、以上の例1〜3に示したように、非Fullconeのルータで予測したポートを使用してしまうという点において、上記従来技術には未だ改善の余地があった。 Therefore, as shown in Examples 1 to 3 above, there is still room for improvement in the prior art in that the port predicted by the non-Fullcone router is used.
本発明は、このような状況に鑑みてなされたもので、その目的とするところは、非Fullconeのルータを使用する環境において、より確実にTCPのNAT越えセッションを確立することができる通信方法を提供することにある。 The present invention has been made in view of such a situation, and an object of the present invention is to provide a communication method capable of establishing a TCP NAT traversal session more reliably in an environment using a non-Fullcone router. It is to provide.
このような目的を達成するために、本発明の通信方法(図1〜4)は、NAT機能を有する第1のルータ(102)に接続された第1のコンピュータ(101)と、NAT機能を有する第2のルータ(106)に接続された第2のコンピュータ(107)との間でP2P型通信を行うための通信方法において、前記第1のルータと前記第2のルータとが、中継サーバ(103)及びSTUNサーバ(104)に接続されており、前記第1のコンピュータが、第1のエンドポイントをオープンする第1のオープンステップと、前記第1のコンピュータが前記中継サーバに接続し、前記中継サーバに第2のエンドポイントをオープンさせる第2のオープンステップと、前記第1のコンピュータから前記STUNサーバへ、前記第1のルータを介してリクエストを送ることにより、前記第1のルータがアクティブオープンするTCPのNAT越えの第3のエンドポイントをオープンする第3のオープンステップと、前記第1のルータが、前記第3のエンドポイントから予測することにより、パッシブオープンするTCPのNAT越えの第4のエンドポイントをオープンする第4のオープンステップと、前記第1のルータを前記第2のルータに替え、前記第1のコンピュータに替えて前記第2のコンピュータが、前記第1のオープンステップから前記第4のオープンステップを行う第5のオープンステップと、前記第1のコンピュータが、前記第3のエンドポイントを介して、前記第2のルータへの接続試行を行う第1の接続試行ステップと、前記第1のコンピュータが、前記第4のエンドポイントを介して、前記第2のルータへの接続試行を行う第2の接続試行ステップと、前記第1のコンピュータが、前記第5のオープンステップにおいて前記第2のコンピュータがオープンした第1のエンドポイントに接続試行を行う第3の接続試行ステップと、前記第1のコンピュータが、前記第5のオープンステップにおいて前記第2のコンピュータが前記中継サーバにオープンさせた第2のエンドポイントに接続試行を行う第4の接続試行ステップと、前記第2のルータを前記第1のルータに替え、前記第2のコンピュータに替えて前記第1のコンピュータが、前記第1の接続試行ステップから前記第4の接続試行ステップを行う第5の接続試行ステップとを備えることを特徴とする。 In order to achieve such an object, a communication method of the present invention (FIGS. 1 to 4) includes a first computer (101) connected to a first router (102) having a NAT function, and a NAT function. In a communication method for performing P2P communication with a second computer (107) connected to a second router (106), the first router and the second router are connected to a relay server. (103) and the STUN server (104), wherein the first computer opens a first endpoint, the first computer connects to the relay server, A second opening step for causing the relay server to open a second endpoint; and from the first computer to the STUN server via the first router. A third open step of opening a third endpoint beyond the TCP NAT that the first router actively opens by sending a request; and the first router predicts from the third endpoint. A fourth open step of opening a fourth endpoint beyond the NAT of the TCP to be passively opened, and the first router is replaced with the second router, and the first computer is replaced with the first computer. A fifth open step in which the second computer performs the fourth open step from the first open step; and the first computer passes through the third endpoint to the second router. A first connection attempt step for performing a connection attempt to the first end; and A second connection trial step for trying to connect to the second router via the terminal, and a first end opened by the second computer in the fifth open step. A third connection attempt step for connecting to a point; and the first computer makes a connection attempt to the second end point that the second computer has opened to the relay server in the fifth open step. A fourth connection trial step to be performed; the second router is replaced with the first router; and the first computer replaces the second computer with the fourth connection trial step to the fourth connection trial step. And a fifth connection trial step for performing the connection trial step.
なお、特許請求の範囲の構成要素と対応する実施形態中の図中符号等を()で示した。ただし、特許請求の範囲に記載した構成要素は上記()部の実施形態の構成要素に限定されるものではない。 In addition, the code | symbol etc. in the figure in embodiment corresponding to the component of a claim are shown by (). However, the constituent elements described in the claims are not limited to the constituent elements in the embodiment of the above () part.
以上の構成により、本発明の通信システムは、非Fullconeのルータを使用する環境において、予測したポートを自ら利用しないための接続手順を実行する。 With the above configuration, the communication system of the present invention executes a connection procedure for preventing the predicted port from being used by itself in an environment using a non-Fullcone router.
本発明によれば、非Fullconeのルータを使用する環境において、より確実にTCPのNAT越えセッションを確立することができるという効果を奏する。 According to the present invention, it is possible to more reliably establish a TCP NAT traversal session in an environment using a non-Fullcone router.
以下、図面を参照して本発明の実施形態を詳細に説明する。なお、各図面において同じ機能を有する箇所には同一の符号を付す。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In addition, the same code | symbol is attached | subjected to the location which has the same function in each drawing.
[装置構成]
図1は、本実施形態の通信システムにおける通信のシーケンス図である。図1に示すように、本実施形態の通信システムは、ノードA101とルータ102を含むLANと、ノードB107とルータ106を含む他のLANとが、中継サーバ103、STUNサーバ104及び呼制御サーバ105によって接続され、構成されている。図1において、ノードA101及びノードB107に実装されているアプリケーションは、NAT越え及びファイアウォール越え用の市販のSDK等を使用して予め変更されているものとする。
[Device configuration]
FIG. 1 is a communication sequence diagram in the communication system of the present embodiment. As shown in FIG. 1, the communication system of this embodiment includes a LAN including a
[動作説明]
本実施形態では、ピアが利用するエンドポイント(IPアドレス)を以下の三つに分類する。
(1)パッシブエンドポイント - 自分のエンドポイントのアドレスを相手に通知し、相手の接続を待つタイプ。
例:
TCPでlistenしているエンドポイント。
中継サーバで待ち受けを行っているエンドポイント。
(2)アクティブエンドポイント - 相手のエンドポイントのアドレスがわかっていれば接続できるタイプ。
例:
接続先のピアでlistenしているポートに対して接続を行うエンドポイント。
中継サーバで待ち受けているポートに対して接続を行うエンドポイント。
(3)バイラテラル(bilateral)エンドポイント - 自分と相手のエンドポイントのアドレスを交換し、お互いのエンドポイントのアドレスを知っていないと接続できないタイプ。
例:
NAT越えのために双方のアドレスの交換が必要なエンドポイント。
[Description of operation]
In the present embodiment, endpoints (IP addresses) used by peers are classified into the following three types.
(1) Passive endpoint-A type that informs the partner of its own endpoint address and waits for the partner to connect.
Example:
Endpoint listening on TCP.
An endpoint that is waiting on a relay server.
(2) Active endpoint-A type that can be connected if the address of the other endpoint is known.
Example:
Endpoint that connects to the port listening on the peer to which it is connected.
An endpoint that connects to a port listening on a relay server.
(3) Bilateral endpoint-A type that exchanges the addresses of its own and the other's endpoints and cannot connect without knowing the addresses of each other's endpoints.
Example:
An endpoint that needs to exchange addresses for NAT traversal.
図1を参照し、上述したエンドポイントの確定とそれらの接続試行によって、ピア間のセッション確立が行われる手順を説明する。ピア間のセッション確立は以下のような手順I〜VIで行われる。
I:(図1中のエリアIのシーケンス)呼び出し側ノードA101のパッシブ、バイラテラルエンドポイント(A、B、C1、C2)を生成し、相手ノードB107からの接続を受け入れられるよう初期化する。
II:(図1中のエリアIIのシーケンス)呼び出し側ノードA101のエンドポイント(A、B、C1、C2)のアドレスを呼制御サーバ105を通じて相手ノードB107に通知する。
III:(図1中のエリアIIIのシーケンス)呼び出され側ノードB107はパッシブ、バイラテラルエンドポイントを生成し、相手ノードA101からの接続を受け入れられるよう初期化する。
IV:(図1中のエリアIVのシーケンス)呼び出され側ノードB107のエンドポイントのアドレスを呼制御サーバ105を通じて呼び出し側ノードA101に通知する。
V:(図1中のエリアVのシーケンス)呼び出し側ノードA101が呼び出され側ノードB107のパッシブエンドポイントに対応するアクティブエンドポイント(a、b)を生成し、全エンドポイントで接続試行を行う。
VI:(図1中のエリアVIのシーケンス)呼び出され側ノードB107が呼び出し側ノードA101のパッシブエンドポイント(A、B)に対応するアクティブエンドポイントを生成し、全エンドポイントで接続試行を行う。
With reference to FIG. 1, a procedure for establishing a session between peers by determining the endpoints and trying to connect them will be described. The session establishment between the peers is performed by the following procedures I to VI.
I: (Sequence of area I in FIG. 1) The passive and bilateral endpoints (A, B, C1, C2) of the calling node A101 are generated and initialized to accept the connection from the partner node B107.
II: (Sequence of area II in FIG. 1) The address of the end point (A, B, C1, C2) of the calling node A101 is notified to the partner node B107 through the
III: (Sequence of area III in FIG. 1) The called
IV: (Sequence of area IV in FIG. 1) The address of the endpoint of the called
V: (Sequence of area V in FIG. 1) Calling node A101 is called to generate active endpoints (a, b) corresponding to passive endpoints of side node B107, and connection attempts are made at all endpoints.
VI: (Sequence of area VI in FIG. 1) The called
尚、上記手順VとVIは、それらの順番は問題とはならず、それらが近いタイミングで実行されることを要する。 Note that the order of the procedures V and VI does not matter and they need to be executed at close timing.
以下、上述した手順I〜VIのうち、本実施形態に特徴的な、
・パッシブ・バイラテラルエンドポイントのアドレス確定(I)の手法・順番
及び、
・アクティブ・バイラテラルエンドポイントの接続試行(V)の順番
について説明する。
Hereinafter, among the above-described procedures I to VI, which are characteristic of the present embodiment,
・ Method and order of passive bilateral endpoint address determination (I), and
The order of connection attempts (V) of active bilateral endpoints will be described.
(パッシブ・バイラテラルエンドポイントのアドレス確定(I)の手法・順番)
図1とさらに図2を参照し説明する。図2(a)、(b)、(c)は、アドレス確定の流れを例示した図である。図2(a)はローカル(ノードA101)でbindを行う図である。図2(b)は中継サーバ103でポートを開く図である。図2(c)はSTUNサーバ104で接続してアドレス予測を行う図である。
( Method and order of passive bilateral endpoint address determination (I) )
This will be described with reference to FIG. 1 and FIG. FIGS. 2A, 2B, and 2C are diagrams illustrating the flow of address determination. FIG. 2A is a diagram in which binding is performed locally (node A 101). FIG. 2B is a diagram for opening a port in the
パッシブ・バイラテラルエンドポイントには以下のエンドポイントがあり、アドレスの確定手順はそれぞれ異なる。
・図1、2中のA;ローカル(ノードA101)でlisten(パシッブオープンで待ち構える)しているエンドポイント(パッシブエンドポイント)
bindを行う(ポートをオープンする)。
・図1,2中のB;中継サーバ103で待ち受けを行うエンドポイント(パッシブエンドポイント)
中継サーバ103に接続し中継サーバ103のポートを開いてもらう。
・図1、2中のC1;アクティブオープンするTCPのNAT越えエンドポイント(バイラテラルポイント)
STUNのリクエストを送り、返って来たレスポンスから予測する。
・図1、2中のC2;パッシブオープンするTCPのNAT越えエンドポイント(バイラテラルポイント)
アクティブオープンで予測したアドレスから再度予測を行う。ポート番号が1ずつ増える傾向が見えた場合、アクティブオープンで利用するアドレスからポート番号を+1したものをパッシブオープンで利用する。
尚、アクティブオープンとパッシブオープンのアドレス予測方法は逆でも良い。
Passive and bilateral endpoints include the following endpoints, and the procedure for determining addresses is different.
・ A in FIGS. 1 and 2; local (node A101) listening (passive open waiting) endpoint (passive endpoint)
Bind (open the port).
・ B in FIGS. 1 and 2; an endpoint that waits on the relay server 103 (passive endpoint)
Connect to the
・ C1 in FIGS. 1 and 2; TCP NAT traversal endpoint (bilateral point) for active open
Send STUN request and predict from the returned response.
・ C2 in Figs. 1 and 2; Passive-open TCP NAT end point (bilateral point)
Prediction is performed again from the address predicted by active open. If you see a tendency that the port number increases by one, use the address that is used for active open plus the port number plus 1 for passive open.
Note that the active open and passive open address prediction methods may be reversed.
図1と2を参照し、アドレス確定の手順は「以下の順番」で行う。
(1)図1、図2(a);ローカル(ノードA101)でlistenしているエンドポイントAの初期化は任意の順番で行う。
(2)図1、図2(b);中継サーバ103での待ち受けを行うエンドポイントBは「STUNサーバ104へのTCPのNAT越えエンドポイント(C1、C2)より先に中継サーバ103へ接続を行う」。
(3)図1、図2(c);アクティブオープンするTCPのNAT越えエンドポイントC1がSTUNサーバ104へ接続を行う。
Referring to FIGS. 1 and 2, the address determination procedure is performed in the following order.
(1) FIG. 1, FIG. 2 (a): The initialization of the endpoint A listening locally (node A 101) is performed in an arbitrary order.
(2) FIG. 1 and FIG. 2 (b); the endpoint B that waits at the
(3) FIG. 1 and FIG. 2 (c): The TCP NAT traversing endpoint C 1 to be actively opened connects to the
(アクティブ・バイラテラルエンドポイントの接続試行(V)の順番)
図1とさらに図3、4を参照し説明する。図3、4は、接続試行の流れを順に例示した図である。図3(a)はアクティブオープンするNAT越えエンドポイントの接続試行を行う図である。図3(b)はパッシブオープンするNAT越えエンドポイントの接続試行を行う図である。図4(a)は相手のローカルアドレスに対して接続試行を行う図である。図4(b)は相手が開いた中継サーバに対して接続試行を行う図である。
( Active bilateral endpoint connection attempt (V) order )
This will be described with reference to FIG. 1 and FIGS. 3 and 4 are diagrams illustrating the flow of connection trials in order. FIG. 3 (a) is a diagram in which connection attempt of the NAT traversing endpoint that is actively opened is performed. FIG. 3B is a diagram in which a connection attempt is made for an endpoint across NAT that is passively opened. FIG. 4A shows a connection attempt to the other party's local address. FIG. 4B is a diagram in which a connection attempt is made to the relay server opened by the other party.
ここで、アクティブエンドポイントには以下のエンドポイントがある。
・図1、4中のa;相手ノードB107のローカルでlistenしているエンドポイントに接続するエンドポイント
・図1、4中のb;中継サーバ103で待ちうけを行うエンドポイントに接続するエンドポイント
図1と図3、4を参照し、接続試行の手順は「以下の順番」で行う。
(1)図1、図3(a);アクティブオープンするTCPのNAT越えエンドポイントC1(バイラテラルポイント)で接続試行を行う。
(2)図1、図3(b);パッシブオープンするTCPのNAT越えエンドポイントC2(バイラテラルポイント)で接続試行を行う。
(3)図1、及び図4(a)、(b);ローカルノードB107でlistenしているエンドポイントに接続するエンドポイントa(アクティブエンドポイント)、及び中継サーバ103での待ち受けを行うエンドポイントに接続するエンドポイントb(アクティブエンドポイント)の接続試行を行う。これら二つの接続試行の順序は任意。
Here, the active endpoint includes the following endpoints.
In FIG. 1 and FIG. 4, a: an endpoint connected to the local listening endpoint of the partner node B 107 b in FIG. 1, FIG. 4; an endpoint connected to the endpoint that waits at the
(1) FIG. 1 and FIG. 3 (a): A connection attempt is made at the NAT traversing endpoint C1 (bilateral point) of the TCP to be actively opened.
(2) FIG. 1 and FIG. 3 (b): A connection attempt is performed at the NAT traversing endpoint C2 (bilateral point) of the TCP that is passively opened.
(3) FIG. 1 and FIGS. 4 (a) and 4 (b); the endpoint a (active endpoint) connected to the endpoint listening at the
尚、上述したアドレス確定(I)の初期化の手順でアクティブオープンとパッシブオープンを逆にした場合、上記接続試行の手順(1)、(2)もそれらを逆にする必要がある。 When the active open and the passive open are reversed in the address determination (I) initialization procedure described above, the connection trial procedures (1) and (2) need to be reversed.
[他の実施形態]
以上述べた実施形態の他に次の形態を実施できる。
1)上述の実施形態は例示であって制限的なものではない。したがって、上述の実施形態の他にも変形が可能である。その変形が特許請求の範囲で述べられている本発明の技術思想に基づく限り、その変形は本発明の技術的範囲内となる。
[Other Embodiments]
In addition to the embodiments described above, the following embodiments can be implemented.
1) The above-mentioned embodiment is an illustration and is not restrictive. Therefore, modifications other than the above-described embodiment are possible. As long as the modification is based on the technical idea of the present invention described in the claims, the modification is within the technical scope of the present invention.
101 ノードA
102、106 ルータ
103 中継サーバ
104 STUNサーバ
105 呼制御サーバ
107 ノードB
101 Node A
102, 106
Claims (3)
前記第1のルータと前記第2のルータとが、中継サーバ及びSTUNサーバに接続されており、
前記第1のコンピュータが、第1のエンドポイントをオープンする第1のオープンステップと、
前記第1のコンピュータが前記中継サーバに接続し、前記中継サーバに第2のエンドポイントをオープンさせる第2のオープンステップと、
前記第1のコンピュータから前記STUNサーバへ、前記第1のルータを介してリクエストを送ることにより、前記第1のルータがアクティブオープンするTCPのNAT越えの第3のエンドポイントをオープンする第3のオープンステップと、
前記第1のルータが、前記第3のエンドポイントから予測することにより、パッシブオープンするTCPのNAT越えの第4のエンドポイントをオープンする第4のオープンステップと、
前記第1のルータを前記第2のルータに替え、前記第1のコンピュータに替えて前記第2のコンピュータが、前記第1のオープンステップから前記第4のオープンステップを行う第5のオープンステップと、
前記第1のコンピュータが、前記第3のエンドポイントを介して、前記第2のルータへの接続試行を行う第1の接続試行ステップと、
前記第1のコンピュータが、前記第4のエンドポイントを介して、前記第2のルータへの接続試行を行う第2の接続試行ステップと、
前記第1のコンピュータが、前記第5のオープンステップにおいて前記第2のコンピュータがオープンした第1のエンドポイントに接続試行を行う第3の接続試行ステップと、
前記第1のコンピュータが、前記第5のオープンステップにおいて前記第2のコンピュータが前記中継サーバにオープンさせた第2のエンドポイントに接続試行を行う第4の接続試行ステップと、
前記第2のルータを前記第1のルータに替え、前記第2のコンピュータに替えて前記第1のコンピュータが、前記第1の接続試行ステップから前記第4の接続試行ステップを行う第5の接続試行ステップと
を備えることを特徴とする通信方法。 In a communication method for performing P2P communication between a first computer connected to a first router having a NAT function and a second computer connected to a second router having a NAT function,
The first router and the second router are connected to a relay server and a STUN server;
A first opening step in which the first computer opens a first endpoint;
A second open step in which the first computer connects to the relay server and causes the relay server to open a second endpoint;
By sending a request from the first computer to the STUN server via the first router, the third router opens a third endpoint over the TCP NAT that the first router actively opens. Open step and
A fourth open step in which the first router opens a fourth endpoint beyond the NAT of the TCP to passively open by predicting from the third endpoint;
A fifth open step in which the first router is replaced with the second router, and the second computer performs the fourth open step from the first open step in place of the first computer; ,
A first connection attempt step in which the first computer attempts to connect to the second router via the third endpoint;
A second connection attempt step in which the first computer attempts to connect to the second router via the fourth endpoint;
A third connection attempt step in which the first computer attempts connection to the first endpoint opened by the second computer in the fifth open step;
A fourth connection trial step in which the first computer attempts to connect to a second endpoint that the second computer has opened to the relay server in the fifth open step;
A fifth connection in which the second router is replaced with the first router, and the first computer performs the fourth connection trial steps from the first connection trial step to the second computer. A communication method comprising: a trial step.
ことを特徴とする請求項1に記載の通信方法。 The communication method according to claim 1, wherein the first open step is performed in an arbitrary order from the second open step to the fourth open step.
ことを特徴とする請求項1又は2に記載の通信方法。
The communication method according to claim 1 or 2, wherein the endpoint opened in the third open step is changed to passive open, and the endpoint opened in the fourth open step is changed to active open.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005379958A JP4602247B2 (en) | 2005-12-28 | 2005-12-28 | Communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005379958A JP4602247B2 (en) | 2005-12-28 | 2005-12-28 | Communication method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007181122A JP2007181122A (en) | 2007-07-12 |
JP4602247B2 true JP4602247B2 (en) | 2010-12-22 |
Family
ID=38305770
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005379958A Active JP4602247B2 (en) | 2005-12-28 | 2005-12-28 | Communication method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4602247B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3086517A4 (en) | 2013-12-16 | 2017-12-27 | Yamaha Corporation | Communication system, terminal apparatus, and server |
JP2015119217A (en) * | 2013-12-16 | 2015-06-25 | ヤマハ株式会社 | Communication system and terminal device |
JP6331421B2 (en) * | 2014-01-28 | 2018-05-30 | ヤマハ株式会社 | Communication system and server |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005151142A (en) * | 2003-11-14 | 2005-06-09 | Sony Corp | Information communication system and method, information processing apparatus, method, program and recording medium |
JP2005260715A (en) * | 2004-03-12 | 2005-09-22 | Ntt Communications Kk | Terminal device having packet nat transparent function, and its program |
JP2005323347A (en) * | 2004-04-05 | 2005-11-17 | Matsushita Electric Ind Co Ltd | Communication apparatus, method and program for realizing p2p communication |
JP2005346608A (en) * | 2004-06-07 | 2005-12-15 | Matsushita Electric Ind Co Ltd | Server system, communication equipment, communication system, communication method, program therefor, and recording medium thereof |
-
2005
- 2005-12-28 JP JP2005379958A patent/JP4602247B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005151142A (en) * | 2003-11-14 | 2005-06-09 | Sony Corp | Information communication system and method, information processing apparatus, method, program and recording medium |
JP2005260715A (en) * | 2004-03-12 | 2005-09-22 | Ntt Communications Kk | Terminal device having packet nat transparent function, and its program |
JP2005323347A (en) * | 2004-04-05 | 2005-11-17 | Matsushita Electric Ind Co Ltd | Communication apparatus, method and program for realizing p2p communication |
JP2005346608A (en) * | 2004-06-07 | 2005-12-15 | Matsushita Electric Ind Co Ltd | Server system, communication equipment, communication system, communication method, program therefor, and recording medium thereof |
Also Published As
Publication number | Publication date |
---|---|
JP2007181122A (en) | 2007-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Rosenberg et al. | TCP Candidates with Interactive Connectivity Establishment (ICE) | |
Srisuresh et al. | State of peer-to-peer (P2P) communication across network address translators (NATs) | |
Ford et al. | Peer-to-peer communication across network address translators. | |
JP5209061B2 (en) | Control of sending interface of SIP response message | |
US8224985B2 (en) | Peer-to-peer communication traversing symmetric network address translators | |
US6980556B2 (en) | Method for splitting proxy function with a client terminal, a server and a terminal using the method | |
US8219679B2 (en) | Detection and control of peer-to-peer communication | |
JP5216018B2 (en) | Streaming media services for mobile phones | |
KR20080108022A (en) | Determining connectivity between endpoints in a network | |
US20130117437A1 (en) | Method for establising tcp connecting according to nat behaviors | |
JP4602247B2 (en) | Communication method | |
Lin et al. | How NAT-compatible are VoIP applications? | |
JP2005117587A (en) | Communication method | |
Phuoc et al. | NAT traversal techniques in peer-to-peer networks | |
Müller et al. | On the applicability of knowledge based nat-traversal for home networks | |
US8576854B2 (en) | System for communication between private and public IP networks | |
JP2007208999A (en) | Communication method | |
JP4722615B2 (en) | Communication method and communication apparatus | |
Constantinescu et al. | NAT/Firewall traversal for SIP: issues and solutions | |
Seemann et al. | Decentralized Hole Punching | |
Brennan et al. | Improving communication through overlay detours: Pipe dream or actionable insight? | |
Srisuresh et al. | RFC 5128: State of Peer-to-Peer (P2P) Communication across Network Address Translators (NATs) | |
Wander et al. | Ntalg-tcp nat traversal with application-level gateways | |
Topal et al. | Enabling peer-to-peer communication for hosts in private address realms using IPv4 LSRR option and IPv4+ 4 addresses | |
Chang et al. | KaiKai: A NAT Traversal Approach by Using Protocol Behavior Analysis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20081008 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20081008 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20081219 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100823 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100831 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100929 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131008 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4602247 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |