JP2012019361A - Communication device, server device, communication system, communicating method, and integrated circuit - Google Patents

Communication device, server device, communication system, communicating method, and integrated circuit Download PDF

Info

Publication number
JP2012019361A
JP2012019361A JP2010155272A JP2010155272A JP2012019361A JP 2012019361 A JP2012019361 A JP 2012019361A JP 2010155272 A JP2010155272 A JP 2010155272A JP 2010155272 A JP2010155272 A JP 2010155272A JP 2012019361 A JP2012019361 A JP 2012019361A
Authority
JP
Japan
Prior art keywords
determination
nat
information
port
request
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.)
Pending
Application number
JP2010155272A
Other languages
Japanese (ja)
Inventor
Satoru Takagishi
智 高岸
Fumiaki Suzuki
史章 鈴木
Yosuke Matsushita
陽介 松下
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Original Assignee
Panasonic Corp
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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2010155272A priority Critical patent/JP2012019361A/en
Publication of JP2012019361A publication Critical patent/JP2012019361A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a communication device for determining an NAT type of each of NAT devices when the NAT devices are connected in multiple stages.SOLUTION: A terminal device 405a includes: a determination cooperating request receiving portion 652 receiving a determination cooperating request for requesting cooperation in determining an NAT type of an NAT device 404b transmitted from an external server 401; a port forward instructing portion 653 instructing an NAT device 404a to execute port forward when receiving the determination cooperating request; a port information transmitting portion 654 transmitting port information including a port number used for the port forward to the external server 401; a determination packet transmitting/receiving portion 655 receiving a determination packet for determining the NAT type transmitted from the terminal device 405b connected to the NAT device 404b received the port information from the server device; and a determination information transmitting portion 656 transmitting determination information which is obtained on the basis of the received determination packet, and used for determining the NAT type.

Description

本発明は、NAT(Network Address Translation、ネットワークアドレス変換)機能を有するネットワーク中継装置におけるアドレス変換方法の種別を判別する機能を有する通信装置および通信システムに関する。   The present invention relates to a communication apparatus and a communication system having a function of determining a type of an address conversion method in a network relay apparatus having a NAT (Network Address Translation) function.

従来のインターネット技術を用いた通信方法においては、インターネットに直接接続された装置に対し、当該装置ごとに一意に定められたアドレスであるグローバルIPv4アドレス(以下グローバルIPアドレスと記載する)が割り当てられる。   In a communication method using the conventional Internet technology, a global IPv4 address (hereinafter referred to as a global IP address), which is an address uniquely determined for each device, is assigned to a device directly connected to the Internet.

しかし、グローバルIPアドレスの数は限られており、特に家庭向けのインターネット接続サービスにおいては、サービス1契約につき1つのグローバルIPアドレスしか割り当てられないことが多い。すなわち、1台の装置しかインターネットに直接接続することができない。   However, the number of global IP addresses is limited, and in particular for home Internet connection services, only one global IP address is often assigned per service contract. That is, only one device can be directly connected to the Internet.

そこで、使用できるグローバルアドレスの数を越える複数の装置が同時にインターネット上の装置と通信できるようにするため、プライベートIPアドレスと、NAT機能を有したルータ(以下、「NAT装置」という。)とを利用したネットワーク構成が広く利用されている。   Therefore, a private IP address and a router having a NAT function (hereinafter referred to as “NAT device”) are provided so that a plurality of devices exceeding the number of usable global addresses can simultaneously communicate with devices on the Internet. The network configuration used is widely used.

なお、プライベートIPアドレスとは、グローバルインターネット上のパケットの送信元IPアドレスおよび宛先IPアドレスとして使うことはできないが、ネットワーク装置のデバッグおよび企業内などの閉じられた(プライベートな)ネットワークにおける使用を目的としたIPアドレスである。   A private IP address cannot be used as a source IP address or a destination IP address of a packet on the global Internet, but is intended for use in a closed (private) network such as debugging of a network device and an enterprise. IP address.

また、NAT装置とは、グローバルIPアドレスとプライベートIPアドレスとの相互変換等を実行するNAT機能を有したネットワーク中継装置である。   The NAT device is a network relay device having a NAT function for performing mutual conversion between a global IP address and a private IP address.

なお、本明細書、特許請求の範囲、および図面において、「NAT」とはポート変換も行うNAPT(ネットワークアドレスポート変換、Network Address Port Translation)を含む意味で使用している。   In the present specification, claims, and drawings, “NAT” is used to include NAPT (Network Address Port Translation) that also performs port translation.

プライベートIPアドレスとNAT装置とを用いたネットワーク構成では、NAT装置配下の装置から通信を開始する限り、当該装置はインターネット上の他の装置と直接通信可能である。   In a network configuration using a private IP address and a NAT device, as long as communication is started from a device under the NAT device, the device can directly communicate with other devices on the Internet.

また、インターネット上の端末装置から通信を開始して、NAT装置配下の装置と直接通信する場合は、UPnP(Universal Plug and Play)対応のNAT装置を利用する方法、および、非特許文献1で示されているSTUN(Simple Traversal of UDP through NATs)を利用した方法が用いられる。   In addition, when starting communication from a terminal device on the Internet and directly communicating with a device under the NAT device, a method using a UPnP (Universal Plug and Play) compatible NAT device, and Non-Patent Document 1 A method using STUN (Simple Traversal of UDP through NATs) is used.

IETF(Internet Engineering Task Force)が発行するRFC(Request For Comment)3489に定義されるアルゴリズムによれば、NAT種別は以下のように分類される。   According to an algorithm defined in RFC (Request For Comment) 3489 issued by IETF (Internet Engineering Task Force), NAT types are classified as follows.

すなわち、NAT種別は、完全コーン型(Full Cone)、制限付きコーン型(Restricted Cone)、ポート制限付きコーン型(Port Restricted Cone)、および対称型(Symmetric)の4つの種別に分類される。4つのNAT種別の特徴をまとめたものが図1である。   That is, the NAT type is classified into four types: a full cone type, a restricted cone type (Restricted Cone), a port restricted cone type (Port Restricted Cone), and a symmetric type (Symmetric). FIG. 1 summarizes the characteristics of the four NAT types.

ここで、RFC3489に定義されたアルゴリズムに従うNAT種別の判定フローの例を図2に、また、その判定の際に実行する送信テスト(I、I´、II、およびIIIの4種類)の概略を図3A〜図3Dに示す。   Here, an example of a NAT type determination flow according to the algorithm defined in RFC3489 is shown in FIG. 2, and an outline of a transmission test (4 types of I, I ′, II, and III) executed at the time of the determination is shown. Shown in FIGS. 3A-3D.

図2示すように、まず、NAT種別の判定を行う端末装置は送信テストIを実行する(S101)。この送信テストIは、図3Aに示すように、端末装置からNAT装置を介して第1の宛先であるSTUNサーバAのIPアドレスaおよびポート番号p(以下、IPアドレスおよびポート番号の組み合わせを「アドレス(a,p)」のように記載する。)に対してBindingリクエストを送信することにより行われる。   As shown in FIG. 2, first, the terminal device that determines the NAT type executes the transmission test I (S101). As shown in FIG. 3A, the transmission test I includes an IP address a and a port number p (hereinafter referred to as a combination of an IP address and a port number) of the STUN server A that is the first destination from the terminal device via the NAT device. This is done by sending a Binding request to address (a, p) ”.

この場合、STUNサーバAに対してBindingレスポンスの送信元IPアドレスおよびポート番号の変更を要求するCHANGE−REQUEST(送信元情報変更要求)属性は指定されない。   In this case, the CHANGE-REQUEST (source information change request) attribute that requests the STUN server A to change the source IP address and port number of the Binding response is not specified.

続いて、端末装置は、STUNサーバAからの応答があったか否かを判定し(S102)、応答がなかった場合(S102でN)には、「(1)UDPをブロックするファイアウォールが存在している」と判定する。   Subsequently, the terminal device determines whether or not there is a response from the STUN server A (S102). If there is no response (N in S102), “(1) there is a firewall that blocks UDP. Is determined.

一方、端末装置は、STUNサーバAからのBindingレスポンスを受信した場合(S102でY)、そのMAPPED−ADDRESS(マッピングアドレス)属性としてBindingレスポンスに付加されたIPアドレス(すなわち、STUNサーバAが受信したBindingリクエストの送信元IPアドレス)が、端末装置のプライベートIPアドレスと同一か否かを判定する(S103)。   On the other hand, when the terminal device receives the Binding response from the STUN server A (Y in S102), the IP address added to the Binding response as the MAPPED-ADDRESS (mapping address) attribute (that is, received by the STUN server A) It is determined whether or not the binding request transmission source IP address is the same as the private IP address of the terminal device (S103).

そこで、IPアドレスが同一の場合(S103でY)、端末装置は、自身がNAT装置の配下にないと判断し、さらに送信テストIIを実行する(S104)。   Therefore, if the IP addresses are the same (Y in S103), the terminal device determines that it is not under the control of the NAT device, and further executes a transmission test II (S104).

この送信テストIIでは、図3Cに示すように、送信テストIと同一の宛先(アドレス(a,p))に対してBindingリクエストを送信するが、CHANGE−REQUEST属性において、STUNサーバAが応答する際の送信元として、Bindingリクエストの受信先とは異なるIPアドレスおよびポート番号(アドレス(b,q))を設定する。   In this transmission test II, as shown in FIG. 3C, a Binding request is transmitted to the same destination (address (a, p)) as in the transmission test I, but the STUN server A responds with the CHANGE-REQUEST attribute. As the transmission source, an IP address and a port number (address (b, q)) different from the receiving destination of the Binding request are set.

そこで、端末装置は、アドレス(b,q)を送信元とする応答、すなわち、STUNサーバBからの応答があったか否かを判定し(S105)、応答がなかった場合(S105でN)には、「(2)アドレス変換をしないが、対称型NAT装置のようにUDPをブロックするファイアウォールが存在している」と判定する。   Therefore, the terminal device determines whether or not there is a response having the address (b, q) as a transmission source, that is, a response from the STUN server B (S105), and if there is no response (N in S105). , “(2) There is a firewall that does not perform address translation but blocks UDP like a symmetric NAT device”.

一方、STUNサーバBからのBindingレスポンスを受信した場合(S105でY)、「(3)アクセス制限のないオープン・インターネット」であると判定する。   On the other hand, when a Binding response from the STUN server B is received (Y in S105), it is determined that the communication is “(3) Open Internet without access restriction”.

一方、S103においてIPアドレスが同一でない(端末装置がNAT装置の配下にある)場合(S103でN)、端末装置は、S104と同様の送信テストIIを実行し(S106)、STUNサーバBからの応答があったか否かを判定する(S107)。   On the other hand, when the IP addresses are not the same in S103 (the terminal device is under the control of the NAT device) (N in S103), the terminal device executes a transmission test II similar to S104 (S106), and the STUN server B It is determined whether or not there is a response (S107).

そこで、応答があった場合(S107でY)には、端末装置の指示どおりに、Bindingリクエストの受信先とは異なるIPアドレスおよびポート番号(アドレス(b,q))から応答が返ってきたことを意味する。そのため、端末装置は、NAT装置のNAT種別を「(4)完全コーン型(Full Cone)」であると判定する。   Therefore, when there is a response (Y in S107), the response is returned from an IP address and port number (address (b, q)) different from the binding request receiving destination as instructed by the terminal device. Means. Therefore, the terminal device determines that the NAT type of the NAT device is “(4) Full cone type”.

一方、応答がなかった場合(S107でN)、続いて、端末装置は送信テストI´を実行する(S108)。この送信テストI´は、図3Bに示すように、端末装置からNAT装置を介して第2の宛先であるSTUNサーバBのアドレス(b,q)に対してBindingリクエストを送信することにより行われる。この場合、送信テストIと同様に、CHANGE−REQUEST属性は指定されない。   On the other hand, when there is no response (N in S107), the terminal device executes a transmission test I ′ (S108). As shown in FIG. 3B, the transmission test I ′ is performed by transmitting a Binding request from the terminal device to the address (b, q) of the STUN server B that is the second destination via the NAT device. . In this case, like the transmission test I, the CHANGE-REQUEST attribute is not specified.

次に、端末装置は、送信テストI´のBindingリクエストに対するSTUNサーバBからのBindingレスポンスを受信すると、そのMAPPED−ADDRESS属性として付加されたIPアドレスおよびポート番号(すなわち、STUNサーバBが受信したBindingリクエストの送信元IPアドレスおよびポート番号)が、先の送信テストIの際にMAPPED−ADDRESS属性として付加されたIPアドレスおよびポート番号と同一か否かを判定する(S109)。   Next, when the terminal device receives the Binding response from the STUN server B in response to the Binding request of the transmission test I ′, the IP address and port number added as the MAPPED-ADDRESS attribute (that is, the Binding received by the STUN server B) It is determined whether or not the request source IP address and port number are the same as the IP address and port number added as the MAPPED-ADDRESS attribute in the previous transmission test I (S109).

そこで、これら2組のIPアドレスおよびポート番号が同一でない場合(S109でN)、異なるSTUNサーバのIPアドレス宛にBindingリクエストを送信した際に送信元のNAT装置のポート番号が変更されることがわかる。そのため、端末装置は、NAT装置のNAT種別を「(5)対称型(Symmetric)」であると判定する。   Therefore, if these two sets of IP addresses and port numbers are not the same (N in S109), the port number of the source NAT device may be changed when a Binding request is sent to the IP address of a different STUN server. Recognize. Therefore, the terminal device determines that the NAT type of the NAT device is “(5) Symmetric”.

一方、S109において当該2組のIPアドレスおよびポート番号が同一である場合(S109でY)、続いて、端末装置は送信テストIIIを実行し(S110)、STUNサーバAからの応答があったか否かを判定する(S111)。   On the other hand, if the two sets of IP addresses and port numbers are the same in S109 (Y in S109), then the terminal device executes transmission test III (S110), and whether or not there is a response from STUN server A Is determined (S111).

この送信テストIIIでは、図3Dに示すように、送信テストIと同一の宛先(アドレス(a,p))に対してBindingリクエストを送信する。しかし、送信テストIIIでは、CHANGE−REQUEST属性において、STUNサーバAが応答する際の送信元として、Bindingリクエストの受信先とは異なるポート番号(アドレス(a,q))が設定される。   In the transmission test III, as shown in FIG. 3D, a Binding request is transmitted to the same destination (address (a, p)) as the transmission test I. However, in the transmission test III, in the CHANGE-REQUEST attribute, a port number (address (a, q)) different from the binding request reception destination is set as the transmission source when the STUN server A responds.

そこで、応答があった場合(S111でY)には、異なるポート番号であっても、同一IPアドレスであれば応答が返ってくることから、端末装置は、NAT装置のNAT種別を「(6)制限付きコーン型(Restricted Cone)」であると判定する。   Therefore, when there is a response (Y in S111), even if the port numbers are different, the response is returned if the IP address is the same, and therefore the terminal device sets the NAT type of the NAT device to “(6 ) Restricted Cone ”.

一方、応答がなかった場合(S111でN)には、同一IPアドレスかつ異なるポート番号からの応答が返ってこないことから、端末装置は、NAT装置のNAT種別を「(7)ポート制限付きコーン型(Port Restricted Cone)」であると判定する。   On the other hand, when there is no response (N in S111), since the response from the same IP address and different port number is not returned, the terminal device sets the NAT type of the NAT device to “(7) cone with port restriction”. Type (Port Restricted Cone) ”.

このように、NAT装置の配下の端末装置は、上記送信テストI〜テストIIIおよびテストI´を適宜実行することで、当該NAT装置のNAT種別を判定することが可能である。インターネット上の他の端末装置は、上記のNAT種別判定方法を用いて求められたNAT種別に合ったNAT越え手法を選択し、NAT越えを行うことで、当該NAT装置の配下の端末装置との通信を開始することができる。   As described above, the terminal devices under the NAT apparatus can determine the NAT type of the NAT apparatus by appropriately executing the transmission tests I to III and the test I ′. Other terminal devices on the Internet select a NAT traversal method suitable for the NAT type obtained by using the NAT type determination method described above, and perform NAT traversal to establish a connection with the terminal device under the NAT device. Communication can be started.

一方、特許文献1には、STUNを利用したNAT種別判定方法とUPnPとを併用することで、NAT越え手法を選択し、NAT越えを実現する技術について開示されている。具体的には、特許文献1には、NAT装置のNAT種別判定結果情報に加え、UPnP対応有無情報を端末間で外部サーバ経由により交換することで、外部サーバと端末装置との間にNAT装置が2つ以上存在する多段NAT環境でも、NAT越えを行う方式が記載されている。   On the other hand, Patent Document 1 discloses a technique for selecting a NAT traversal method and realizing NAT traversal by using a NAT type determination method using STUN and UPnP in combination. Specifically, in Patent Document 1, in addition to the NAT type determination result information of the NAT device, UPnP-compatible presence / absence information is exchanged between the terminals via the external server, so that the NAT device is exchanged between the external server and the terminal device. In a multi-stage NAT environment in which two or more exist, a method for performing NAT traversal is described.

特開2008−236278号公報JP 2008-236278 A

J.Rosenberg, et al. “ RFC3489、STUN − Simple Traversal of User Datagram Protocol ( UDP ) Through Network Address Translators ( NATs ) ”、 [ online ]、 March 2003、 retrieved from the Internet: < URL: http://www.ietf.org/rfc/rfc3489.txt>J. et al. Rosenberg, et al. “RFC 3490, STUN-Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translats (NATs), [online], [3], [online]. ietf. org / rfc / rfc3389. txt>

しかしながら、上記のSTUNを利用した判定方法によれば、図4Aに示すように、STUNサーバ201と端末装置203との間に、NAT装置202が、1つだけ存在する場合のみNAT種別判定できる。つまり、図4Bに示すように、STUNサーバ204と端末装置207の間に、NAT装置が2つ以上(図4Bでは、NAT装置205とNAT装置206)多段接続される場合には、これら複数のNAT装置のNAT種別を、個別に判定することができないという課題を有している。   However, according to the above-described determination method using STUN, it is possible to determine the NAT type only when there is only one NAT device 202 between the STUN server 201 and the terminal device 203 as shown in FIG. 4A. That is, as shown in FIG. 4B, when two or more NAT devices are connected between the STUN server 204 and the terminal device 207 (in FIG. 4B, the NAT device 205 and the NAT device 206), a plurality of these NAT devices are connected. There is a problem that the NAT type of the NAT device cannot be individually determined.

具体的には、図4Bに示すネットワーク構成において、上記STUNを利用したNAT種別判定方法を用いた場合、2つのNAT装置を1つのNAT装置としてNAT種別が判定される。その結果、NAT装置205およびNAT装置206のNAT種別のうち、制限の厳しい方のNAT種別が判定結果として得られ(図5参照)、これらNAT装置の個別のNAT種別を得ることができないという課題を有していた。   Specifically, in the network configuration shown in FIG. 4B, when the NAT type determination method using the STUN is used, the NAT type is determined using two NAT devices as one NAT device. As a result, of the NAT types of the NAT device 205 and the NAT device 206, the more restrictive NAT type is obtained as a determination result (see FIG. 5), and the individual NAT types of these NAT devices cannot be obtained. Had.

例えば、図4BのNAT装置205のNAT種別が完全コーン型であり、NAT装置206のNAT種別が対称型である場合を想定する。この場合、対称型の方が完全コーン型よりも制限が厳しいため、上記STUNを利用したNAT種別判定の結果は、「対称型」となる。   For example, it is assumed that the NAT type of the NAT device 205 in FIG. 4B is a complete cone type and the NAT type of the NAT device 206 is a symmetric type. In this case, since the symmetric type is more restrictive than the complete cone type, the result of the NAT type determination using the STUN is “symmetric type”.

また、NAT装置205のNAT種別が対称型であり、NAT装置206のNAT種別が完全コーン型である場合でも同様であり、判定結果は、「対称型」となる。   The same applies to the case where the NAT type of the NAT device 205 is a symmetric type and the NAT type of the NAT device 206 is a complete cone type, and the determination result is “symmetric type”.

また、特許文献1に記載の技術でも、同様の課題を有しており、NAT装置が多段接続される場合には、複数のNAT装置それぞれのNAT種別を、個別に判定することができない。   The technique described in Patent Document 1 also has a similar problem. When NAT devices are connected in multiple stages, the NAT type of each of a plurality of NAT devices cannot be individually determined.

ここで、グローバルIPv4アドレスの枯渇問題の対策案として、図6のようにISP(Internet Service Provider)がISPが管理する施設内などに、ISPレベルでのNAT装置(以下、「ISP−NAT装置」という。)302またはそれに準ずる装置を設置して、サービス利用者にプライベートIPv4アドレスを割り当てることが検討されている。その結果、多段NAT環境が増えることが考えられると共に、同一のISP−NAT装置に接続された複数のNAT装置それぞれの配下の端末間における通信が発生しうる。   Here, as a countermeasure for the global IPv4 address depletion problem, a NAT device at the ISP level (hereinafter referred to as “ISP-NAT device”) is installed in a facility managed by an ISP (Internet Service Provider) as shown in FIG. It is considered to install a device 302 or similar and assign a private IPv4 address to a service user. As a result, it is conceivable that the multi-stage NAT environment increases, and communication between terminals under each of a plurality of NAT devices connected to the same ISP-NAT device may occur.

例えば、図6に示すネットワーク構成である場合、NAT装置303の配下の端末装置304と、NAT装置305の配下の端末装置306との間で通信が行われることが考えられる。   For example, in the case of the network configuration shown in FIG. 6, it is conceivable that communication is performed between the terminal device 304 under the NAT device 303 and the terminal device 306 under the NAT device 305.

この場合、端末装置304と端末装置306との間の通信において、越えるべきNAT装置は、NAT装置303とNAT装置305とである。このような通信環境において、STUNサーバ301を用いて従来のNAT種別判定方法を行った場合、NAT装置303およびNAT装置305それぞれの個別のNAT種別判定はできず、適切なNAT越え手法選択ができないという問題が発生しうる。   In this case, the NAT devices that should be exceeded in the communication between the terminal device 304 and the terminal device 306 are the NAT device 303 and the NAT device 305. In such a communication environment, when the conventional NAT type determination method is performed using the STUN server 301, the NAT type of each of the NAT device 303 and the NAT device 305 cannot be determined, and an appropriate NAT traversal method cannot be selected. The problem can occur.

本発明は、上記従来の課題を解決するもので、NAT装置が多段接続された場合のそれぞれのNAT装置のNAT種別を判定するための通信装置、サーバ装置、通信システム、通信方法、および集積回路を提供することを目的とする。   The present invention solves the above-described conventional problems, and a communication device, a server device, a communication system, a communication method, and an integrated circuit for determining the NAT type of each NAT device when NAT devices are connected in multiple stages The purpose is to provide.

上記従来の課題を解決するために、本発明の一態様に係る通信装置は、インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して、前記インターネットに接続されたサーバ装置と通信する通信装置であって、前記サーバ装置から送信される、前記上段NAT装置に接続された第2下段NAT装置のNAT種別の判定の協力を依頼する判定協力依頼を受信する判定協力依頼受信部と、前記判定協力依頼受信部により前記判定協力依頼が受信された場合、前記第1下段NAT装置が受信するパケットを当該通信装置に転送させるためのポートフォワードの実行を前記第1下段NAT装置に命令するポートフォワード命令部と、前記ポートフォワードに用いられるポート番号を含むポート情報を前記サーバ装置に送信するポート情報送信部と、前記第2下段NAT装置に接続された依頼端末であって、前記ポート情報を前記サーバ装置から受信した依頼端末から送信される前記NAT種別の判定のための判定パケットを受信する判定パケット受信部と、前記判定パケット受信部により受信された判定パケットに基づいて得られる、前記NAT種別の判定に用いられる判定情報を送信する判定情報送信部とを備える。   In order to solve the above-described conventional problems, a communication device according to an aspect of the present invention includes an upper NAT (Network Address Translation) device connected to the Internet, a first lower NAT device connected to the upper NAT device, and The communication device communicates with the server device connected to the Internet via the network, and cooperates in determining the NAT type of the second lower NAT device connected to the upper NAT device transmitted from the server device. A determination cooperation request receiving unit that receives a determination cooperation request to be requested; and when the determination cooperation request reception unit receives the determination cooperation request, the packet received by the first lower NAT device is transferred to the communication device. Port forward command unit for commanding the first lower NAT device to execute port forward of A port information transmitting unit for transmitting port information including a port number used for port forwarding to the server device, and a request terminal connected to the second lower NAT device, and receiving the port information from the server device A determination packet receiving unit that receives the determination packet for determining the NAT type transmitted from the requesting terminal, and a determination packet received based on the determination packet received by the determination packet receiving unit. A determination information transmission unit that transmits the determination information to be transmitted.

この構成によれば、当該通信装置がNAT種別の判定を依頼された場合、当該通信装置の直上の第1下段NAT装置に、NAT種別の判定を依頼する依頼端末からの判定パケットを転送させる設定がなされる。また、その設定情報であるポート情報はサーバ装置を介して依頼端末に通知されるため、依頼端末は、NAT種別の判定のための判定パケットを、第1下段NAT装置を通過させて当該通信装置に到達させることができる。   According to this configuration, when the communication device is requested to determine the NAT type, the first lower NAT device immediately above the communication device is configured to transfer the determination packet from the requesting terminal requesting the NAT type determination. Is made. Further, since the port information which is the setting information is notified to the requesting terminal via the server device, the requesting terminal passes the determination packet for determining the NAT type through the first lower NAT device and the communication device. Can be reached.

また、当該通信装置が、このように受信した判定パケットに対して応答した場合、当該応答は、第1下段NAT装置とって内部のネットワーク側から外部のネットワーク側の方向の通信であり、第1下段NAT装置によりブロック等されることはない。従って、当該応答は、依頼端末の直上の第2下段NAT装置まで到達する。   When the communication device responds to the determination packet received in this way, the response is communication in the direction from the internal network side to the external network side as the first lower NAT device. It is not blocked by the lower NAT device. Therefore, the response reaches the second lower NAT device immediately above the requesting terminal.

また、判定情報送信部により、当該通信装置が受信した判定パケットに基づく判定情報が送信される。そのため、この判定情報を受信する装置(例えば、サーバ装置、または依頼端末など)に、NAT種別の判定を適切に実行させることができる。   In addition, the determination information transmission unit transmits determination information based on the determination packet received by the communication apparatus. Therefore, it is possible to cause a device (for example, a server device or a requesting terminal) that receives this determination information to appropriately determine the NAT type.

このように、本態様の通信装置は、NAT種別の判定に協力する協力端末としての動作を行うことで、多段NAT環境における個別のNAT種別の判定を可能にしている。   As described above, the communication apparatus according to this aspect performs the operation as the cooperation terminal that cooperates with the determination of the NAT type, thereby enabling the determination of the individual NAT type in the multi-stage NAT environment.

また、本発明の一態様に係る通信装置はさらに、前記判定パケット受信部により受信された判定パケットに示される、前記第2下段NAT装置のIPアドレスとポート番号とを、前記上段NAT装置に接続された第3下段NAT装置を介して、前記第3下段NAT装置に接続された他の通信装置に通知する判定対象NAT情報通知部を備えるとしてもよい。   The communication device according to an aspect of the present invention further connects the IP address and port number of the second lower NAT device indicated in the determination packet received by the determination packet receiver to the upper NAT device. A determination target NAT information notification unit that notifies another communication device connected to the third lower NAT device via the third lower NAT device may be provided.

この構成によれば、他の通信装置に、依頼端末側のNAT装置のIPアドレス等の宛先情報が通知される。従って、当該他の通信装置を協力端末として動作させることが可能となる。   According to this configuration, other communication devices are notified of destination information such as the IP address of the NAT device on the requesting terminal side. Therefore, the other communication device can be operated as a cooperation terminal.

また、本発明の一態様に係るサーバ装置は、インターネットと、前記インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して第1通信装置と通信し、かつ、前記インターネットと、前記上段NAT装置と、前記上段NAT装置に接続された第2下段NAT装置とを介して第2通信装置と通信するサーバ装置であって、前記第1通信装置の接続環境を示す接続環境情報であって、前記第1下段NAT装置に関する情報を含む接続環境情報を受信する接続環境情報受信部と、前記第2通信装置から送信される、前記第2下段NAT装置のNAT種別の判定を依頼する判定依頼を受信する判定依頼受信部と、前記判定依頼受信部により前記判定依頼が受信された場合、接続環境情報受信部により受信された接続環境情報を参照することで、所定の基準を満たす前記第1通信装置を協力端末として選択する協力端末選択部と、前記協力端末選択部により選択された前記第1通信装置に、前記NAT種別の判定の協力を依頼する判定協力依頼を送信する判定協力依頼送信部と、前記判定協力依頼を受信した前記第1通信装置から送信されるポート情報であって、前記第1下段NAT装置が受信するパケットを前記第1通信装置に転送させるためのポートフォワードに用いられるポート番号を含むポート情報を受信し、かつ、受信したポート情報を前記第2通信装置に送信するポート情報送受信部とを備える。   A server device according to an aspect of the present invention includes a first NAT device connected to the Internet, an upper NAT (Network Address Translation) device connected to the Internet, and a first lower NAT device connected to the upper NAT device. A server device that communicates with one communication device and communicates with a second communication device via the Internet, the upper NAT device, and a second lower NAT device connected to the upper NAT device, Connection environment information indicating a connection environment of the first communication device, the connection environment information receiving unit receiving connection environment information including information on the first lower NAT device, and transmitted from the second communication device, A determination request receiving unit for receiving a determination request for requesting determination of the NAT type of the second lower NAT device; and the determination request receiving unit When the determination request is received, the cooperation terminal selection unit that selects the first communication device that satisfies a predetermined standard as a cooperation terminal by referring to the connection environment information received by the connection environment information reception unit; A determination cooperation request transmission unit that transmits a determination cooperation request for requesting cooperation of determination of the NAT type to the first communication device selected by the cooperation terminal selection unit, and the first communication that has received the determination cooperation request Port information transmitted from a device, the port information including a port number used for port forwarding for transferring a packet received by the first lower NAT device to the first communication device, and receiving A port information transmission / reception unit for transmitting the port information thus transmitted to the second communication device.

この構成によれば、本態様のサーバ装置は、NAT種別の判定依頼を受信した場合、協力端末として選択した通信装置に、NAT種別の判定の協力を依頼することができる。また、協力を依頼した協力端末から、協力端末の直上のNAT装置を越えて当該協力端末にパケットを到達させるためのポート情報を受信することができ、このポート情報をNAT種別の判定依頼を送信した依頼端末に通知することができる。   According to this configuration, when receiving the NAT type determination request, the server device according to the present aspect can request the NAT type determination cooperation from the communication device selected as the cooperation terminal. In addition, it is possible to receive port information for making a packet reach the cooperation terminal beyond the NAT device immediately above the cooperation terminal from the cooperation terminal that requested the cooperation, and send a determination request of the NAT type to this port information. Can be notified to the requested terminal.

従って、当該ポート情報の通知を受けた依頼端末は、判定パケットを協力端末に受信させることができ、協力端末を利用したNAT種別の判定のためのテストを適切に行うことができる。   Therefore, the requesting terminal that has received the notification of the port information can cause the cooperating terminal to receive the determination packet, and can appropriately perform a test for determining the NAT type using the cooperating terminal.

このように、本態様のサーバ装置は、NAT種別の判定を依頼する依頼端末に対し、この判定に協力する協力端末との通信に必要な情報を提供することで、多段NAT環境における個別のNAT種別の判定を可能にしている。   As described above, the server device according to this aspect provides the information necessary for communication with the cooperation terminal cooperating with this determination to the requesting terminal requesting the determination of the NAT type, thereby enabling the individual NAT in the multi-stage NAT environment. The type can be determined.

また、本発明の一態様に係るサーバ装置はさらに、前記ポート情報を受信した前記第2通信装置と、前記第1通信装置との間で送受信される判定パケットに基づく判定情報であって、前記NAT種別の判定に用いられる判定情報を、前記第1通信装置および前記第2通信装置のそれぞれから受信する判定情報受信部と、前記判定情報受信部により受信された判定情報を用いて、前記NAT種別の判定を行うNAT種別判定部と、前記NAT種別判定部による判定された前記NAT種別を示す情報である判定結果を前記第2通信装置に送信する判定結果送信部とを備えるとしてもよい。   The server device according to an aspect of the present invention may further include determination information based on a determination packet transmitted and received between the second communication device that has received the port information and the first communication device, Using the determination information received from each of the first communication device and the second communication device and the determination information received by the determination information receiving unit, the NAT information is used to determine the NAT type. A NAT type determination unit that performs type determination and a determination result transmission unit that transmits a determination result that is information indicating the NAT type determined by the NAT type determination unit to the second communication device may be provided.

この構成によれば、本態様のサーバ装置は、依頼端末および協力端末の双方から判定情報を取得し、取得した判定情報を用いることで、NAT種別の判定を適切に実行することができる。また、判定結果送信部により、この判定結果を依頼端末に通知することができる。   According to this configuration, the server device of this aspect can appropriately determine the NAT type by acquiring determination information from both the request terminal and the cooperation terminal and using the acquired determination information. In addition, the determination result transmission unit can notify the determination result to the request terminal.

また、本発明の一態様に係るサーバ装置において、前記接続環境情報受信部は、前記第1下段NAT装置がポートフォワード機能を有するか否かを示す情報を含む前記接続環境情報を受信し、前記協力端末選択部は、前記接続環境情報が、前記第1下段NAT装置がポートフォワード機能を有することを示す場合、前記第1下段NAT装置を協力端末として選択するとしてもよい。   In the server device according to an aspect of the present invention, the connection environment information receiving unit receives the connection environment information including information indicating whether or not the first lower NAT device has a port forward function, The cooperation terminal selection unit may select the first lower NAT device as the cooperation terminal when the connection environment information indicates that the first lower NAT device has a port forward function.

この構成によれば、本態様のサーバ装置は、例えば、協力端末として最も適した通信装置を協力端末として選択することができる。   According to this configuration, the server device according to this aspect can select, for example, the communication device most suitable as the cooperation terminal as the cooperation terminal.

また、本発明の一態様に係る通信装置は、インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して、前記インターネットに接続されたサーバ装置と通信する通信装置であって、前記第1下段NAT装置のNAT種別の判定を依頼する判定依頼を前記サーバ装置に送信する判定依頼部と、前記サーバ装置から送信されるポート情報であって、前記上段NAT装置に接続された第2下段NAT装置が受信するパケットを前記第2下段NAT装置に接続された協力端末に転送させるためのポートフォワードに用いられるポート番号を含むポート情報を受信するポート情報受信部と、前記ポート情報受信部により受信されたポート情報を用いて、前記NAT種別の判定のための判定パケットを前記協力端末に送信する判定パケット送信部と、前記判定パケット送信部により送信された前記判定パケットに基づいて求められた前記NAT種別を示す情報である判定結果を取得する判定結果取得部とを備える。   The communication device according to an aspect of the present invention is connected to the Internet via an upper NAT (Network Address Translation) device connected to the Internet and a first lower NAT device connected to the upper NAT device. A communication apparatus that communicates with the server apparatus, a determination request unit that transmits a determination request for requesting determination of a NAT type of the first lower NAT apparatus to the server apparatus, and port information transmitted from the server apparatus Port information including a port number used for port forwarding for transferring a packet received by the second lower NAT device connected to the upper NAT device to a cooperative terminal connected to the second lower NAT device. Port information receiving unit for receiving the port, and the port received by the port information receiving unit Using the information, a determination packet transmitter that transmits a determination packet for determining the NAT type to the cooperation terminal, and the NAT type obtained based on the determination packet transmitted by the determination packet transmitter A determination result acquisition unit that acquires a determination result that is information to be displayed.

この構成によれば、本態様の通信装置は、インターネットに接続されたサーバ装置から、協力端末の直上のNAT装置を越えて当該協力端末にパケットを到達させるためのポート情報を受信することができる。   According to this configuration, the communication device of this aspect can receive port information for causing a packet to reach the cooperation terminal beyond the NAT device immediately above the cooperation terminal from the server device connected to the Internet. .

これにより、当該通信装置は、協力端末に判定パケットを受信させることができる。つまり、当該通信装置は、自身の直上のNAT装置のNAT種別の判定のためのテストを、協力端末を利用して適切に実行することができ、その結果、当該NAT種別の判定結果を取得することができる。   Thereby, the said communication apparatus can make a cooperation terminal receive a determination packet. That is, the communication device can appropriately execute a test for determining the NAT type of the NAT device immediately above itself using the cooperation terminal, and as a result, acquires the determination result of the NAT type. be able to.

また、本発明の一態様に係る通信装置において、前記判定結果取得部は、前記判定パケット送信部により送信された前記判定パケットに基づく判定情報であって、前記NAT種別の判定に用いられる判定情報を前記サーバ装置に送信する判定情報送信部と、前記判定情報送信部により送信された判定情報を受信した前記サーバ装置から送信される前記判定結果を受信する判定結果受信部とを有する。   In the communication device according to one aspect of the present invention, the determination result acquisition unit is determination information based on the determination packet transmitted by the determination packet transmission unit, and is determination information used for determining the NAT type. A determination information transmission unit that transmits the determination result transmitted from the server device that has received the determination information transmitted by the determination information transmission unit.

この構成によれば、本態様の通信装置は、判定パケットに基づく判定情報を用いてNAT種別の判定を行う機能を有するサーバ装置に、NAT種別の判定を行わせることができる。つまり、当該通信装置は、自身で判定情報を処理してNAT種別を判定する必要はなく、サーバ装置から、当該NAT種別の判定結果を取得することができる。   According to this configuration, the communication apparatus according to this aspect can cause the server apparatus having a function of determining the NAT type using the determination information based on the determination packet to perform the determination of the NAT type. That is, the communication apparatus does not need to process the determination information by itself and determine the NAT type, and can acquire the determination result of the NAT type from the server apparatus.

また、本発明の一態様に係る通信装置において、前記判定結果取得部は、前記判定パケット送信部により送信された前記判定パケットに基づく判定情報であって、前記NAT種別の判定に用いられる判定情報を、前記ポート情報を受信した前記協力端末から受信する判定情報受信部と、前記判定情報受信部により受信された判定情報を用いて、前記NAT種別の判定を行うNAT種別判定部とを有する。   In the communication device according to one aspect of the present invention, the determination result acquisition unit is determination information based on the determination packet transmitted by the determination packet transmission unit, and is determination information used for determining the NAT type. A determination information receiving unit that receives the port information from the cooperating terminal, and a NAT type determining unit that determines the NAT type using the determination information received by the determination information receiving unit.

この構成によれば、本態様の通信装置は、判定パケットに基づく判定情報を用いてNAT種別の判定を行う機能を有する。   According to this configuration, the communication apparatus according to this aspect has a function of determining the NAT type using the determination information based on the determination packet.

つまり、当該通信装置は、判定パケットの送受信等の、NAT種別の判定のための処理には、サーバ装置等の他の装置を利用しつつ、最終的な判定結果を求める処理は当該通信装置で行うことができる。そのため、例えば、当該通信装置を、当該NAT種別を他の装置から隠すことができる。   That is, the communication device uses other devices such as a server device for processing for NAT type determination such as transmission / reception of determination packets, and the processing for obtaining a final determination result is performed by the communication device. It can be carried out. Therefore, for example, the communication device can hide the NAT type from other devices.

また、本発明は、上記いずれかの態様に係るサーバ装置と、上記いずれかの態様に係る依頼端末として機能する通信装置と、上記いずれかの態様に係る協力端末として機能する通信装置とを備える通信システムとして実現することができる。   In addition, the present invention includes a server apparatus according to any one of the above aspects, a communication apparatus that functions as a request terminal according to any one of the above aspects, and a communication apparatus that functions as a cooperation terminal according to any one of the above aspects. It can be realized as a communication system.

また、本発明は、上記いずれかの態様に係る通信装置が実行する特徴的な処理を含む通信方法として実現することもできる。   The present invention can also be realized as a communication method including characteristic processing executed by the communication apparatus according to any one of the above aspects.

また、本発明は、上記いずれかの態様に係るサーバ装置が実行する特徴的な処理を含む通信方法として実現することもできる。   The present invention can also be realized as a communication method including characteristic processing executed by the server device according to any one of the above aspects.

また、これら通信方法のそれぞれが含む各処理をコンピュータに実行させるためのプログラムとして実現すること、および、そのプログラムが記録された記録媒体として実現することもできる。そして、そのプログラムをインターネット等の伝送媒体またはDVD等の記録媒体を介して配信することもできる。   In addition, the present invention can be realized as a program for causing a computer to execute each process included in each of these communication methods, and as a recording medium on which the program is recorded. The program can be distributed via a transmission medium such as the Internet or a recording medium such as a DVD.

また、本発明は、上記いずれかの態様に係る通信装置が有する特徴的な構成部を備える集積回路として実現することもできる。   In addition, the present invention can also be realized as an integrated circuit including characteristic components included in the communication device according to any one of the above aspects.

また、本発明は、上記いずれかの態様に係るサーバ装置が有する特徴的な構成部を備える集積回路として実現することもできる。   Further, the present invention can also be realized as an integrated circuit including a characteristic component included in the server device according to any one of the above aspects.

本発明によれば、多段NAT環境の場合、つまり、NAT装置が多段接続された場合でも、それぞれのNAT装置のNAT種別を個別に判定することができる。   According to the present invention, even in a multi-stage NAT environment, that is, when NAT apparatuses are connected in multi-stages, the NAT type of each NAT apparatus can be individually determined.

例えば、2段のNAT装置を有する通信環境では、本発明により、下段に位置するNAT装置のNAT種別が個別に判定できる。このように、下段のNAT装置のNAT種別が個別に判定可能になることにより、上段のNAT装置のNAT種別も容易に推定することができる。   For example, in a communication environment having two-stage NAT devices, according to the present invention, the NAT type of the NAT device located in the lower stage can be individually determined. As described above, since the NAT type of the lower NAT device can be individually determined, the NAT type of the upper NAT device can be easily estimated.

また、上段のNAT装置がISP−NAT装置であった場合、当該ISP−NAT装置は、複数のユーザに共通して用いられる。そのため、例えば、複数のユーザのNAT種別判定結果を集め、管理することにより、複数ユーザのうちの一人でも、上段のNAT装置(ISP−NAT装置)のNAT種別が判定できれば、以後、上段のNAT装置の判定を行う必要がない。つまり、各ユーザは、上段のNAT装置のNAT種別判定結果を外部サーバ等に問い合わせるだけで、当該上段のNAT装置のNAT種別を得ることができる。   When the upper NAT device is an ISP-NAT device, the ISP-NAT device is commonly used by a plurality of users. Therefore, for example, if the NAT type of the upper NAT device (ISP-NAT device) can be determined by one of the multiple users by collecting and managing the NAT type determination results of a plurality of users, the upper NAT There is no need to determine the device. That is, each user can obtain the NAT type of the upper NAT device only by inquiring the external server or the like about the NAT type determination result of the upper NAT device.

NAT種別の特徴を示す図The figure which shows the feature of NAT classification 従来のSTUNを利用したNAT種別の判定方法を示すフローチャートA flowchart showing a conventional NAT type determination method using STUN. 従来のSTUNを利用したNAT種別の判定の際に実行するテストIの説明図Explanatory drawing of test I executed when determining NAT type using conventional STUN 従来のSTUNを利用したNAT種別の判定の際に実行するテストI´の説明図Explanatory drawing of test I 'performed in the case of determination of NAT classification using conventional STUN 従来のSTUNを利用したNAT種別の判定の際に実行するテストIIの説明図Explanatory drawing of Test II executed when determining NAT type using conventional STUN 従来のSTUNを利用したNAT種別の判定の際に実行するテストIIIの説明図Explanatory drawing of test III executed when determining NAT type using conventional STUN 従来のSTUNを利用したNAT種別判定が可能なネットワーク構成を示す図The figure which shows the network structure in which NAT classification judgment using the conventional STUN is possible. 従来のSTUNを利用したNAT種別判定が不可能なネットワーク構成を示す図The figure which shows the network structure which cannot perform NAT classification judgment using the conventional STUN NAT種別と、当該NAT種別の制限の厳しさとの関係を示す図The figure which shows the relationship between NAT classification and the severeness of restriction of the NAT classification concerned 今後予想されるネットワーク構成の一例を示す図Figure showing an example of the network configuration expected in the future 本発明の実施の形態1における通信システムの構成の一例を示す図The figure which shows an example of a structure of the communication system in Embodiment 1 of this invention. 実施の形態1における外部サーバおよび端末装置ハードウェア構成を示す図The figure which shows the external server and the terminal device hardware configuration in Embodiment 1. 実施の形態1における端末装置(依頼端末)の機能ブロックの一例を示す図The figure which shows an example of the functional block of the terminal device (request terminal) in Embodiment 1 実施の形態1における端末装置(協力端末)の機能ブロックの一例を示す図The figure which shows an example of the functional block of the terminal device (cooperation terminal) in Embodiment 1 実施の形態1における外部サーバの機能ブロックの一例を示す図The figure which shows an example of the functional block of the external server in Embodiment 1 実施の形態1における依頼端末の基本的な処理の流れを示すフロー図Flow chart showing the basic processing flow of the request terminal in the first embodiment 実施の形態1における外部サーバの基本的な処理の流れを示すフロー図Flow chart showing the basic processing flow of the external server in the first embodiment 実施の形態1における協力端末の基本的な処理の流れを示すフロー図Flow chart showing the flow of basic processing of the cooperative terminal in the first embodiment 実施の形態1の通信システムにおける各装置に割り当てられたIPアドレスの例を示す図The figure which shows the example of the IP address allocated to each apparatus in the communication system of Embodiment 1. 実施の形態1における各端末装置がNAT情報を外部サーバに登録する際の通信シーケンスの一例を示す図The figure which shows an example of the communication sequence at the time of each terminal device in Embodiment 1 registering NAT information with an external server 実施の形態1におけるNAT情報管理部に格納されているNAT情報のデータ構成例を示す図The figure which shows the data structural example of the NAT information stored in the NAT information management part in Embodiment 1. FIG. 実施の形態1における依頼端末がNAT種別判定依頼を送信してからNAT種別の判定結果を受信するまでの通信シーケンスの一例を示す図The figure which shows an example of the communication sequence after the request terminal in Embodiment 1 transmits a NAT classification determination request until it receives the determination result of a NAT classification. 実施の形態1におけるNAT種別の判定のためのテストAの説明図Explanatory drawing of test A for determination of NAT type in the first embodiment 実施の形態1におけるNAT種別の判定のためのテストA´の説明図Explanatory drawing of test A 'for determination of NAT type in Embodiment 1 実施の形態1におけるNAT種別の判定のためのテストBの説明図Explanatory drawing of test B for determination of NAT type in the first embodiment 実施の形態1におけるNAT種別の判定のためのテストCの説明図Explanatory drawing of test C for determination of NAT type in the first embodiment 実施の形態1におけるNAT種別の判定の流れの例を示すフローチャートFlowchart showing an example of the NAT type determination flow in the first embodiment 2段のNAT環境で、上段NAT装置のNAT種別が推定できる場合の一例を示す図The figure which shows an example when the NAT classification of an upper stage NAT apparatus can be estimated in a two-stage NAT environment 2段のNAT環境で、同一の上段NAT装置下の複数端末装置の情報により上段NAT装置のNAT種別が推定できる場合の一例を示す図The figure which shows an example in case NAT type of an upper stage NAT apparatus can be estimated from the information of multiple terminal devices under the same upper stage NAT apparatus in a two-stage NAT environment 本発明の実施の形態2における通信システムの構成の一例を示す図The figure which shows an example of a structure of the communication system in Embodiment 2 of this invention. 実施の形態2の通信システムにおける各装置に割り当てられたIPアドレスの例を示す図The figure which shows the example of the IP address allocated to each apparatus in the communication system of Embodiment 2. 実施の形態2における依頼端末がNAT種別判定依頼を送信してからNAT種別の判定結果を受信するまでの通信シーケンスの一例を示す図The figure which shows an example of a communication sequence after the request terminal in Embodiment 2 transmits a NAT classification determination request until it receives the determination result of a NAT classification. 実施の形態2におけるNAT種別の判定の流れの例を示すフローチャートFlowchart showing an example of a NAT type determination flow in the second embodiment 実施の形態1または2における端末装置がNAT種別判定機能を備える場合の機能ブロックの一例を示す図The figure which shows an example of a functional block in case the terminal device in Embodiment 1 or 2 is provided with the NAT classification determination function

以下、本発明を実施するための形態について、図面を参照しながら説明する。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.

(実施の形態1)
実施の形態1では、NAT種別判定の対象となるNAT装置(以下、「判定対象NAT装置」と記載する。)のNAT種別判定を行う場合に、NAT種別判定に協力する端末装置(以下、「協力端末」と記載する。)としての条件に適した端末装置が2台以上存在する時に有効な構成の一例を示す。
(Embodiment 1)
In the first embodiment, when performing NAT type determination of a NAT device (hereinafter referred to as “determination target NAT device”) that is a target of NAT type determination, a terminal device (hereinafter referred to as “ An example of a configuration effective when there are two or more terminal devices suitable for the condition of “cooperating terminal”.

まず、実施の形態1における通信システムの構成を説明する。
図7は、本発明の実施の形態1における通信システム400の構成の一例を示す図である。
First, the configuration of the communication system in the first embodiment will be described.
FIG. 7 is a diagram showing an example of the configuration of the communication system 400 according to Embodiment 1 of the present invention.

実施の形態1における通信システム400は、本発明の通信システムの一例である。
通信システム400は、図7に示すように、通信回線を介してインターネット402に接続された外部サーバ401、ISPレベルで設置されているISP−NAT装置403、NAT装置404a、404b、および404c、並びに、端末装置405a、405b、および405cを備える。
The communication system 400 in Embodiment 1 is an example of the communication system of the present invention.
As shown in FIG. 7, the communication system 400 includes an external server 401 connected to the Internet 402 via a communication line, an ISP-NAT device 403 installed at the ISP level, NAT devices 404a, 404b, and 404c, and Terminal devices 405a, 405b, and 405c.

インターネット402は、例えば光回線、CATV、または電話回線等で構成された有線回線、もしくは、無線回線を用いて構成された公衆通信ネットワーク、または、専用通信ネットワークである。インターネット402に接続された端末装置間で所定の通信プロトコルに従ってデータのやり取りを行うことが可能である。   The Internet 402 is a public communication network or a dedicated communication network configured by using, for example, a wired line constituted by an optical line, CATV, a telephone line, or the like, or a wireless line. Data can be exchanged between terminal devices connected to the Internet 402 according to a predetermined communication protocol.

端末装置405a〜405cのそれぞれは、本発明の通信装置の一例であり、TCP/IPおよびUDP/IPネットワークで通信できる機能を持ち、それぞれの目的に合わせデータ通信を行う。また、端末装置405a〜405cのそれぞれは、本発明のサーバ装置の通信相手である第1通信装置または第2通信装置として動作する通信装置の一例である。   Each of the terminal devices 405a to 405c is an example of a communication device according to the present invention, has a function capable of communicating over a TCP / IP and UDP / IP network, and performs data communication according to each purpose. Each of the terminal devices 405a to 405c is an example of a communication device that operates as a first communication device or a second communication device that is a communication partner of the server device of the present invention.

また、端末装置405a〜405cのそれぞれは、NAT種別判定依頼を外部サーバ401に送信する機能(以下、NAT種別判定依頼を送信する端末装置を、「依頼端末」と記載する)と、外部サーバ401からのNAT種別の判定の協力の依頼を示す判定協力依頼を受信する機能(以下、判定協力依頼を受信する端末装置を、「協力端末」と記載する)とを備える。   Each of the terminal devices 405 a to 405 c has a function of transmitting a NAT type determination request to the external server 401 (hereinafter, a terminal device that transmits a NAT type determination request is referred to as “request terminal”), and the external server 401. A function of receiving a determination cooperation request indicating a request for cooperation in NAT type determination (hereinafter, a terminal device receiving the determination cooperation request is referred to as a “cooperation terminal”).

また、端末装置405a〜405cのそれぞれは、協力端末として動作することのできる機能を有する。具体的には、端末装置405a〜405cのそれぞれは、自身を直接的に配下に置くNAT装置、つまり自身の直上のNAT装置(以下、「協力NAT装置」と記載する)に自動ポートフォワードを設定する機能と、判定パケットを送受信する機能と、判定パケットに基づく、NAT種別判定に用いられる情報である判定情報を、外部サーバ401に送信する機能とを有する。以上説明した各機能の詳細は後述する。   Further, each of the terminal devices 405a to 405c has a function capable of operating as a cooperation terminal. Specifically, each of the terminal devices 405a to 405c sets automatic port forwarding to a NAT device that directly controls the terminal device 405a to 405c, that is, a NAT device directly above itself (hereinafter referred to as “cooperative NAT device”). A function for transmitting / receiving a determination packet, and a function for transmitting determination information based on the determination packet, which is information used for NAT type determination, to the external server 401. Details of each function described above will be described later.

NAT装置404a〜404cは、NAT機能を持つルータであり、パケットのルーティング機能を持つと共にLAN(Local Area Network)を構成する。   The NAT devices 404a to 404c are routers having a NAT function, and have a packet routing function and constitute a LAN (Local Area Network).

なお、NAT装置404a〜404cのそれぞれは、本発明の通信装置およびサーバ装置の通信を中継する第1下段NAT装置、第2下段NAT装置、または第3下段NAT装置として機能する装置の一例である。   Each of the NAT devices 404a to 404c is an example of a device that functions as a first lower NAT device, a second lower NAT device, or a third lower NAT device that relays communication between the communication device and the server device of the present invention. .

このLANに接続する各端末はプライベートIPアドレスを持ち、同一LAN内に存在する端末同士ではプライベートIPアドレスを用いて通信を行うことができる。   Each terminal connected to the LAN has a private IP address, and terminals existing in the same LAN can communicate with each other using the private IP address.

ISP−NAT装置403は、ISPが設置するNAT機能を持つルータであり、各顧客へのIPアドレス割当管理などを行うが、パケットの転送機能としては、NAT装置404a〜404cと同等の機能を有する。   The ISP-NAT device 403 is a router having a NAT function installed by the ISP, and performs IP address allocation management to each customer. The packet transfer function has a function equivalent to that of the NAT devices 404a to 404c. .

なお、ISP−NAT装置403は、本発明の通信装置およびサーバ装置の通信を中継する上段NAT装置として機能する装置の一例である。   The ISP-NAT device 403 is an example of a device that functions as an upper NAT device that relays communication between the communication device and the server device of the present invention.

外部サーバ401は、本発明のサーバ装置の一例である。外部サーバ401は、端末装置405a〜405cからのNAT種別判定依頼を受信する機能と、外部サーバ401内のNAT情報管理部に保持された情報を参照することで適切な協力端末を選択する機能と、選択した協力端末に判定協力依頼を送信する機能と、協力端末から自動マッピングしたポート番号を示すポート番号情報等を受信する機能と、前記ポート番号情報と共に、協力NAT装置のWAN側IPアドレス情報を、依頼端末へ通知する機能と、依頼端末と協力端末とから判定情報を受信する機能と、受信した判定情報から、判定対象NAT装置のNAT種別を判定する機能とを有する。これら各機能の詳細は後述する。   The external server 401 is an example of a server device of the present invention. The external server 401 has a function of receiving NAT type determination requests from the terminal devices 405a to 405c, and a function of selecting an appropriate cooperation terminal by referring to information held in the NAT information management unit in the external server 401. A function of transmitting a determination cooperation request to the selected cooperation terminal, a function of receiving port number information indicating a port number automatically mapped from the cooperation terminal, and the WAN side IP address information of the cooperation NAT device together with the port number information For receiving the determination information from the requesting terminal and the cooperation terminal, and a function for determining the NAT type of the determination target NAT device from the received determination information. Details of these functions will be described later.

なお、外部サーバ401が必ずしも、NAT情報管理部を内包する必要はない。NAT情報管理部を外部サーバ401とは別の装置に設け、NAT情報を保持および管理する機能を実現してもよい。   The external server 401 does not necessarily have to include the NAT information management unit. A NAT information management unit may be provided in a device different from the external server 401 to realize a function of holding and managing NAT information.

次に、外部サーバ401および端末装置405a〜405cのハードウェア構成を説明する。   Next, the hardware configuration of the external server 401 and the terminal devices 405a to 405c will be described.

図8は、本発明の実施の形態1における外部サーバ401、および、端末装置405a〜405cのハードウェア構成を示す図である。   FIG. 8 is a diagram illustrating a hardware configuration of the external server 401 and the terminal devices 405a to 405c according to the first embodiment of the present invention.

つまり、外部サーバ401および端末装置405a〜405cは、ソフトウェアを実行可能な通常のハードウェア構成を有する情報処理装置により実現可能である。   That is, the external server 401 and the terminal devices 405a to 405c can be realized by an information processing apparatus having a normal hardware configuration capable of executing software.

具体的には、外部サーバ401および端末装置405a〜405cには、CPU(中央演算処理装置)501と、主記憶装置502と、通信制御装置503と、外部記憶装置504と、入力装置505と、出力装置506と、が含まれる。   Specifically, the external server 401 and the terminal devices 405a to 405c include a CPU (Central Processing Unit) 501, a main storage device 502, a communication control device 503, an external storage device 504, an input device 505, An output device 506.

各装置は、バス507を介して相互に接続され、各装置間で必要な情報が伝送可能に構成されている。なお、図8に示されたハードウェア構成は一例であり、外部サーバ401および端末装置405a〜405cそれぞれのハードウェア構成は、必ずしも、この通りの構成である必要はない。   The devices are connected to each other via a bus 507 so that necessary information can be transmitted between the devices. Note that the hardware configuration shown in FIG. 8 is an example, and the hardware configuration of each of the external server 401 and the terminal devices 405a to 405c is not necessarily the same configuration.

例えば、出力装置506は、当該外部サーバまたは端末装置とは異なる装置(テレビジョン等)で実現されてもよい。この場合、当該外部サーバまたは端末装置には別途D/Aコンバータ等のテレビジョン信号生成装置を具備し、当該外部サーバまたは端末装置と出力装置506とはAVケーブルや同軸ケーブル等で接続される。   For example, the output device 506 may be realized by a device (such as a television) that is different from the external server or the terminal device. In this case, the external server or terminal device is separately provided with a television signal generation device such as a D / A converter, and the external server or terminal device and the output device 506 are connected by an AV cable, a coaxial cable, or the like.

図9は、本発明の実施の形態1における依頼端末の機能ブロックの一例を示す図である。   FIG. 9 is a diagram illustrating an example of functional blocks of the request terminal according to Embodiment 1 of the present invention.

つまり、図9には、端末装置405a〜405cのそれぞれが有する、依頼端末として機能するための機能構成が図示されている。   That is, FIG. 9 illustrates a functional configuration for functioning as a request terminal included in each of the terminal devices 405a to 405c.

なお、各機能ブロックは、例えば、依頼端末の主記憶装置502または外部記憶装置504に格納されたプログラムがCPU501によって実行されることで実現される。   Each functional block is realized by the CPU 501 executing a program stored in the main storage device 502 or the external storage device 504 of the request terminal, for example.

NAT情報登録部601は、依頼端末と外部サーバ401の間にある全ての、NAT装置の情報(NAT情報)を、外部サーバ401に登録する処理部であり、それらNAT装置の情報を収集する機能をも有する。   The NAT information registration unit 601 is a processing unit that registers all NAT device information (NAT information) between the requesting terminal and the external server 401 in the external server 401, and has a function of collecting information on the NAT devices. It also has.

上記の「NAT情報」は本発明のサーバ装置における接続環境情報の一例であり、端末装置405a〜405cのそれぞれから外部サーバ401に登録される情報である。   The “NAT information” is an example of connection environment information in the server device of the present invention, and is information registered in the external server 401 from each of the terminal devices 405a to 405c.

外部サーバ401に登録される、NAT情報としては、各端末装置と外部サーバ401との間にあるNAT装置の数と、各NAT装置のWAN側IPアドレスおよびLAN側IPアドレスと、UPnPおよびNAT−PMP(NAT Port mapping Protocol)等の自動ポートフォワード機能の有無情報等の情報とが例示される。なお、NAT情報として収集される情報は、これらに限定されるものではない。   The NAT information registered in the external server 401 includes the number of NAT devices between each terminal device and the external server 401, the WAN side IP address and LAN side IP address of each NAT device, UPnP and NAT- Examples thereof include information such as presence / absence information of an automatic port forward function such as PMP (NAT Port mapping Protocol). Note that information collected as NAT information is not limited to these.

NAT種別判定依頼部602は、依頼端末が自端末より上位(自端末よりインターネットに近い位置)にあるNAT装置のNAT種別情報を得るための、NAT種別判定依頼パケットを外部サーバ401へ送信する。   The NAT type determination request unit 602 transmits a NAT type determination request packet to the external server 401 for obtaining NAT type information of a NAT device in which the requesting terminal is higher than the own terminal (position closer to the Internet than the own terminal).

このとき、例えば、外部サーバ401が備えるNAT情報管理部に、当該NAT種別判定依頼に対応する判定対象NAT装置のNAT種別情報があった場合には、外部サーバ401は当該NAT種別情報を端末装置に返信してもよい。   At this time, for example, if the NAT information management unit provided in the external server 401 has the NAT type information of the determination target NAT device corresponding to the NAT type determination request, the external server 401 sends the NAT type information to the terminal device. You may reply to

ポート情報受信部603は、協力端末が行った自動ポートフォワード命令に対応するポート情報(協力端末が協力NAT装置に自動ポートフォワード命令を行ったことにより、当該NAT装置に設定された、ポートフォワードが行われるポート番号等を示す情報)を、外部サーバ401経由で受信する。このとき、当該協力NAT装置のWAN側IPアドレスも同時に受信する。   The port information receiving unit 603 receives port information corresponding to the automatic port forward command issued by the cooperating terminal (the port forward set in the NAT device when the cooperating terminal issues an automatic port forward command to the cooperating NAT device). Information indicating a port number to be performed) is received via the external server 401. At this time, the WAN side IP address of the cooperative NAT device is also received at the same time.

判定パケット送受信部604は、判定対象NAT装置のNAT種別判定を行うために、依頼端末と協力端末との間で、判定パケットを送受信する。判定パケット送受信部604は、前記ポート情報受信部603で得た協力NAT装置のポート番号とWAN側IPアドレスとを、判定パケットの宛先ポートと宛先アドレスに指定して、判定パケットを送信する。当該機能の詳細は後述する。   The determination packet transmission / reception unit 604 transmits / receives a determination packet between the requesting terminal and the cooperation terminal in order to determine the NAT type of the determination target NAT device. The determination packet transmission / reception unit 604 transmits the determination packet by designating the port number and WAN side IP address of the cooperative NAT device obtained by the port information reception unit 603 as the destination port and destination address of the determination packet. Details of this function will be described later.

判定結果取得部610は、判定対象NAT装置のNAT種別の判定結果を取得する。本実施の形態においては、外部サーバ401によりNAT種別の判定処理が行われ、判定結果取得部610は、その結果を外部サーバ401から取得する。判定結果取得部610は、このような判定結果を取得するための機能構成として、判定情報送信部605と判定結果受信部606とを有する。   The determination result acquisition unit 610 acquires the determination result of the NAT type of the determination target NAT device. In the present embodiment, NAT type determination processing is performed by the external server 401, and the determination result acquisition unit 610 acquires the result from the external server 401. The determination result acquisition unit 610 includes a determination information transmission unit 605 and a determination result reception unit 606 as functional configurations for acquiring such a determination result.

判定情報送信部605は、判定パケット送受信部604によって送信された、判定パケットに基づく判定情報であって、NAT種別の判定に用いられる判定情報を、外部サーバ401に送信する。この送信処理は、判定パケット送受信の後に行われる。   The determination information transmitting unit 605 transmits determination information based on the determination packet transmitted by the determination packet transmitting / receiving unit 604 and used for determining the NAT type to the external server 401. This transmission processing is performed after transmission / reception of the determination packet.

判定結果受信部606は、外部サーバ401が、依頼端末および協力端末から送信された判定情報を用いて判定した、判定対象NAT装置のNAT種別を示す判定結果を、外部サーバ401がから受信する。これにより、依頼端末は判定対象NAT装置のNAT種別を知ることができる。   The determination result receiving unit 606 receives from the external server 401 a determination result indicating the NAT type of the determination target NAT device, which is determined by the external server 401 using the determination information transmitted from the requesting terminal and the cooperation terminal. Thereby, the requesting terminal can know the NAT type of the determination target NAT device.

なお、図9、並びに、後述する図10および図11の各ブロック図において、点線の矩形で示される構成要素は、各図に示される装置に含まれている必要はない。   In addition, in FIG. 9 and each block diagram of FIG. 10 and FIG. 11 to be described later, the components indicated by dotted rectangles do not need to be included in the apparatus shown in each drawing.

例えば、図9におけるNAT情報登録部601は、依頼端末に含まれていなくてもよい。この場合、NAT情報登録部601が外部サーバ401に登録すべきNAT情報を、例えば他の装置が外部サーバ401に登録してもよい。   For example, the NAT information registration unit 601 in FIG. 9 may not be included in the request terminal. In this case, NAT information to be registered in the external server 401 by the NAT information registration unit 601 may be registered in the external server 401 by another device, for example.

図10は、本発明の実施の形態1における協力端末の機能ブロックの一例を示す図である。   FIG. 10 is a diagram illustrating an example of functional blocks of the cooperation terminal according to Embodiment 1 of the present invention.

つまり、図10には、端末装置405a〜405cのそれぞれが有する、協力端末として機能するための機能構成が図示されている。   That is, FIG. 10 illustrates a functional configuration for functioning as a cooperation terminal included in each of the terminal devices 405a to 405c.

各機能ブロックは、例えば、協力端末の主記憶装置502または外部記憶装置504に格納されたプログラムがCPU501によって実行されることで実現される。   Each functional block is realized, for example, by the CPU 501 executing a program stored in the main storage device 502 or the external storage device 504 of the cooperation terminal.

NAT情報登録部651は、依頼端末と外部サーバ401との間にある全てのNAT装置についてのNAT情報を、外部サーバ401に登録する。また、NAT情報登録部651は、それらNAT装置の情報を収集する機能も有する。つまり、NAT情報登録部651は依頼端末におけるNAT情報登録部601と同等の機能を有する。   The NAT information registration unit 651 registers NAT information for all NAT devices between the requesting terminal and the external server 401 in the external server 401. The NAT information registration unit 651 also has a function of collecting information on these NAT devices. That is, the NAT information registration unit 651 has the same function as the NAT information registration unit 601 in the requesting terminal.

判定協力依頼受信部652は、外部サーバ401から、NAT種別の判定への協力を依頼する判定協力依頼を受信する。具体的には、判定協力依頼受信部652は、当該依頼内容を示す判定協力依頼パケットを受信する。つまり、ある端末装置が備える判定協力依頼受信部652が判定協力依頼パケットを受信することにより、当該端末装置は、協力端末として判定対象NAT装置の種別判定に協力し、判定パケットの送受信を行うことになる。当該機能の詳細は後述する。   The determination cooperation request receiving unit 652 receives from the external server 401 a determination cooperation request for requesting cooperation for determination of the NAT type. Specifically, the determination cooperation request reception unit 652 receives a determination cooperation request packet indicating the request content. That is, when the determination cooperation request receiving unit 652 included in a certain terminal device receives the determination cooperation request packet, the terminal device cooperates with the determination of the type of the determination target NAT device as the cooperation terminal, and transmits and receives the determination packet. become. Details of this function will be described later.

自動ポートフォワード命令部653は、協力NAT装置へ、任意のポート番号を用いた自動ポートフォワード命令を送信する。当該機能はUPnPまたはNAT−PMP等で実現される。また、この自動ポートフォワード命令は、当該端末装置が外部サーバ401から協力端末と選択され、判定協力依頼パケットを受信することで実行される。   The automatic port forward command unit 653 transmits an automatic port forward command using an arbitrary port number to the cooperative NAT device. This function is realized by UPnP or NAT-PMP. The automatic port forward command is executed when the terminal device is selected as a cooperation terminal from the external server 401 and receives a determination cooperation request packet.

ポート情報送信部654は、自動ポートフォワード命令部653が用いたポート番号と、協力NAT装置のWAN側IPアドレスとをポート情報として、外部サーバ401経由で依頼端末へ通知する。   The port information transmission unit 654 notifies the requesting terminal via the external server 401 of the port number used by the automatic port forward command unit 653 and the WAN side IP address of the cooperative NAT device as port information.

また、このとき、協力端末は、ポート情報に協力NAT装置のWAN側IPアドレスを付与せず、外部サーバ401がNAT情報管理部から協力NAT装置のWAN側IPアドレスを取得して付与してもよい。また、2台の協力端末間でも、協力NAT装置のWAN側IPアドレスとポート番号情報とを含むポート情報の交換を、外部サーバ401経由で行う。   At this time, the cooperation terminal does not give the WAN side IP address of the cooperation NAT device to the port information, but the external server 401 acquires the WAN side IP address of the cooperation NAT device from the NAT information management unit and gives it. Good. Also, exchange of port information including the WAN-side IP address and port number information of the cooperative NAT device is also performed between the two cooperative terminals via the external server 401.

判定パケット送受信部655は、判定対象NAT装置のNAT種別判定のために、依頼端末と協力端末との間で、判定パケットを送受信する。判定パケット送受信部655は、依頼端末が備える判定パケット送受信部604から送信される判定パケットを受信するとともに、その判定パケットの送信元アドレスとポート番号を得て、その送信元アドレスに応答パケットを送信する。当該機能の詳細は後述する。   The determination packet transmission / reception unit 655 transmits / receives a determination packet between the requesting terminal and the cooperation terminal in order to determine the NAT type of the determination target NAT device. The determination packet transmission / reception unit 655 receives the determination packet transmitted from the determination packet transmission / reception unit 604 included in the requesting terminal, obtains a transmission source address and a port number of the determination packet, and transmits a response packet to the transmission source address To do. Details of this function will be described later.

判定情報送信部656は、判定パケット送受信部655によって受信された、判定パケットに基づく判定情報であって、NAT種別の判定に用いられる判定情報を、外部サーバ401に送信する。この送信処理は、判定パケット送受信の後に行われる。   The determination information transmission unit 656 transmits determination information based on the determination packet received by the determination packet transmission / reception unit 655 and used for determination of the NAT type to the external server 401. This transmission processing is performed after transmission / reception of the determination packet.

判定結果受信部657は、例えば外部サーバ401から、NAT種別の判定結果を受信する。なお、判定結果受信部657が受信する判定結果は、依頼端末の直上のNAT装置のNAT種別を示す情報であり、当該情報は、上述のように、上段のNAT装置(ISP−NAT装置403)のNAT種別の判定に用いることができる。   The determination result receiving unit 657 receives a NAT type determination result from, for example, the external server 401. Note that the determination result received by the determination result receiving unit 657 is information indicating the NAT type of the NAT device directly above the requesting terminal, and this information is, as described above, the upper NAT device (ISP-NAT device 403). Can be used to determine the NAT type.

判定対象NAT情報通知部658は、判定パケット送受信部655により受信された判定パケットに示される、判定対象NAT装置のIPアドレスとポート番号とを、外部サーバ401から判定協力依頼を受信した他の端末装置に通知する。   The determination target NAT information notification unit 658 receives the determination cooperation NAT request from the external server 401 for the IP address and port number of the determination target NAT device indicated in the determination packet received by the determination packet transmission / reception unit 655. Notify the device.

なお、NAT情報登録部651は協力端末に含まれていなくてもよい。この場合、NAT情報登録部651部が外部サーバ401に登録すべきNAT情報を、例えば、他の装置が外部サーバ401に登録してもよい。   The NAT information registration unit 651 may not be included in the cooperation terminal. In this case, NAT information to be registered in the external server 401 by the NAT information registration unit 651 may be registered in the external server 401 by another device, for example.

また、判定結果受信部657は協力端末に含まれていなくてもよい。協力端末は、判定対象NAT装置のNAT種別の判定に協力する機能を有していればよく、判定結果受信部657を備えないことで、当該機能が減殺されることはない。   Further, the determination result receiving unit 657 may not be included in the cooperation terminal. The cooperating terminal only needs to have a function of cooperating in the determination of the NAT type of the determination target NAT device, and the function is not diminished by not including the determination result receiving unit 657.

また、判定対象NAT情報通知部658は協力端末に含まれていなくてもよい。後述する実施の形態2で説明するように、協力端末が1台のみ存在する場合であっても、判定対象NAT装置のNAT種別の判定が可能な場合がある。そのため、他の協力端末に判定対象NAT装置のポート番号等を通知する判定対象NAT情報通知部658はなくてもよい。   Further, the determination target NAT information notification unit 658 may not be included in the cooperation terminal. As will be described in the second embodiment to be described later, even when only one cooperation terminal exists, it may be possible to determine the NAT type of the determination target NAT device. Therefore, the determination target NAT information notification unit 658 for notifying other cooperation terminals of the port number of the determination target NAT device or the like may be omitted.

図11は、本発明の実施の形態1における外部サーバ401の機能ブロックの一例を示す図である。   FIG. 11 is a diagram illustrating an example of functional blocks of the external server 401 according to Embodiment 1 of the present invention.

各機能ブロックは、例えば外部サーバ401の主記憶装置502または外部記憶装置504に格納されたプログラムがCPU501によって実行されることで実現される。   Each functional block is realized by the CPU 501 executing a program stored in the main storage device 502 or the external storage device 504 of the external server 401, for example.

NAT情報受信部701は、本発明のサーバ装置における接続環境情報受信部の一例であり、各端末装置から送信されてくる、当該端末装置と外部サーバ401との間にあるNAT装置の情報を含むNAT情報を受信する。   The NAT information receiving unit 701 is an example of a connection environment information receiving unit in the server device of the present invention, and includes information on the NAT device between the terminal device and the external server 401 transmitted from each terminal device. Receive NAT information.

NAT情報受信部701が受信したNAT情報は、NAT情報管理部706に格納され管理される。   The NAT information received by the NAT information receiving unit 701 is stored and managed in the NAT information management unit 706.

なお、NAT情報管理部706は、外部サーバ401に必須の構成要素ではない、例えば、外部サーバ401とは別のサーバ装置を設置して、当該サーバ装置にこれらNAT情報を管理させてもよい。この場合、NAT情報受信部701が当該サーバ装置からNAT情報を受信すればよい。   Note that the NAT information management unit 706 is not an essential component of the external server 401. For example, a server device different from the external server 401 may be installed and the server device may manage the NAT information. In this case, the NAT information receiving unit 701 may receive NAT information from the server device.

また、NAT情報管理部706により保持および管理されるNAT情報としては、ユニークな端末装置名と、NAT装置の数と、各NAT装置のWAN側IPアドレスと、各NAT装置のLAN側IPアドレスと、UPnPまたはNAT−PMP等のNAT装置の自動ポートフォワード機能の有無情報などが例示されるが、これらに限られたものではない。NAT情報管理部706の管理例は、処理フローの説明内で後述する。   The NAT information held and managed by the NAT information management unit 706 includes a unique terminal device name, the number of NAT devices, a WAN side IP address of each NAT device, and a LAN side IP address of each NAT device. The presence / absence information of the automatic port forward function of the NAT device such as UPnP or NAT-PMP is exemplified, but is not limited thereto. A management example of the NAT information management unit 706 will be described later in the description of the processing flow.

判定依頼受信部702は、依頼端末から送信されるNAT種別判定依頼を受信する。
協力端末選択部707は、判定依頼受信部702によりNAT種別判定依頼が受信された場合、上述のNAT情報を参照することで、所定の基準を満たす端末装置を協力端末として選択する。
The determination request receiving unit 702 receives a NAT type determination request transmitted from the requesting terminal.
When the determination request reception unit 702 receives a NAT type determination request, the cooperation terminal selection unit 707 refers to the NAT information described above to select a terminal device that satisfies a predetermined standard as a cooperation terminal.

判定協力依頼送信部703は、協力端末選択部707により選択された協力端末へ、判定協力依頼パケットを送信する。   The determination cooperation request transmission unit 703 transmits a determination cooperation request packet to the cooperation terminal selected by the cooperation terminal selection unit 707.

ポート情報送受信部704は、協力端末が協力NAT装置へ行った自動ポートフォワード命令に対応するポート情報を受信し、受信したポート情報を依頼端末に送信することで、協力NAT装置のポート番号とWAN側IPアドレスと依頼端末に通知する。   The port information transmission / reception unit 704 receives the port information corresponding to the automatic port forward command issued by the cooperation terminal to the cooperation NAT device, and transmits the received port information to the request terminal, so that the port number and WAN of the cooperation NAT device are transmitted. To the requesting terminal.

なお、ポート情報送受信部704は、協力NAT装置のWAN側IPアドレスを含まないポート情報を協力端末から受信し、当該パケットに協力NAT装置のWAN側IPアドレス含めて依頼端末に転送するだけでもよい。   Note that the port information transmission / reception unit 704 may receive port information not including the WAN side IP address of the cooperative NAT device from the cooperative terminal and forward the packet to the requesting terminal including the WAN side IP address of the cooperative NAT device. .

判定部710は、判定対象NAT装置のNAT種別を判定する。判定部710は、NAT種別の判定処理を行うための機能構成として、判定情報受信部705とNAT種別判定部708とを有する。   The determination unit 710 determines the NAT type of the determination target NAT device. The determination unit 710 includes a determination information reception unit 705 and a NAT type determination unit 708 as functional configurations for performing a NAT type determination process.

判定情報受信部705は、依頼端末と協力端末とからそれぞれ送信されてくる判定情報を受信する。NAT種別判定部708は、判定情報受信部705により受信された判定情報を用いて、判定対象NAT装置のNAT種別を判定する。   The determination information receiving unit 705 receives determination information transmitted from the requesting terminal and the cooperation terminal. The NAT type determination unit 708 uses the determination information received by the determination information reception unit 705 to determine the NAT type of the determination target NAT device.

判定結果送信部709は、判定部710から得られる判定結果を、依頼端末に通知する。   The determination result transmission unit 709 notifies the request terminal of the determination result obtained from the determination unit 710.

なお、判定部710および判定情報受信部705は、外部サーバ401に必須の構成要素ではない。例えば、依頼端末または協力端末に判定部710に相当する機能を備えさせ、依頼端末または協力端末にNAT種別の判定処理を行わせてもよい。   Note that the determination unit 710 and the determination information reception unit 705 are not essential components of the external server 401. For example, the request terminal or the cooperation terminal may be provided with a function corresponding to the determination unit 710, and the request terminal or the cooperation terminal may perform NAT type determination processing.

依頼端末が判定部710に相当する機能を有する場合の機能構成については、図25を用いて後述する。   A functional configuration when the request terminal has a function corresponding to the determination unit 710 will be described later with reference to FIG.

また、図9〜図11のそれぞれに示す機能構成の一部または全部は、1つの集積回路として実現することができる。つまり、依頼端末および協力端末の少なくとも一方として機能する端末装置405a(405b、405c)、および外部サーバ401は、それぞれ集積回路によって実現することができる。   Also, part or all of the functional configuration shown in each of FIGS. 9 to 11 can be realized as one integrated circuit. That is, the terminal device 405a (405b, 405c) that functions as at least one of the requesting terminal and the cooperation terminal, and the external server 401 can each be realized by an integrated circuit.

次に、図12A〜図12Cを用いて、外部サーバ401、および、端末装置405a〜405cの基本的な処理の流れを説明する。   Next, the basic processing flow of the external server 401 and the terminal devices 405a to 405c will be described with reference to FIGS. 12A to 12C.

図12Aは、本発明の実施の形態1における依頼端末の基本的な処理の流れを示すフロー図である。   FIG. 12A is a flowchart showing a basic processing flow of the request terminal according to Embodiment 1 of the present invention.

なお、図12Aを用いて、端末装置405aが依頼端末として機能する場合の基本的な処理フローを説明するが、端末装置405bおよび405cも図12Aに示す処理を実行することで依頼端末として機能することができる。   The basic processing flow when the terminal device 405a functions as a request terminal will be described with reference to FIG. 12A. The terminal devices 405b and 405c also function as a request terminal by executing the processing shown in FIG. 12A. be able to.

NAT種別判定依頼部602は、判定対象NAT装置であるNAT装置404aのNAT種別の判定を依頼する判定依頼を、外部サーバ401に送信する(S10)。   The NAT type determination request unit 602 transmits a determination request for requesting determination of the NAT type of the NAT device 404a, which is the determination target NAT device, to the external server 401 (S10).

ポート情報受信部603は、外部サーバ401から送信されるポート情報であって、協力NAT装置から協力端末へのポートフォワードに用いられるポート番号を含むポート情報を受信する(S11)。   The port information receiving unit 603 receives the port information transmitted from the external server 401 and including the port number used for port forwarding from the cooperative NAT device to the cooperative terminal (S11).

判定パケット送受信部604は、ポート情報受信部603により受信されたポート情報を用いて、判定パケットを協力端末に送信する(S12)。つまり、ポート情報に含まれるポート番号を宛先ポートとして含む判定パケットを生成し、協力端末に送信する。   The determination packet transmission / reception unit 604 transmits a determination packet to the cooperation terminal using the port information received by the port information reception unit 603 (S12). That is, a determination packet including the port number included in the port information as the destination port is generated and transmitted to the cooperation terminal.

判定結果取得部610は、上記判定パケットの送信結果を用いて求められた、NAT装置404aのNAT種別を示す情報である判定結果を取得する(S13)。本実施の形態では、判定結果取得部610は、外部サーバ401から送信される判定結果を取得する。   The determination result acquisition unit 610 acquires a determination result, which is information indicating the NAT type of the NAT device 404a, obtained using the transmission result of the determination packet (S13). In the present embodiment, the determination result acquisition unit 610 acquires the determination result transmitted from the external server 401.

図12Bは、本発明の実施の形態1における外部サーバ401の基本的な処理の流れを示すフロー図である。図12Bを用いて、外部サーバ401の基本的な処理フローを説明する。   FIG. 12B is a flowchart showing a basic processing flow of the external server 401 according to Embodiment 1 of the present invention. A basic processing flow of the external server 401 will be described with reference to FIG. 12B.

NAT情報受信部701は、各端末装置(405a〜405c)から、NAT装置に関する情報を含む接続環境情報を受信する(S20)。本実施の形態においては、接続環境情報は、上述のように各NAT装置のWAN側IPアドレスおよびLAN側IPアドレスなどを含むNAT情報である。   The NAT information receiving unit 701 receives connection environment information including information related to the NAT device from each terminal device (405a to 405c) (S20). In the present embodiment, the connection environment information is NAT information including the WAN side IP address and LAN side IP address of each NAT device as described above.

また、本実施の形態においては、NAT情報受信部701により受信されたNAT情報は、NAT情報管理部706に格納される。   In the present embodiment, the NAT information received by the NAT information receiving unit 701 is stored in the NAT information management unit 706.

判定依頼受信部702は、依頼端末から送信される、判定対象NAT装置のNAT種別の判定を依頼するNAT種別判定依頼を受信する(S21)。   The determination request receiving unit 702 receives a NAT type determination request for requesting determination of the NAT type of the determination target NAT device transmitted from the requesting terminal (S21).

協力端末選択部707は、判定依頼受信部702がNAT種別判定依頼を受信した場合、NAT情報受信部701により受信されたNAT情報を参照することで、所定の基準を満たす端末装置を協力端末として選択する(S22)。   When the determination request receiving unit 702 receives the NAT type determination request, the cooperating terminal selecting unit 707 refers to the NAT information received by the NAT information receiving unit 701 as a cooperating terminal. Select (S22).

判定協力依頼送信部703は、協力端末選択部707により選択された協力端末に、当該NAT種別の判定の協力を依頼する判定協力依頼を送信する(S23)。   The determination cooperation request transmission unit 703 transmits a determination cooperation request for requesting cooperation of the NAT type determination to the cooperation terminal selected by the cooperation terminal selection unit 707 (S23).

ポート情報送受信部704は、判定協力依頼を受信した協力端末からポート情報を受信する(S24)。ポート情報送受信部704はさらに、受信したポート情報を依頼端末に送信する(S25)。   The port information transmission / reception unit 704 receives port information from the cooperation terminal that has received the determination cooperation request (S24). The port information transmission / reception unit 704 further transmits the received port information to the requesting terminal (S25).

なお、上記ポート情報には、協力NAT装置が受信するパケットを協力端末に転送させるためのポートフォワードに用いられるポート番号が含まれている、また、本実施の形態においては、協力NAT装置のWAN側IPアドレスも上記ポート情報に含まれている。   The port information includes a port number used for port forwarding for transferring a packet received by the cooperating NAT device to the cooperating terminal. In the present embodiment, the WAN of the cooperating NAT device is used. The side IP address is also included in the port information.

図12Cは、本発明の実施の形態1における協力端末の基本的な処理の流れを示すフロー図である。   FIG. 12C is a flowchart showing a basic processing flow of the cooperative terminal according to Embodiment 1 of the present invention.

なお、図12Cを用いて、端末装置405aが協力端末として機能する場合の基本的な処理フローを説明するが、端末装置405bおよび405cも図12Cに示す処理を実行することで協力端末として機能することができる。   Although a basic processing flow when the terminal device 405a functions as a cooperation terminal will be described with reference to FIG. 12C, the terminal devices 405b and 405c also function as a cooperation terminal by executing the processing shown in FIG. 12C. be able to.

判定協力依頼受信部652は、外部サーバ401から送信される、前記上段NAT判定対象NAT装置のNAT種別の判定の協力を依頼する判定協力依頼を受信する(S30)。   The determination cooperation request receiving unit 652 receives the determination cooperation request transmitted from the external server 401 and requesting the cooperation of the NAT type determination of the upper NAT determination target NAT device (S30).

判定協力依頼受信部652により判定協力依頼が受信された場合、協力NAT装置であるNAT装置404aが受信するパケットを端末装置405aに転送させるためのポートフォワードの実行をNAT装置404aに命令する(S31)。   When the determination cooperation request reception unit 652 receives the determination cooperation request, the NAT device 404a is instructed to execute port forwarding for transferring the packet received by the NAT device 404a, which is the cooperation NAT device, to the terminal device 405a (S31). ).

ポート情報送信部654は、上記ポートフォワードに用いられるポート番号を含むポート情報を外部サーバ401に送信する(S32)。本実施の形態においては、このポート情報にはNAT装置404aのWAN側IPアドレスも含まれている。   The port information transmission unit 654 transmits port information including the port number used for the port forwarding to the external server 401 (S32). In the present embodiment, this port information includes the WAN side IP address of the NAT device 404a.

判定パケット送受信部655は、上記ポート情報を外部サーバ401から受信した依頼端末から送信される、NAT種別の判定のための判定パケットを受信する(S33)。   The determination packet transmitting / receiving unit 655 receives a determination packet for determining the NAT type transmitted from the requesting terminal that has received the port information from the external server 401 (S33).

判定情報送信部656は、判定パケット送受信部655により受信された判定パケットに基づいて得られる、当該NAT種別の判定に用いられる判定情報を外部サーバ401に送信する(S34)。   The determination information transmission unit 656 transmits the determination information used for determining the NAT type obtained based on the determination packet received by the determination packet transmission / reception unit 655 to the external server 401 (S34).

次に、実施の形態1における通信システム400における各装置の処理の流れを、図13〜図20を用いて説明する。   Next, the flow of processing of each device in the communication system 400 according to Embodiment 1 will be described with reference to FIGS.

具体的には、図13に示す環境を例に、通信システム400が備える各装置の処理の流れを説明する。   Specifically, the processing flow of each device included in the communication system 400 will be described using the environment illustrated in FIG. 13 as an example.

図13は、実施の形態1の通信システム400における各装置に割り当てられたIPアドレスの例を示す図である。   FIG. 13 is a diagram illustrating an example of an IP address assigned to each device in the communication system 400 according to the first embodiment.

図13に示すように各装置に1つまたは2つのIPアドレスが割り当てられている環境を想定する。   Assume an environment in which one or two IP addresses are assigned to each device as shown in FIG.

また、端末装置405aであるCE_Xが、依頼端末としてNAT種別判定依頼パケットを送信する場合を想定し、以下の説明を行う。また、NAT装置404bおよび404cは自動ポートフォワード機能を有し、協力NAT装置として動作する場合を想定する。   Further, assuming that CE_X that is the terminal device 405a transmits a NAT type determination request packet as a request terminal, the following description will be given. Further, it is assumed that the NAT devices 404b and 404c have an automatic port forward function and operate as a cooperative NAT device.

つまり、この場合、端末装置405b(CE_Y)および端末装置405c(CE_Z)は、協力端末として動作する。   That is, in this case, the terminal device 405b (CE_Y) and the terminal device 405c (CE_Z) operate as cooperative terminals.

図14は、実施の形態1における各端末装置がNAT情報を外部サーバ401に登録する際の通信シーケンスの一例を示す図である。   FIG. 14 is a diagram illustrating an example of a communication sequence when each terminal device according to the first embodiment registers NAT information in the external server 401.

まず、S201a〜S201cの各処理において、各端末装置(CE_X、CE_Y、CE_Z)は、外部サーバ401との間にある全てのNAT装置の情報(NAT情報)を取得する。   First, in each process of S201a to S201c, each terminal device (CE_X, CE_Y, CE_Z) acquires information on all NAT devices (NAT information) between itself and the external server 401.

取得するNAT情報としては、上述のように、各NAT装置のWAN側IPアドレスおよびLAN側IPアドレスと、UPnPおよびNAT−PMP等における自動ポートフォワード機能の有無情報などである。   As described above, the NAT information to be acquired includes the WAN side IP address and the LAN side IP address of each NAT device, the presence / absence information of the automatic port forward function in UPnP, NAT-PMP, and the like.

なお、各NAT装置のWAN側IPアドレスおよびLAN側IPアドレスは、traceroute等のICMPパケット、または、UPnPのGetExternalIPAddress等を用いることにより得ることができる。また自動ポートフォワード機能の有無情報は、UPnP等の機能を使うことにより判断することができる。   The WAN side IP address and LAN side IP address of each NAT device can be obtained by using ICMP packets such as traceroute or UPnP GetExternalIPAddress. Further, the presence / absence information of the automatic port forward function can be determined by using a function such as UPnP.

例えば、CE_Xは、直上のNAT装置404a(判定対象NAT装置_X)にUPnP等に規定された所定の問合せパケットを送信することで、判定対象NAT装置_XのLAN側IPアドレス“192.168.1.1”およびWAN側IPアドレス“192.168.0.2”、並びに、自動ポートフォワード機能の有無情報を取得する。また、CE_Xは、ISP−NAT装置403に対しても同様に問合せパケットを送信することで、ISP−NAT装置403のLAN側IPアドレス“192.168.0.1” およびWAN側IPアドレス“10.0.0.2” 、並びに、自動ポートフォワード機能の有無情報を取得する。   For example, CE_X transmits a predetermined inquiry packet defined by UPnP or the like to the NAT device 404a (determination target NAT device_X) immediately above, thereby determining the LAN side IP address “192.168.8.1” of the determination target NAT device_X. .1 ”and WAN-side IP address“ 192.168.0.2 ”, and the presence / absence information of the automatic port forward function are acquired. CE_X also transmits an inquiry packet to the ISP-NAT device 403 in the same manner, whereby the LAN-side IP address “192.168.0.1” and the WAN-side IP address “10” of the ISP-NAT device 403 are transmitted. 0.0.2 "and the presence / absence information of the automatic port forward function.

また、CE_Yは、直上のNAT装置404b(協力NAT装置_Y)およびISP−NAT装置403のそれぞれからNAT情報を取得し、CE_Zは、直上のNAT装置404c(協力NAT装置_Z)およびISP−NAT装置403のそれぞれからNAT情報を取得する。   CE_Y acquires NAT information from the NAT device 404b (cooperating NAT device_Y) and ISP-NAT device 403 directly above, and CE_Z is the NAT device 404c (cooperating NAT device_Z) and ISP-NAT device directly above. NAT information is acquired from each of 403.

なお、図14に示すS201a〜S201cの各処理は、外部サーバ401を除く全端末装置が、自端末よりも上位にあるNAT装置の情報を取得する処理であり、得る情報はNAT装置のLAN側およびWAN側IPアドレス、自動ポートフォワード機能の有無情報などであるが、その他の情報を取得してもよい。   14 is a process in which all terminal devices except for the external server 401 obtain information on NAT devices that are higher than the own terminal, and the information to be obtained is the LAN side of the NAT device. And the WAN side IP address, the presence / absence information of the automatic port forwarding function, etc., but other information may be acquired.

S202a〜S202cの各処理では、各端末装(CE_X、CE_Y、CE_Z)は、上記S201a〜S201cで取得したNAT情報を外部サーバ401へ送信する。外部サーバ401はS203a〜S203cにおいてNAT情報を受信すると、外部サーバ401内のNAT情報管理部706にNAT情報を登録し管理する。   In each process of S202a to S202c, each terminal device (CE_X, CE_Y, CE_Z) transmits the NAT information acquired in S201a to S201c to the external server 401. When the external server 401 receives the NAT information in S203a to S203c, the external server 401 registers and manages the NAT information in the NAT information management unit 706 in the external server 401.

なお、上記のS201a〜S201c、S202a〜S202cおよびS203a〜S203cの各処理は、各端末装置(CE_X、CE_Y、CE_Z)がネットワークに接続した時または電源起動時に行うことも可能である。つまり、これら各処理は、後述する図16の処理フローが行われる前に実行されるのであれば、いつ実行されてもよい。   Note that the above-described processes of S201a to S201c, S202a to S202c, and S203a to S203c can also be performed when each terminal device (CE_X, CE_Y, CE_Z) is connected to the network or when the power is turned on. That is, these processes may be executed at any time as long as they are executed before the process flow of FIG. 16 described later is performed.

図15は、実施の形態1におけるNAT情報管理部706に格納されているNAT情報のデータ構成例を示す図である。   FIG. 15 is a diagram illustrating a data configuration example of NAT information stored in the NAT information management unit 706 according to the first embodiment.

ここで、図15に示す“NAT1”は、2段のNAT装置を介して外部サーバ401と通信する各端末装置についての上段のNAT装置を意味する。つまり、本実施の形態では、全ての端末装置について、NAT1はISP−NAT装置403である。   Here, “NAT1” shown in FIG. 15 means the upper NAT device for each terminal device that communicates with the external server 401 via the two-stage NAT device. That is, in this embodiment, NAT1 is the ISP-NAT device 403 for all terminal devices.

また、“NAT2”は、各端末装置についての下段のNAT装置を意味する。つまり、本実施の形態においては、図13に示すように、CE_XについてのNAT2は、判定対象NAT装置_Xである。また、CE_YについてのNAT2は、協力NAT装置_Yであり、CE_ZについてのNAT2は、協力NAT装置_Zである。   “NAT2” means the lower NAT device for each terminal device. That is, in the present embodiment, as shown in FIG. 13, NAT2 for CE_X is the determination target NAT device_X. Further, NAT2 for CE_Y is a cooperative NAT device_Y, and NAT2 for CE_Z is a cooperative NAT device_Z.

また、自動ポートフォワード機能の欄の“1”は、自動ポートフォワード機能があることを意味し、自動ポートフォワード機能の欄の“0”は、自動ポートフォワード機能がないことを意味する。   Further, “1” in the automatic port forward function column means that there is an automatic port forward function, and “0” in the automatic port forward function column means that there is no automatic port forward function.

つまり、図15では、ISP−NAT装置403は自動ポートフォワード機能を有さないことが示されている。また、図15では、判定対象NAT装置_Xは、自動ポートフォワード機能を有さず、協力NAT装置_Yおよび協力NAT装置_Zは、自動ポートフォワード機能を有することが示されている。   That is, FIG. 15 shows that the ISP-NAT device 403 does not have an automatic port forward function. Further, FIG. 15 shows that the determination target NAT device_X does not have an automatic port forward function, and the cooperative NAT device_Y and the cooperative NAT device_Z have an automatic port forward function.

なお、これら各NAT装置と、自動ポートフォワード機能の有無との対応は一例である。本実施の形態では、自動ポートフォワード機能を有するNAT装置が、協力NAT装置として選択されればよい。   The correspondence between each NAT device and the presence or absence of the automatic port forward function is an example. In the present embodiment, a NAT device having an automatic port forward function may be selected as a cooperative NAT device.

図16は、実施の形態1における依頼端末がNAT種別判定依頼を送信してからNAT種別の判定結果を受信するまでの通信シーケンスの一例を示す図である。   FIG. 16 is a diagram illustrating an example of a communication sequence from when a request terminal according to the first embodiment transmits a NAT type determination request to when a NAT type determination result is received.

図16のS251では、依頼端末であるCE_Xは、外部サーバ401へ判定対象NAT装置_XのNAT種別の判定を依頼するNAT種別判定依頼を送信する。   In S251 of FIG. 16, CE_X that is the requesting terminal transmits a NAT type determination request that requests the external server 401 to determine the NAT type of the determination target NAT device_X.

外部サーバ401は、S252で当該NAT種別判定依頼を受信することで、協力端末選択処理S253の実行に移行する。   When the external server 401 receives the NAT type determination request in S252, the external server 401 proceeds to the execution of the cooperation terminal selection process S253.

処理S253では、NAT種別判定依頼を受信した外部サーバ401が、NAT情報管理部706に格納されているNAT情報を参照することで協力端末を選択する。   In the process S253, the external server 401 that has received the NAT type determination request selects a cooperation terminal by referring to the NAT information stored in the NAT information management unit 706.

本実施の形態では、このときの選択する基準は、以下の(1)および(2)である。   In the present embodiment, the criteria to be selected at this time are the following (1) and (2).

(1)判定対象NAT装置より、1段上位にある(インターネットに近い)NAT装置のLAN側IPアドレスと、選択対象の端末装置の直上のNAT装置の1段上位にあるNAT装置のLAN側IPアドレスとが同一であること。   (1) The LAN side IP address of the NAT device that is one level higher than the determination target NAT device (close to the Internet) and the LAN side IP of the NAT device that is one level higher than the NAT device immediately above the selected target terminal device The address is the same.

(2)選択対象の端末装置の直上のNAT装置が自動ポートフォワード機能に対応していること。   (2) The NAT device immediately above the terminal device to be selected supports the automatic port forward function.

当該選択対象の端末装置が、これら(1)および(2)の基準を満たす場合、当該端末装置は協力端末として選択される。   When the terminal device to be selected satisfies the criteria (1) and (2), the terminal device is selected as a cooperation terminal.

本例の場合、図13に示すように、判定対象NAT装置_Xの1段上位にあるISP−NAT装置403は、CE_YおよびCE_Zの直上のNAT装置404bおよびNAT装置404cの双方にとっての1段上位のNAT装置にも該当する。そのため、CE_YおよびCE_Zの双方は上記基準(1)を満たす。   In the case of this example, as shown in FIG. 13, the ISP-NAT device 403 that is one level higher than the determination target NAT device_X is one level higher for both the NAT device 404b and the NAT device 404c immediately above CE_Y and CE_Z. This also applies to the NAT device. Therefore, both CE_Y and CE_Z satisfy the above criterion (1).

また、NAT装置404bおよびNAT装置404cの双方は、図15に示すように自動ポートフォワード機能を有するため、CE_YおよびCE_Zの双方は上記基準(2)も満たす。   Further, since both the NAT device 404b and the NAT device 404c have an automatic port forward function as shown in FIG. 15, both CE_Y and CE_Z also satisfy the above criterion (2).

従って、CE_YおよびCE_Zの双方は外部サーバ401が備える協力端末選択部707により、協力端末として選択される。   Accordingly, both CE_Y and CE_Z are selected as cooperation terminals by the cooperation terminal selection unit 707 provided in the external server 401.

なお、本実施の形態では、協力端末として2台の端末装置を選択するが、協力端末としての基準を満たす端末装置が3台以上存在する場合、これらの中での2台の選択手法は任意の選択手法でよい。   In this embodiment, two terminal devices are selected as cooperation terminals. However, when there are three or more terminal devices that satisfy the criteria for cooperation terminals, the selection method of two of these is arbitrary. The selection method may be used.

S254では、上記S253が実行された後、外部サーバ401が選択した2台の協力端末(CE_Y、CE_Z)へ、判定協力依頼パケットが送信される。   In S254, after S253 is executed, the determination cooperation request packet is transmitted to the two cooperation terminals (CE_Y, CE_Z) selected by the external server 401.

S255cおよびS255bにおいて判定協力依頼パケットを受信した各端末装置(CE_Y、CE_Z)は、協力端末として、処理S256b、S256c、S257b、およびS257cを実行する。   Each terminal device (CE_Y, CE_Z) that has received the determination cooperation request packet in S255c and S255b executes processing S256b, S256c, S257b, and S257c as a cooperation terminal.

なお、判定協力依頼パケットを受信した端末装置が、外部サーバ401へ協力依頼を拒否する機能を当該端末装置に設けてもよい。この場合は、外部サーバ401が、NAT情報を参照することで協力端末を選択する処理を再度実行することになる。   The terminal device that has received the determination cooperation request packet may be provided with a function of rejecting the cooperation request to the external server 401 in the terminal device. In this case, the external server 401 executes again the process of selecting the cooperation terminal by referring to the NAT information.

S256bおよびS256cでは、協力端末であるCE_YおよびCE_Zが、それぞれの直上にある協力NAT装置へ、UPnPまたはNAT−PMP等の機能を用いて、任意の2つのポートに自動ポートフォワード命令を送信する。   In S256b and S256c, the cooperation terminals CE_Y and CE_Z transmit an automatic port forward command to any two ports, using a function such as UPnP or NAT-PMP, to each of the cooperation NAT devices directly above.

つまり、CE_Yは協力NAT装置_Yへ、CE_Zは協力NAT装置_Zへ、自動ポートフォワード命令を送信する。   That is, CE_Y transmits an automatic port forward command to the cooperative NAT device_Y and CE_Z transmits to the cooperative NAT device_Z.

自動ポートフォワード命令の実行後、CE_YおよびCE_Zは、S257bおよびS257cを実行する。   After execution of the automatic port forward instruction, CE_Y and CE_Z execute S257b and S257c.

以下、CE_Yは、協力NAT装置_Yへの自動ポートフォワード命令を、ポートpとポートqとに行い、CE_Zは、協力NAT装置_Zへの自動ポートフォワード命令をポートrとポートsとに行った場合を想定し、説明を行う。   Hereinafter, CE_Y issues an automatic port forward command to cooperative NAT device_Y to port p and port q, and CE_Z issues an automatic port forward command to cooperative NAT device_Z to port r and port s. Assuming that

S257bおよびS257cでは、2台の協力端末(CE_Y、CE_Z)が、それぞれS256bおよびS256cで設定したポート番号情報と、協力NAT装置のWAN側IPアドレス情報とを、ポート情報として外部サーバ401へ送信する。   In S257b and S257c, the two cooperating terminals (CE_Y, CE_Z) transmit the port number information set in S256b and S256c and the WAN side IP address information of the cooperating NAT device to the external server 401 as port information. .

外部サーバ401は、協力端末(CE_Y、CE_Z)からのポート情報を受信すると、S258で、受信したポート情報を依頼端末であるCE_Xへ送信する。   Upon receiving the port information from the cooperation terminals (CE_Y, CE_Z), the external server 401 transmits the received port information to the requesting terminal CE_X in S258.

また、2台の協力端末間、つまりCE_YとCE_Zとの間でも、外部サーバ401を経由して、互いのポート情報を交換する。   Further, the mutual port information is also exchanged between the two cooperating terminals, that is, between CE_Y and CE_Z, via the external server 401.

なお、S257bおよびS257cにおいて2台の協力端末から外部サーバ401へ送信されるポート情報には、各協力NAT装置のWAN側IPが含まれていなくてもよい。この場合、外部サーバ401は、各協力NAT装置のWAN側IPアドレスを、例えばNAT情報管理部706から取得して各ポート情報に付与し、依頼端末CE_Xに送信すればよい。   Note that the port information transmitted from the two cooperating terminals to the external server 401 in S257b and S257c may not include the WAN-side IP of each cooperating NAT device. In this case, the external server 401 may acquire the WAN-side IP address of each cooperative NAT device, for example, from the NAT information management unit 706, give it to each port information, and transmit it to the requesting terminal CE_X.

このように外部サーバ401から送信されたポート情報は、S259で依頼端末CE_Xに受信される。   In this way, the port information transmitted from the external server 401 is received by the request terminal CE_X in S259.

処理S260a〜S260cでは、依頼端末CE_Xと2台の協力端末CE_YおよびCE_Zとの間で、判定対象NAT装置_XのNAT種別の判定のための判定パケットが送受信される。   In the processes S260a to S260c, a determination packet for determining the NAT type of the determination target NAT device_X is transmitted and received between the requesting terminal CE_X and the two cooperating terminals CE_Y and CE_Z.

ここで、依頼端末CE_Xは、S259で、協力NAT装置_YのWAN側IPアドレス(192.168.0.3)、および、自動マッピングされた2つのポート番号情報(ポートpとポートq)、並びに、協力NAT装置_ZのWAN側IPアドレス(192.168.0.4)、および、自動マッピングされた2つのポート番号情報(ポートrとポートs)を得ている。   Here, the request terminal CE_X, in S259, the WAN side IP address (192.168.0.3) of the cooperative NAT device_Y, the two port number information (port p and port q) automatically mapped, and , The WAN side IP address (192.168.0.4) of the cooperative NAT device_Z, and two port number information (port r and port s) that are automatically mapped are obtained.

また、協力端末であるCE_YおよびCE_Zは、他方の直上のNAT装置のWAN側IPアドレスと、自動マッピングされた2つのポート番号情報を得ている。   Also, CE_Y and CE_Z, which are cooperating terminals, obtain the WAN side IP address of the NAT device immediately above the other and two port number information that are automatically mapped.

そのため、CE_X、CE_Y、およびCE_Zのそれぞれは、相互に通信が行える。
NAT種別判定のためのテストは、図17A〜図17Dに示す4つのテストを任意の順番で行うことで実行される。
Therefore, CE_X, CE_Y, and CE_Z can communicate with each other.
The test for determining the NAT type is executed by performing the four tests shown in FIGS. 17A to 17D in an arbitrary order.

図17Aに示すテストAは、図3Aに示す従来技術である、STUNを利用したNAT種別判定のテストIに相当する。   The test A shown in FIG. 17A corresponds to the NAT type determination test I using STUN, which is the prior art shown in FIG. 3A.

依頼端末CE_Xは、協力NAT装置_YのWAN側IPアドレス192.168.0.3とポートpとを宛先として判定パケットを送信する。判定パケットを受信した協力端末CE_Yは、判定対象NAT装置_XのWAN側IPアドレス192.168.0.2とポート番号とを得る。また、協力端末CE_Yは、得た判定対象NAT装置_XのWAN側IPアドレス192.168.0.2とポート番号とを宛先とし、送信元ポートをポートpに指定したパケットを返信する。つまり、協力端末CE_Yは判定パケットに対する応答パケットを送信する。   The request terminal CE_X transmits a determination packet with the WAN-side IP address 192.168.0.3 and the port p of the cooperative NAT device_Y as destinations. The cooperation terminal CE_Y that has received the determination packet obtains the WAN-side IP address 192.168.0.2 and the port number of the determination target NAT device_X. Also, the cooperation terminal CE_Y returns a packet in which the WAN-side IP address 192.168.0.2 and the port number of the obtained determination target NAT device_X are set as the destination and the transmission source port is specified as the port p. That is, the cooperation terminal CE_Y transmits a response packet to the determination packet.

依頼端末CE_Xは、判定パケットに対する応答パケットが送信された場合は当該応答パケットを受信し、受信した応答パケットに含まれる、判定対象NAT装置_XのWAN側IPアドレス192.168.0.2と、協力端末CE_Yへの判定パケットで用いられた、判定対象NAT装置_Xのポート番号とを得る。また、依頼端末CE_Xは、応答パケットを受信しない場合は、応答なしと判断する。   When a response packet to the determination packet is transmitted, the request terminal CE_X receives the response packet. The WAN address IP address 192.168.0.2 of the determination target NAT device_X included in the received response packet; The port number of the determination target NAT device_X used in the determination packet to the cooperation terminal CE_Y is obtained. Further, the request terminal CE_X determines that there is no response when it does not receive a response packet.

図17Bに示すテストA´は、図3Bに示す従来技術である、STUNを利用したNAT種別判定のテストI´に相当する。   The test A ′ shown in FIG. 17B corresponds to the NAT type determination test I ′ using STUN, which is the conventional technique shown in FIG. 3B.

依頼端末CE_Xは、協力NAT装置_ZのWAN側IPアドレス192.168.0.4とポートsとを宛先として判定パケットを送信する。   The request terminal CE_X transmits a determination packet with the WAN-side IP address 192.168.0.4 and the port s of the cooperative NAT device_Z as destinations.

判定パケットを受信した協力端末CE_Zは、判定対象NAT装置_XのWAN側IPアドレス192.168.0.2とポート番号とを得る。協力端末CE_Zは、得た判定対象NAT装置のWAN側IPアドレス192.168.0.2とポート番号とを宛先とし、送信元ポートをポートqに指定した応答パケットを返信する。   The cooperative terminal CE_Z that has received the determination packet obtains the WAN-side IP address 192.168.0.2 and the port number of the determination target NAT device_X. The cooperating terminal CE_Z returns a response packet in which the obtained WAN-side IP address 192.168.0.2 and port number of the determination target NAT device are set as destinations and the transmission source port is designated as port q.

依頼端末CE_Xは、応答パケットが返信された場合は、当該応答パケットを受信し、受信した応答パケットに含まれる、判定対象NAT装置_XのWAN側IPアドレス192.168.0.2と、協力端末CE_Zへの判定パケットで用いられた、判定対象NAT装置_Xのポート番号とを得る。また、依頼端末CE_Xは、応答パケットを受信しない場合は、応答なしと判断する。   When a response packet is returned, the request terminal CE_X receives the response packet, and the WAN-side IP address 192.168.0.2 of the determination target NAT device_X included in the received response packet and the cooperation terminal The port number of the determination target NAT device_X used in the determination packet to CE_Z is obtained. Further, the request terminal CE_X determines that there is no response when it does not receive a response packet.

図17Cに示すテストBは、図3Cに示す従来技術である、STUNを利用したNAT種別判定のテストIIに相当する。   Test B shown in FIG. 17C corresponds to NAT type determination test II using STUN, which is the prior art shown in FIG. 3C.

依頼端末CE_Xは、協力NAT装置_YのWAN側IPアドレス192.168.0.3とポートpとを宛先として判定パケットを送信する。   The request terminal CE_X transmits a determination packet with the WAN-side IP address 192.168.0.3 and the port p of the cooperative NAT device_Y as destinations.

判定パケットを受信した協力端末CE_Yは、判定対象NAT装置_XのWAN側IPアドレス192.168.0.2とポート番号とを得る。協力端末CE_Yの判定対象NAT情報通知部658は、そのIPアドレス情報とポート番号とを、協力端末CE_Zへ通知する。このときの協力端末間の通信で使用するポート番号は、上述のように協力端末間で交換されている。つまり、各協力端末は、この交換で得た、他方のポート番号のうちの任意のポート番号を協力端末間の通信に用いる。   The cooperation terminal CE_Y that has received the determination packet obtains the WAN-side IP address 192.168.0.2 and the port number of the determination target NAT device_X. The determination target NAT information notification unit 658 of the cooperation terminal CE_Y notifies the cooperation terminal CE_Z of the IP address information and the port number. The port number used for communication between the cooperative terminals at this time is exchanged between the cooperative terminals as described above. That is, each cooperation terminal uses an arbitrary port number of the other port numbers obtained by this exchange for communication between the cooperation terminals.

協力端末CE_Zは、協力端末CE_Yから得た判定対象NAT装置_XのWAN側IPアドレス192.168.0.2とポート番号とを宛先とし、送信元ポートをポートsに指定した応答パケットを返信する。   The cooperating terminal CE_Z returns a response packet in which the WAN-side IP address 192.168.0.2 and the port number of the determination target NAT device_X obtained from the cooperating terminal CE_Y are set as destinations and the transmission source port is designated as port s .

依頼端末CE_Xは、応答パケットが返信された場合は、当該応答パケットを受信し、返信がない場合は、応答なしと判断する。   The request terminal CE_X receives the response packet when a response packet is returned, and determines that there is no response when there is no response.

図17Dに示すテストCは、図3Dに示す従来技術である、STUNを利用したNAT種別判定のテストIIIに相当する。   The test C shown in FIG. 17D corresponds to the NAT type determination test III using STUN, which is the prior art shown in FIG. 3D.

依頼端末CE_Xは、協力NAT装置_YのWAN側IPアドレス192.168.0.3とポートpとを宛先として判定パケットを送信する。   The request terminal CE_X transmits a determination packet with the WAN-side IP address 192.168.0.3 and the port p of the cooperative NAT device_Y as destinations.

判定パケットを受信した協力端末CE_Yは、判定対象NAT装置_XのWAN側IPアドレス192.168.0.2とポート情報を得る。協力端末CE_Yは、得た判定対象NAT装置_XのWAN側IPアドレス192.168.0.2とポート番号とを宛先とし、送信元ポートをポートqに指定した応答パケットを返信する。   The cooperative terminal CE_Y that has received the determination packet obtains the WAN-side IP address 192.168.0.2 and port information of the determination target NAT device_X. The cooperating terminal CE_Y returns a response packet in which the WAN-side IP address 192.168.0.2 and the port number of the obtained determination target NAT device_X are set as the destination and the transmission source port is specified as the port q.

依頼端末CE_Xは、応答パケットが返信された場合は、受信をし、返信がない場合は、応答なしと判断する。   The requesting terminal CE_X receives when a response packet is returned, and determines that there is no response when there is no response.

次に、図16に示すS261a〜S261cにおいて、上記S260a〜S260cで得た、テストA〜CおよびA´それぞれの結果を示す判定情報を、依頼端末CE_Xと協力端末CE_Yおよび協力端末CE_Zが、外部サーバ401へ送信する。   Next, in S261a to S261c shown in FIG. 16, the request terminal CE_X, the cooperation terminal CE_Y, and the cooperation terminal CE_Z obtain the determination information indicating the results of the tests A to C and A ′ obtained in the above S260a to S260c. Send to server 401.

なお、判定情報には、例えば協力端末が依頼端末から受信した判定パケットに含まれるIPアドレスおよびポート番号を示す情報、または、依頼端末が協力端末から応答パケットを受信したか否かを示す情報等が含まれる。   The determination information includes, for example, information indicating the IP address and port number included in the determination packet received by the cooperation terminal from the request terminal, or information indicating whether the request terminal has received a response packet from the cooperation terminal, or the like. Is included.

外部サーバ401は、S262で判定情報を受信することで、S263においてNAT種別の判定処理を実行する。   The external server 401 receives the determination information in S262, and executes NAT type determination processing in S263.

なお、処理S262およびS263において、判定情報を受信しNAT種別の判定処理を実行する装置は、外部サーバ401でなくてもよい。依頼端末、協力端末、またはその他装置であっても、当該装置がNAT種別判定機能を有していれば、当該装置が判定情報を受信しNAT種別の判定処理を実行してもよい。   In steps S262 and S263, the apparatus that receives the determination information and executes the NAT type determination process may not be the external server 401. Even if it is a request terminal, a cooperation terminal, or another apparatus, if the apparatus has a NAT type determination function, the apparatus may receive determination information and execute a NAT type determination process.

本実施の形態では、S262で外部サーバ401が受信した判定情報を用いて、外部サーバ401が備えるNAT種別判定部708が、判定対象NAT装置_XのNAT種別を判定する(S263)。NAT種別の判定フローを図18に示す。   In the present embodiment, using the determination information received by the external server 401 in S262, the NAT type determination unit 708 provided in the external server 401 determines the NAT type of the determination target NAT device_X (S263). FIG. 18 shows a NAT type determination flow.

まず、NAT種別判定部708は、テストAの結果、応答があったか否かを判定し(S301)、応答がなかった場合(S301でN)、「(1)UDPをブロックするファイアウォールが存在している」と判定する。   First, the NAT type determination unit 708 determines whether there is a response as a result of the test A (S301). If there is no response (N in S301), “(1) there is a firewall that blocks UDP. Is determined.

一方、応答が受信された場合(S301でY)、NAT種別判定部708は、協力端末CE_Yの受信した判定パケットの送信元IPアドレスが、依頼端末CE_XのIPアドレスと同一か否かを判定する(S302)。   On the other hand, if a response is received (Y in S301), the NAT type determination unit 708 determines whether or not the transmission source IP address of the determination packet received by the cooperation terminal CE_Y is the same as the IP address of the request terminal CE_X. (S302).

この判定の結果、これらIPアドレスが同一の場合(S302でY)、NAT種別判定部708は、判定対象NAT装置_Xが、実際にはNAT機能を有していないと判断し、さらにテストBの結果判定を実行する(S303)。   As a result of this determination, if these IP addresses are the same (Y in S302), the NAT type determination unit 708 determines that the determination target NAT device_X does not actually have the NAT function, and further performs the test B. Result determination is executed (S303).

具体的には、NAT種別判定部708は、テストBの結果から、依頼端末CE_Xが協力端末CE_Zからの応答を受信したか否かを判定する(S303)。応答がなかった場合(S303でN)、NAT種別判定部708は、「(2)アドレス変換をしないが、対称型NAT装置のようにUDPをブロックするファイアウォールが存在している」と判定する。一方、依頼端末CE_Xが協力端末CE_Zからの応答を受信した場合(S303でY)、NAT種別判定部708は、「(3)NAT機能なし」と判定する。   Specifically, the NAT type determination unit 708 determines whether the request terminal CE_X has received a response from the cooperation terminal CE_Z from the result of the test B (S303). When there is no response (N in S303), the NAT type determination unit 708 determines that “(2) There is a firewall that blocks UDP but does not perform address conversion, like a symmetric NAT device”. On the other hand, when the request terminal CE_X receives a response from the cooperation terminal CE_Z (Y in S303), the NAT type determination unit 708 determines that “(3) no NAT function”.

また、S302において、協力端末CE_Yが受信した判定パケットの送信元IPアドレスが、依頼端末CE_XのIPアドレスと同一でない(依頼端末CE_XがNAT装置の配下にある)場合(S302でN)、テストBで、協力端末CE_Zからの応答があったか否かを判定する(S304)。そこで、応答があった場合(S304でY)、NAT種別判定部708は、NAT種別を「(4)完全コーン型(Full Cone)」であると判定する。   In S302, if the source IP address of the determination packet received by the cooperation terminal CE_Y is not the same as the IP address of the request terminal CE_X (the request terminal CE_X is under the NAT device) (N in S302), test B Then, it is determined whether or not there is a response from the cooperation terminal CE_Z (S304). Therefore, when there is a response (Y in S304), the NAT type determination unit 708 determines that the NAT type is “(4) Full cone type”.

一方、応答がなかった場合(S304でN)、続いて、テストAの結果から得られる、協力端末CE_Yが受信した判定パケットの送信元IPアドレスおよびポート番号と、テストA´の結果から得られる、協力端末CE_Zが受信した判定パケットの送信元IPアドレスおよびポート番号が同一か否かを判定する(S305)。   On the other hand, when there is no response (N in S304), the source IP address and port number of the determination packet received by the cooperative terminal CE_Y obtained from the result of the test A and the result of the test A ′ are obtained. Then, it is determined whether or not the transmission source IP address and the port number of the determination packet received by the cooperative terminal CE_Z are the same (S305).

そこで、これら2組のIPアドレスおよびポート番号が同一でない場合(S305でN)、NAT種別判定部708は、NAT種別を「(5)対称型(Symmetric)」であると判定する。   Therefore, if these two sets of IP addresses and port numbers are not the same (N in S305), the NAT type determination unit 708 determines that the NAT type is “(5) Symmetric”.

一方、S305において、これら2組のIPアドレスとポート番号との組み合わせが同一である場合(S305でY)、続いて、テストCの結果から、協力端末CE_Yからの応答があったか否かを判定する(S306)。応答があった場合(S306でY)には、送信パケットの宛先ポート番号および受信パケットの送信元ポート番号が、互いに異なるポート番号であっても、送信パケットの送信元IPアドレスと、受信パケットの宛先IPアドレスとが同一であれば応答が返ってくることを意味する。そこで、NAT種別判定部708は、NAT種別を「(6)制限付きコーン型(Restricted Cone)」であると判定する。   On the other hand, if the combination of these two sets of IP addresses and port numbers is the same in S305 (Y in S305), it is subsequently determined from the result of test C whether there is a response from the cooperating terminal CE_Y. (S306). When there is a response (Y in S306), even if the destination port number of the transmission packet and the transmission source port number of the reception packet are different from each other, the transmission source IP address and the reception packet If the destination IP address is the same, it means that a response is returned. Therefore, the NAT type determination unit 708 determines that the NAT type is “(6) Restricted Cone type”.

一方、応答がなかった場合(S306でN)、上記2つのIPアドレスが同一であっても、上記2つのポート番号が互いに異なる場合には応答が返ってこないことから、NAT種別判定部708は、NAT種別を「(7)ポート制限付きコーン型(Port Restricted Cone)」であると判定する。   On the other hand, if there is no response (N in S 306), even if the two IP addresses are the same, if the two port numbers are different from each other, no response is returned. The NAT type is determined to be “(7) Port Restricted Cone”.

次に、図16に示すS264において、外部サーバ401は、上記のS263で得られた、判定対象NAT装置_XのNAT種別についての判定結果を、依頼端末CE_Xに送信する。依頼端末CE_Xは、S265において当該判定結果を受信する。   Next, in S264 shown in FIG. 16, the external server 401 transmits the determination result regarding the NAT type of the determination target NAT device_X obtained in S263 to the request terminal CE_X. The request terminal CE_X receives the determination result in S265.

以上説明したように、本実施の形態における通信システム400では、2段NAT環境における、下段NAT装置のNAT種別を個別に判定することが可能となる。   As described above, in the communication system 400 according to the present embodiment, it is possible to individually determine the NAT type of the lower NAT device in the two-stage NAT environment.

また、下段NAT装置のNAT種別を判定することで、上段NAT装置(本実施の形態ではISP−NAT装置403)のNAT種別を判定することも可能である。   It is also possible to determine the NAT type of the upper NAT device (the ISP-NAT device 403 in this embodiment) by determining the NAT type of the lower NAT device.

一例として、図19に、2段のNAT環境で、下段のNAT装置404aのNAT種別の判定結果(以下、「下段NAT種別」と記載する)が完全コーン型であり、2段(ISP−NAT装置403とNAT装置404a)のNAT種別を統合した種別判定の結果(以下、「統合NAT種別」と記載する)が対称型である場合の例を示す。   As an example, in FIG. 19, in a two-stage NAT environment, the NAT type determination result (hereinafter referred to as “lower NAT type”) of the lower NAT device 404a is a perfect cone type, and two stages (ISP-NAT). An example in which the type determination result obtained by integrating the NAT types of the device 403 and the NAT device 404a (hereinafter referred to as “integrated NAT type”) is a symmetric type is shown.

ここで、例えばSTUNサーバを利用して、多段のNAT装置についての統合NAT種別を求める場合、当該多段のNAT装置それぞれのNAT種別の中の最も制限が厳しいNAT種別が、統合NAT種別として得られるという性質がある。   Here, for example, when obtaining an integrated NAT type for a multi-stage NAT device using a STUN server, the NAT type with the most severe restriction among the NAT types of the multi-stage NAT devices is obtained as the integrated NAT type. It has the nature of

従って、図19に示す例の場合、統合NAT種別(対称型)の方が下段NAT種別(完全コーン型)より制限が厳しいため、端末装置405aは、上段のISP−NAT装置403のNAT種別は、統合NAT種別と等しいと推定できる。つまり、端末装置405aは、具体的にはISP−NAT装置403のNAT種別は対称型であると断定できる。   Accordingly, in the example shown in FIG. 19, the integrated NAT type (symmetric type) is more restrictive than the lower NAT type (complete cone type), and therefore the terminal device 405a has the NAT type of the upper ISP-NAT device 403 as It can be estimated that it is equal to the integrated NAT type. That is, the terminal device 405a can specifically determine that the NAT type of the ISP-NAT device 403 is symmetric.

また、上段NAT装置の制限が、下段NAT装置の制限より易しく、上段NAT装置のNAT種別が推定できない場合を想定する。   Further, it is assumed that the restriction of the upper NAT device is easier than the restriction of the lower NAT device, and the NAT type of the upper NAT device cannot be estimated.

この場合でも、当該上段NAT装置の配下にいる複数の端末装置が取得したそれぞれのNAT種別の判定結果を集計することにより、当該上段NAT装置のNAT種別を推定することができる。   Even in this case, it is possible to estimate the NAT type of the upper NAT device by totaling the determination results of the NAT types acquired by the plurality of terminal devices under the upper NAT device.

一例として、図20に、上段NAT装置の制限が下段NAT装置の制限より易しい場合の通信システムを示す。   As an example, FIG. 20 shows a communication system in which the upper NAT device is easier to limit than the lower NAT device.

具体的には、図20では、上段のISP−NAT装置403のNAT種別が完全コーン型であり、2つ存在する下段のNAT装置(404a、404b)のうち、NAT装置404aのNAT種別が制限付きコーン型であり、NAT装置404bのNAT種別が完全コーン型である場合が示されている。   Specifically, in FIG. 20, the NAT type of the upper ISP-NA device 403 is a complete cone type, and the NAT type of the NAT device 404a is limited among the two lower NAT devices (404a, 404b). A case in which the NAT type of the NAT device 404b is a complete cone type is shown.

図20に示す例において、NAT装置404aおよびISP−NAT装置403についての下段NAT種別(制限付きコーン型)は、上段のISP−NAT装置403のNAT種別(完全コーン型)よりも制限が厳しい。   In the example shown in FIG. 20, the lower NAT type (limited cone type) for the NAT device 404 a and the ISP-NAT device 403 is more restrictive than the NAT type (complete cone type) of the upper ISP-NAT device 403.

そのため、NAT装置404aの配下の端末装置405aは、これら2段のNAT装置についての統合NAT種別を取得したとしても、当該統合NAT種別は、下段NAT種別と同一の種別(制限付きコーン型)である。従って、端末装置405aは、上段のISP−NAT装置403のNAT種別を推定することはできない。   Therefore, even if the terminal device 405a under the NAT device 404a acquires the integrated NAT type for these two-stage NAT devices, the integrated NAT type is the same type (restricted cone type) as the lower NAT type. is there. Therefore, the terminal device 405a cannot estimate the NAT type of the upper ISP-NAT device 403.

しかし、端末装置405aと同一の上段NAT装置の配下にある端末装置405bが本発明を用いることにより、端末装置405aは、上段のISP−NAT装置403のNAT種別を取得することができる。   However, when the terminal device 405b under the same upper NAT device as the terminal device 405a uses the present invention, the terminal device 405a can acquire the NAT type of the upper ISP-NAT device 403.

具体的には、まず、端末装置405bは、本実施の形態における依頼端末として動作することで、直上のNAT装置404bのNAT種別が完全コーン型であることを取得する。また、端末装置405bは、例えばSTUNサーバを用いた方法により、NAT装置404bおよびISP−NAT装置403についての統合NAT種別が完全コーン型であることを取得する。   Specifically, first, the terminal device 405b operates as a request terminal in the present embodiment, thereby acquiring that the NAT type of the NAT device 404b directly above is a complete cone type. In addition, the terminal device 405b acquires that the integrated NAT type for the NAT device 404b and the ISP-NAT device 403 is a complete cone type by a method using a STUN server, for example.

この場合、下段NAT種別が完全コーン型であり、かつ、統合NAT種別も同じく完全コーン型であることから、端末装置405bは、上段のISP−NAT装置403のNAT種別が完全コーン型であると判断することができる。   In this case, since the lower NAT type is a complete cone type and the integrated NAT type is also a complete cone type, the terminal device 405b determines that the NAT type of the upper ISP-NAT device 403 is a complete cone type. Judgment can be made.

端末装置405bは、この判断結果を示す情報を、例えば外部サーバ401が備えるNAT情報管理部706に登録する。これにより、端末装置405aは、上段のISP−NAT装置403のNAT種別が完全コーン型であることを、外部サーバ401から取得することができる。   The terminal device 405b registers information indicating the determination result in, for example, the NAT information management unit 706 provided in the external server 401. Accordingly, the terminal device 405a can acquire from the external server 401 that the NAT type of the upper ISP-NAT device 403 is a complete cone type.

(実施の形態2)
実施の形態2では、判定対象NAT装置のNAT種別の判定を行う場合に、協力端末としての基準を満たす端末装置が1台のみ存在する時に有効な構成の一例を示す。
(Embodiment 2)
In the second embodiment, an example of a configuration effective when there is only one terminal device that satisfies the criteria as a cooperation terminal when determining the NAT type of the determination target NAT device is shown.

まず、実施の形態2における通信システムの構成を説明する。
図21は、実施の形態2における通信システム900の構成の一例を示す図である。
First, the configuration of the communication system in the second embodiment will be described.
FIG. 21 is a diagram illustrating an example of a configuration of the communication system 900 according to the second embodiment.

実施の形態2における通信システム900は、本発明の通信システムの別の一例である。   A communication system 900 according to Embodiment 2 is another example of the communication system of the present invention.

通信システム900は、図21に示すように、通信回線を介してインターネット402に接続された外部サーバ901、ISPレベルで設置されているISP−NAT装置902、NAT装置903aおよび903b、並びに、端末装置904aおよび904bを備える。   As shown in FIG. 21, the communication system 900 includes an external server 901 connected to the Internet 402 via a communication line, an ISP-NAT device 902 installed at the ISP level, NAT devices 903a and 903b, and a terminal device. 904a and 904b.

インターネット402は、実施の形態1と同じく、例えば光回線、CATV、または電話回線等で構成された有線回線、もしくは、無線回線を用いて構成された公衆通信ネットワーク、または、専用通信ネットワークである。インターネット402に接続された端末装置間で所定の通信プロトコルに従ってデータのやり取りを行うことが可能である。   As in the first embodiment, the Internet 402 is a public communication network or a dedicated communication network configured by using, for example, a wired line constituted by an optical line, CATV, a telephone line, or the like, or a wireless line. Data can be exchanged between terminal devices connected to the Internet 402 according to a predetermined communication protocol.

外部サーバ901、並びに、端末装置904aおよび904bのそれぞれが備える、ハードウェア構成および機能ブロックは、実施の形態1と同様(図8〜図11参照)であるため、これらの図示および説明は省略する。   The hardware configuration and functional blocks provided in the external server 901 and the terminal devices 904a and 904b are the same as those in the first embodiment (see FIGS. 8 to 11), and thus illustration and description thereof are omitted. .

つまり、端末装置904aおよび904bのそれぞれは、依頼端末および協力端末として機能することができる。また、外部サーバ901は、協力端末から送信されたポート情報を依頼端末に転送する機能など、実施の形態1における外部サーバ401と同じ機能を備えている。   That is, each of the terminal devices 904a and 904b can function as a request terminal and a cooperation terminal. Further, the external server 901 has the same functions as the external server 401 in the first embodiment, such as a function of transferring port information transmitted from the cooperation terminal to the requesting terminal.

また、端末装置904aおよび904b、並びに、外部サーバ901のそれぞれも、実施の形態1における端末装置405a等と同じく、集積回路によって実現することができる。   Further, each of the terminal devices 904a and 904b and the external server 901 can also be realized by an integrated circuit, like the terminal device 405a and the like in the first embodiment.

また、ISP−NAT装置902、並びにNAT装置903aおよび903bも、実施の形態1におけるISP−NAT装置403およびNAT装置404a等と同じく、NAT機能を持つルータである。   The ISP-NAT device 902 and the NAT devices 903a and 903b are also routers having a NAT function, similar to the ISP-NAT device 403 and the NAT device 404a in the first embodiment.

ここで、図22に示す環境を例に、通信システム900が備える各装置の処理の流れを説明する。   Here, the flow of processing of each device included in the communication system 900 will be described using the environment illustrated in FIG. 22 as an example.

図22に示すように各装置に1つまたは2つのIPアドレスが割り当てられている環境を想定する。   Assume an environment in which one or two IP addresses are assigned to each device as shown in FIG.

また、端末装置904aであるCE_Xが、依頼端末として判定NAT種別判定依頼パケットを送信する場合を想定し、以下の説明を行う。また、NAT装置903bは自動ポートフォワード機能を有し、協力NAT装置として動作する場合を想定する。つまり、この場合、端末装置904b(CE_Y)は、協力端末として動作する。   Further, assuming that CE_X that is the terminal device 904a transmits a determination NAT type determination request packet as a request terminal, the following description will be given. Further, it is assumed that the NAT device 903b has an automatic port forward function and operates as a cooperative NAT device. That is, in this case, the terminal device 904b (CE_Y) operates as a cooperation terminal.

なお、端末装置904aは、図9に示す、依頼端末として動作するための機能構成を有しており、端末装置904bは、図10に示す、協力端末として動作するための機能構成を有している。また、外部サーバ901は、図11に示す機能構成を有している。   The terminal device 904a has a functional configuration for operating as a requesting terminal shown in FIG. 9, and the terminal device 904b has a functional configuration for operating as a cooperation terminal shown in FIG. Yes. The external server 901 has a functional configuration shown in FIG.

また、実施の形態2における通信システム900においても、実施の形態1と同じく、各端末装置から外部サーバ901へのNAT情報の登録が行われる。しかし、この登録に係る処理フローは、実施の形態1の図14に示される処理フローと同様であるため、図示および説明を省略する。   Also, in the communication system 900 according to the second embodiment, as in the first embodiment, registration of NAT information from each terminal device to the external server 901 is performed. However, since the processing flow related to this registration is the same as the processing flow shown in FIG. 14 of the first embodiment, illustration and description thereof are omitted.

図23は、実施の形態2における依頼端末がNAT種別判定依頼を送信してからNAT種別の判定結果を受信するまでの通信シーケンスの一例を示す図である。   FIG. 23 is a diagram illustrating an example of a communication sequence from when a request terminal according to the second embodiment transmits a NAT type determination request to when a NAT type determination result is received.

図23のS351では、依頼端末であるCE_Xは、外部サーバ901へ、NAT装置903a(判定対象NAT装置_X)のNAT種別の判定を依頼するNAT種別判定依頼を送信する。   In S351 in FIG. 23, CE_X, which is the requesting terminal, transmits a NAT type determination request for requesting determination of the NAT type of the NAT device 903a (determination target NAT device_X) to the external server 901.

外部サーバ901は、S352で当該NAT種別判定依頼を受信することで、協力端末選択処理S353の実行に移行する。   The external server 901 receives the NAT type determination request in S352, and shifts to the execution of the cooperation terminal selection process S353.

処理S353では、NAT種別判定依頼を受信した外部サーバ901が、外部サーバ901が備えるNAT情報管理部706に格納されているNAT情報を参照することで、協力端末を1台選択する。   In the process S353, the external server 901 that has received the NAT type determination request selects one cooperation terminal by referring to the NAT information stored in the NAT information management unit 706 provided in the external server 901.

このときの選択する基準は、実施の形態1と同様である。本例においては、CE_Yのみが、基準を満たしており、CE_Yのみが協力端末として選択される。   The criteria to be selected at this time are the same as those in the first embodiment. In this example, only CE_Y satisfies the criteria, and only CE_Y is selected as the cooperation terminal.

S354では、上記S353が実行された後、外部サーバ901が選択した協力端末CE_Yへ、判定協力依頼パケットが送信される。   In S354, after S353 is executed, a determination cooperation request packet is transmitted to the cooperation terminal CE_Y selected by the external server 901.

S355で判定協力依頼パケットを受信した端末装置CE_Yは、協力端末として、S356およびS357を実行する。   The terminal device CE_Y that has received the determination cooperation request packet in S355 executes S356 and S357 as a cooperation terminal.

S356では、協力端末であるCE_Yが、直上にあるNAT装置903b(協力NAT装置_Y)に、UPnPまたはNAT−PMP等の機能を用いて、任意の2つのポートに自動ポートフォワード命令を送信する。協力端末CE_Yは、自動ポートフォワード命令の実行後、S357を実行する。   In S356, the cooperation terminal CE_Y transmits an automatic port forward command to any two ports using a function such as UPnP or NAT-PMP to the NAT device 903b (cooperation NAT device_Y) directly above. The cooperation terminal CE_Y executes S357 after executing the automatic port forward command.

以下、協力端末CE_Yは、協力NAT装置_Yへの自動ポートフォワード命令を、ポートpとポートqとに行った場合を想定し、説明を行う。   Hereinafter, the cooperation terminal CE_Y will be described assuming that an automatic port forward command to the cooperation NAT device_Y is issued to the port p and the port q.

S357では、協力端末CE_Yが、上記S356で設定したポート番号情報と協力NAT装置_YのWAN側IPアドレス情報とを、ポート情報として外部サーバ901へ送信する。   In S357, the cooperation terminal CE_Y transmits the port number information set in S356 and the WAN side IP address information of the cooperation NAT device_Y to the external server 901 as port information.

外部サーバ901は、協力端末CE_Yからのポート情報を受信すると、S358で、受信したポート情報を、依頼端末であるCE_Xへ送信する。   When receiving the port information from the cooperation terminal CE_Y, the external server 901 transmits the received port information to the requesting terminal CE_X in S358.

なお。S357で協力端末CE_Yから外部サーバ901へ送信されるポート情報には、協力NAT装置_YのWAN側IPが含まれていなくてもよい。この場合、外部サーバ901は、協力NAT装置_YのWAN側IPアドレスを、例えばNAT情報管理部706から取得して当該ポート情報に付与し、依頼端末CE_Xに送信すればよい。   Note that. The port information transmitted from the cooperation terminal CE_Y to the external server 901 in S357 may not include the WAN side IP of the cooperation NAT device_Y. In this case, the external server 901 may acquire the WAN-side IP address of the cooperative NAT device_Y from, for example, the NAT information management unit 706, give it to the port information, and transmit it to the requesting terminal CE_X.

処理S360aおよびS360bでは、依頼端末CE_Xと協力端末CE_Yとの間で、判定対象NAT装置_Xの種別判定のための判定パケットが送受信される。   In the processes S360a and S360b, a determination packet for determining the type of the determination target NAT device_X is transmitted and received between the requesting terminal CE_X and the cooperation terminal CE_Y.

依頼端末CE_Xは、上記S357、S358、およびS359により、協力NAT装置_YのWAN側IPアドレス(192.168.0.3)と自動マッピングされた2つのポート情報(ポートpとポートq)とを得ている。そのため、依頼端末CE_Xと協力端末CE_Yとは相互に通信が行える。   The request terminal CE_X obtains the WAN side IP address (192.168.0.3) of the cooperative NAT device_Y and the two port information (port p and port q) automatically mapped by the above S357, S358, and S359. It has gained. Therefore, the request terminal CE_X and the cooperation terminal CE_Y can communicate with each other.

判定パケットの送受信によって行われるテストは、図17Aおよび図17Dに示す2つのテスト(テストAおよびテストC)を、任意の順番で行うことで実行される。なお、テストAおよびテストCの詳細は実施の形態1と同様であるためここでの説明は省略する。   The test performed by transmission / reception of the determination packet is executed by performing two tests (test A and test C) illustrated in FIGS. 17A and 17D in an arbitrary order. Note that the details of the test A and the test C are the same as those in the first embodiment, and thus the description thereof is omitted here.

S361aおよびS361bでは、上記S360aおよびS360bで得られた、テストAおよびテストCの結果示す判定情報を、依頼端末CE_Xと協力端末CE_Yとが、外部サーバ901へ送信する。   In S361a and S361b, the request terminal CE_X and the cooperation terminal CE_Y transmit the determination information obtained as a result of the test A and the test C obtained in S360a and S360b to the external server 901.

外部サーバ901は、S362で判定情報を受信することで、S363においてNAT種別の判定を実行する。   The external server 901 receives the determination information in S362, and executes NAT type determination in S363.

なお、S362およびS363において、判定情報を受信しNAT種別の判定処理を実行する装置は、外部サーバ901でなくてもよい。依頼端末、協力端末、またはその他装置であっても、当該装置がNAT種別判定機能を有していれば、当該装置が判定情報を受信しNAT種別の判定処理を実行してもよい。   In S362 and S363, the device that receives the determination information and executes the NAT type determination process may not be the external server 901. Even if it is a request terminal, a cooperation terminal, or another apparatus, if the apparatus has a NAT type determination function, the apparatus may receive determination information and execute a NAT type determination process.

S363では、S362で外部サーバ901が受信した判定情報を用いて、外部サーバ901のNAT種別判定部708が、判定対象NAT装置_XのNAT種別を判定する。NAT種別の判定フローを図24に示す。   In S363, using the determination information received by the external server 901 in S362, the NAT type determining unit 708 of the external server 901 determines the NAT type of the determination target NAT device_X. FIG. 24 shows a NAT type determination flow.

まず、NAT種別判定部708は、テストAの結果、応答があったか否かを判定し(S401)、応答がなかった場合(S401でN)、「(1)UDPをブロックするファイアウォールが存在している」と判定する。   First, the NAT type determination unit 708 determines whether or not there is a response as a result of the test A (S401). If there is no response (N in S401), “(1) there is a firewall that blocks UDP. Is determined.

一方、応答が受信された場合(S401でY)、NAT種別判定部708は、協力端末CE_Yの受信した判定パケットの送信元IPアドレスが、依頼端末CE_XのIPアドレスと同一か否かを判定する(S402)。   On the other hand, if a response is received (Y in S401), the NAT type determination unit 708 determines whether or not the transmission source IP address of the determination packet received by the cooperation terminal CE_Y is the same as the IP address of the requesting terminal CE_X. (S402).

この判定の結果、これらIPアドレスが同一の場合(S402でY)、NAT種別判定部708は、判定対象NAT装置_Xが、実際はNAT機能を有していないと判断し、「(2)アドレス変換をしないが、対称型NAT装置のようにUDPをブロックするファイアウォールが存在している」、または、「(3)NAT機能なし」であると判定する。   As a result of the determination, if these IP addresses are the same (Y in S402), the NAT type determination unit 708 determines that the determination target NAT device_X does not actually have the NAT function, and “(2) Address conversion” However, it is determined that there is a firewall that blocks UDP like a symmetric NAT device ”or“ (3) No NAT function ”.

一方、S402において、協力端末CE_Yの受信した判定パケットの送信元IPアドレスが、依頼端末CE_XのIPアドレスと同一でない(依頼端末CE_XがNAT装置配下にある)場合(S402でN)、NAT種別判定部708は、続いて、テストCの結果から、協力端末CE_Yからの応答があったか否かを判定する(S403)。   On the other hand, if the source IP address of the determination packet received by the cooperation terminal CE_Y is not the same as the IP address of the request terminal CE_X in S402 (the request terminal CE_X is under the NAT device) (N in S402), the NAT type determination Subsequently, the unit 708 determines from the result of the test C whether or not there is a response from the cooperation terminal CE_Y (S403).

この判定の結果、応答があった場合(S403でY)、NAT種別判定部708は、NAT種別を、「(4)完全 コーン型(Full Cone)」、または、「(6)制限付きコーン型(Restricted Cone)」であると判定する。   If there is a response as a result of this determination (Y in S403), the NAT type determination unit 708 sets the NAT type to “(4) Full cone type” or “(6) Restricted cone type”. (Restricted Cone) ”.

一方、応答がなかった場合(S403でN)、NAT種別判定部708は、NAT種別を、「(5)対称型(Symmetric)」、もしくは「(7)ポート制限付きコーン型(Port Restricted Cone)」であると判定する。   On the other hand, when there is no response (N in S403), the NAT type determination unit 708 sets the NAT type to “(5) Symmetric” or “(7) Cone type with port restriction (Port Restricted Cone)”. Is determined.

次に、図23に示すS364では、外部サーバ901は、上記のS363で得られた判定対象NAT装置_XのNAT種別についての判定結果を、依頼端末CE_Xに送信する。依頼端末CE_Xは、S365で当該判定結果を受信する。   Next, in S364 illustrated in FIG. 23, the external server 901 transmits the determination result regarding the NAT type of the determination target NAT device_X obtained in S363 to the request terminal CE_X. The request terminal CE_X receives the determination result in S365.

以上説明したように、実施の形態2における通信システム900によれば、2段NAT環境において、NAT種別の判定の協力に適した端末装置が1台のみである場合であっても、下段NAT装置のNAT種別の範囲を絞り込むことが可能となる。   As described above, according to the communication system 900 according to the second embodiment, even if there is only one terminal device suitable for NAT type determination cooperation in the two-stage NAT environment, the lower-stage NAT apparatus. It is possible to narrow the range of the NAT type.

以上、本発明の通信装置、サーバ装置、通信システム、通信方法、および集積回路について、実施の形態1および2に基づいて説明した。しかしながら、本発明は、これらの実施の形態に限定されるものではない。本発明の趣旨を逸脱しない限り、当業者が思いつく各種変形を本実施の形態に施したものも、あるいは、上記説明された複数の構成要素を組み合わせて構築される形態も、本発明の範囲内に含まれる。   The communication device, server device, communication system, communication method, and integrated circuit of the present invention have been described based on the first and second embodiments. However, the present invention is not limited to these embodiments. Unless it deviates from the gist of the present invention, various modifications conceived by those skilled in the art have been made in the present embodiment, or forms constructed by combining a plurality of the above-described constituent elements are within the scope of the present invention. include.

例えば、上述のように、NAT種別を判定する機能は、外部サーバ401(901)ではなく、例えば端末装置405a等の端末装置が備えてもよい。   For example, as described above, the function of determining the NAT type may be provided not in the external server 401 (901) but in a terminal device such as the terminal device 405a.

図25は、実施の形態1または2における端末装置がNAT種別判定機能を備える場合の機能ブロックの一例を示す図である。   FIG. 25 is a diagram illustrating an example of functional blocks when the terminal device according to the first or second embodiment has a NAT type determination function.

図25に示す端末装置405aは、依頼端末として機能する装置であり、基本的な機能構成は、図9に示す機能構成と同じである。   A terminal device 405a illustrated in FIG. 25 is a device that functions as a request terminal, and a basic functional configuration is the same as the functional configuration illustrated in FIG.

しかし、図25に示す端末装置405aは、判定結果取得部610bを備え、判定結果取得部610bは、判定情報受信部705とNAT種別判定部708とを有している。つまり、判定結果取得部610bは、図11に示す判定部710を有している。   However, the terminal device 405a illustrated in FIG. 25 includes a determination result acquisition unit 610b, and the determination result acquisition unit 610b includes a determination information reception unit 705 and a NAT type determination unit 708. That is, the determination result acquisition unit 610b includes a determination unit 710 illustrated in FIG.

判定情報受信部705およびNAT種別判定部708は、図11の説明等で述べたように、判定情報を受信し、受信した判定情報からNAT種別の判定を行う処理部である。   The determination information receiving unit 705 and the NAT type determining unit 708 are processing units that receive the determination information and determine the NAT type from the received determination information, as described in the explanation of FIG.

判定結果取得部610bが有する判定情報受信部705は、具体的には、協力端末(405bなど)から送信される判定情報を受信する。また、自端末の判定情報(判定パケットに対する応答があったか否かなど)は判定パケット送受信部604から取得する。   Specifically, the determination information receiving unit 705 included in the determination result acquisition unit 610b receives the determination information transmitted from the cooperation terminal (such as 405b). Further, the determination information of the terminal itself (whether there is a response to the determination packet or the like) is acquired from the determination packet transmission / reception unit 604.

判定結果取得部610bが有するNAT種別判定部708は、判定情報受信部705によって取得された協力端末および自端末からの判定情報を用いて、NAT種別の判定処理を実行する。これにより、依頼端末である端末装置405aは、判定対象NAT装置あるNAT装置404aのNAT種別を取得することができる。   The NAT type determination unit 708 included in the determination result acquisition unit 610b executes the NAT type determination process using the determination information from the cooperation terminal and the own terminal acquired by the determination information reception unit 705. As a result, the terminal device 405a that is the requesting terminal can acquire the NAT type of the NAT device 404a that is the determination target NAT device.

また、NAT種別判定部708による判定結果は、例えば外部サーバ401に登録されることで、他の端末装置が当該判定結果を利用することができる。   Further, the determination result by the NAT type determination unit 708 is registered in the external server 401, for example, so that other terminal devices can use the determination result.

本発明に係る通信装置等によれば、多段NAT環境下でも、各NAT装置のNAT種別を個別に判定することが可能となる。その結果、多段NAT環境で、ある端末装置がいかなる相手とのP2P通信を行う場合でも、個別にNAT装置のNAT種別を判定することができ、数あるNAT越え手法の中から、適切なNAT越え手法を選択することができる。そのため、本発明は、P2P通信時の接続性向上技術として有用である。   According to the communication apparatus and the like according to the present invention, it is possible to individually determine the NAT type of each NAT apparatus even in a multi-stage NAT environment. As a result, even when a certain terminal device performs P2P communication with any partner in a multi-stage NAT environment, it is possible to individually determine the NAT type of the NAT device. A method can be selected. For this reason, the present invention is useful as a technology for improving connectivity during P2P communication.

また、本発明は、多段NAT環境下において、NAT越えができないために、P2P接続できない顧客へのサポートとして、NAT越えにおいて問題となるNAT装置をピンポイントに提示することができる等の用途にも応用ができる。   The present invention is also applicable to applications such as pinpointing NAT devices that are problematic in NAT traversal as support to customers who cannot connect to P2P because NAT traversal is not possible in a multi-stage NAT environment. Can be applied.

201、204、301 STUNサーバ
202、205、206、303、305、404a、404b、404c、903a、903b NAT装置
203、207、304、306、405a、405b、405c、904a、904b 端末装置
302、403、902 ISP−NAT装置
400、900 通信システム
401、901 外部サーバ
402 インターネット
501 CPU
502 主記憶装置
503 通信制御装置
504 外部記憶装置
505 入力装置
506 出力装置
507 バス
601、651 NAT情報登録部
602 NAT種別判定依頼部
603 ポート情報受信部
604、655 判定パケット送受信部
605 判定情報送信部
606 判定結果受信部
610、610b 判定結果取得部
652 判定協力依頼受信部
653 自動ポートフォワード命令部
654 ポート情報送信部
656 判定情報送信部
657 判定結果受信部
658 判定対象NAT情報通知部
701 NAT情報受信部
702 判定依頼受信部
703 判定協力依頼送信部
704 ポート情報送受信部
705 判定情報受信部
706 NAT情報管理部
707 協力端末選択部
708 NAT種別判定部
709 判定結果送信部
710 判定部
201, 204, 301 STUN server 202, 205, 206, 303, 305, 404a, 404b, 404c, 903a, 903b NAT device 203, 207, 304, 306, 405a, 405b, 405c, 904a, 904b Terminal device 302, 403 902 ISP-NAT device 400, 900 Communication system 401, 901 External server 402 Internet 501 CPU
502 Main storage device 503 Communication control device 504 External storage device 505 Input device 506 Output device 507 Bus 601 and 651 NAT information registration unit 602 NAT type determination request unit 603 Port information reception unit 604 and 655 Determination packet transmission and reception unit 605 Determination information transmission unit 606 Judgment result reception unit 610, 610b Judgment result acquisition unit 652 Judgment cooperation request reception unit 653 Automatic port forward command unit 654 Port information transmission unit 656 Judgment information transmission unit 657 Judgment result reception unit 658 Judgment target NAT information notification unit 701 NAT information reception Unit 702 Determination Request Reception Unit 703 Determination Cooperation Request Transmission Unit 704 Port Information Transmission / Reception Unit 705 Determination Information Reception Unit 706 NAT Information Management Unit 707 Cooperation Terminal Selection Unit 708 NAT Type Determination Unit 709 Determination Result Transmission Unit 710 Determination Unit

Claims (15)

インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して、前記インターネットに接続されたサーバ装置と通信する通信装置であって、
前記サーバ装置から送信される、前記上段NAT装置に接続された第2下段NAT装置のNAT種別の判定の協力を依頼する判定協力依頼を受信する判定協力依頼受信部と、
前記判定協力依頼受信部により前記判定協力依頼が受信された場合、前記第1下段NAT装置が受信するパケットを当該通信装置に転送させるためのポートフォワードの実行を前記第1下段NAT装置に命令するポートフォワード命令部と、
前記ポートフォワードに用いられるポート番号を含むポート情報を前記サーバ装置に送信するポート情報送信部と、
前記第2下段NAT装置に接続された依頼端末であって、前記ポート情報を前記サーバ装置から受信した依頼端末から送信される前記NAT種別の判定のための判定パケットを受信する判定パケット受信部と、
前記判定パケット受信部により受信された判定パケットに基づいて得られる、前記NAT種別の判定に用いられる判定情報を送信する判定情報送信部と
を備える通信装置。
A communication device that communicates with a server device connected to the Internet via an upper NAT (Network Address Translation) device connected to the Internet and a first lower NAT device connected to the upper NAT device,
A determination cooperation request receiving unit that receives a determination cooperation request for requesting cooperation for determining the NAT type of the second lower NAT device connected to the upper NAT device, transmitted from the server device;
When the determination cooperation request reception unit receives the determination cooperation request, the first lower NAT device is instructed to execute port forwarding for transferring a packet received by the first lower NAT device to the communication device. A port forward command,
A port information transmission unit that transmits port information including a port number used for the port forwarding to the server device;
A determination terminal that is connected to the second lower NAT device and receives a determination packet for determining the NAT type transmitted from the request terminal that has received the port information from the server device; ,
A determination information transmitting unit configured to transmit determination information used for determination of the NAT type obtained based on the determination packet received by the determination packet receiving unit;
さらに、前記判定パケット受信部により受信された判定パケットに示される、前記第2下段NAT装置のIPアドレスとポート番号とを、前記上段NAT装置に接続された第3下段NAT装置を介して、前記第3下段NAT装置に接続された他の通信装置に通知する判定対象NAT情報通知部を備える
請求項1記載の通信装置。
Further, the IP address and port number of the second lower NAT device indicated in the determination packet received by the determination packet receiving unit are passed through the third lower NAT device connected to the upper NAT device. The communication apparatus according to claim 1, further comprising: a determination target NAT information notification unit that notifies another communication apparatus connected to the third lower NAT apparatus.
インターネットと、前記インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して第1通信装置と通信し、かつ、前記インターネットと、前記上段NAT装置と、前記上段NAT装置に接続された第2下段NAT装置とを介して第2通信装置と通信するサーバ装置であって、
前記第1通信装置の接続環境を示す接続環境情報であって、前記第1下段NAT装置に関する情報を含む接続環境情報を受信する接続環境情報受信部と、
前記第2通信装置から送信される、前記第2下段NAT装置のNAT種別の判定を依頼する判定依頼を受信する判定依頼受信部と、
前記判定依頼受信部により前記判定依頼が受信された場合、接続環境情報受信部により受信された接続環境情報を参照することで、所定の基準を満たす前記第1通信装置を協力端末として選択する協力端末選択部と、
前記協力端末選択部により選択された前記第1通信装置に、前記NAT種別の判定の協力を依頼する判定協力依頼を送信する判定協力依頼送信部と、
前記判定協力依頼を受信した前記第1通信装置から送信されるポート情報であって、前記第1下段NAT装置が受信するパケットを前記第1通信装置に転送させるためのポートフォワードに用いられるポート番号を含むポート情報を受信し、かつ、受信したポート情報を前記第2通信装置に送信するポート情報送受信部と
を備えるサーバ装置。
Communicating with the first communication device via the Internet, an upper NAT (Network Address Translation) device connected to the Internet, and a first lower NAT device connected to the upper NAT device, and the Internet A server device that communicates with a second communication device via the upper NAT device and a second lower NAT device connected to the upper NAT device;
A connection environment information receiving unit for receiving connection environment information indicating connection environment information of the first communication device, the connection environment information including information on the first lower NAT device;
A determination request receiving unit that receives a determination request for requesting determination of the NAT type of the second lower NAT device, transmitted from the second communication device;
When the determination request is received by the determination request receiving unit, the first communication device that satisfies a predetermined standard is selected as a cooperation terminal by referring to the connection environment information received by the connection environment information receiving unit. A terminal selector,
A determination cooperation request transmission unit that transmits a determination cooperation request for requesting cooperation of determination of the NAT type to the first communication device selected by the cooperation terminal selection unit;
Port number transmitted from the first communication device that has received the request for cooperation for determination, and used for port forwarding for transferring a packet received by the first lower NAT device to the first communication device. And a port information transmitting / receiving unit that receives the received port information and transmits the received port information to the second communication device.
さらに、
前記ポート情報を受信した前記第2通信装置と、前記第1通信装置との間で送受信される判定パケットに基づく判定情報であって、前記NAT種別の判定に用いられる判定情報を、前記第1通信装置および前記第2通信装置のそれぞれから受信する判定情報受信部と、
前記判定情報受信部により受信された判定情報を用いて、前記NAT種別の判定を行うNAT種別判定部と、
前記NAT種別判定部による判定された前記NAT種別を示す情報である判定結果を前記第2通信装置に送信する判定結果送信部と
を備える請求項3記載のサーバ装置。
further,
Determination information based on a determination packet transmitted / received between the second communication device that has received the port information and the first communication device, the determination information used for determining the NAT type being the first information A determination information receiving unit that receives from each of the communication device and the second communication device;
Using the determination information received by the determination information receiving unit, a NAT type determination unit for determining the NAT type;
The server apparatus according to claim 3, further comprising: a determination result transmission unit that transmits a determination result that is information indicating the NAT type determined by the NAT type determination unit to the second communication device.
前記接続環境情報受信部は、前記第1下段NAT装置がポートフォワード機能を有するか否かを示す情報を含む前記接続環境情報を受信し、
前記協力端末選択部は、前記接続環境情報が、前記第1下段NAT装置がポートフォワード機能を有することを示す場合、前記第1下段NAT装置を協力端末として選択する
請求項3または4に記載のサーバ装置。
The connection environment information receiving unit receives the connection environment information including information indicating whether the first lower NAT device has a port forward function;
The cooperation terminal selection unit selects the first lower NAT apparatus as a cooperation terminal when the connection environment information indicates that the first lower NAT apparatus has a port forward function. Server device.
インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して、前記インターネットに接続されたサーバ装置と通信する通信装置であって、
前記第1下段NAT装置のNAT種別の判定を依頼する判定依頼を前記サーバ装置に送信する判定依頼部と、
前記サーバ装置から送信されるポート情報であって、前記上段NAT装置に接続された第2下段NAT装置が受信するパケットを前記第2下段NAT装置に接続された協力端末に転送させるためのポートフォワードに用いられるポート番号を含むポート情報を受信するポート情報受信部と、
前記ポート情報受信部により受信されたポート情報を用いて、前記NAT種別の判定のための判定パケットを前記協力端末に送信する判定パケット送信部と、
前記判定パケット送信部により送信された前記判定パケットに基づいて求められた前記NAT種別を示す情報である判定結果を取得する判定結果取得部と
を備える通信装置。
A communication device that communicates with a server device connected to the Internet via an upper NAT (Network Address Translation) device connected to the Internet and a first lower NAT device connected to the upper NAT device,
A determination requesting unit for transmitting a determination request for requesting determination of the NAT type of the first lower NAT device to the server device;
Port forward for transmitting a packet received by the second lower NAT device connected to the upper NAT device to a cooperating terminal connected to the second lower NAT device, which is port information transmitted from the server device A port information receiving unit for receiving port information including a port number used for
A determination packet transmitting unit that transmits a determination packet for determining the NAT type to the cooperating terminal using the port information received by the port information receiving unit;
A determination result acquisition unit that acquires a determination result that is information indicating the NAT type obtained based on the determination packet transmitted by the determination packet transmission unit.
前記判定結果取得部は、
前記判定パケット送信部により送信された前記判定パケットに基づく判定情報であって、前記NAT種別の判定に用いられる判定情報を前記サーバ装置に送信する判定情報送信部と、
前記判定情報送信部により送信された判定情報を受信した前記サーバ装置から送信される前記判定結果を受信する判定結果受信部とを有する
請求項6記載の通信装置。
The determination result acquisition unit
Determination information based on the determination packet transmitted by the determination packet transmitter, and a determination information transmitter for transmitting determination information used for determination of the NAT type to the server device;
The communication apparatus according to claim 6, further comprising: a determination result receiving unit that receives the determination result transmitted from the server device that has received the determination information transmitted by the determination information transmitting unit.
前記判定結果取得部は、
前記判定パケット送信部により送信された前記判定パケットに基づく判定情報であって、前記NAT種別の判定に用いられる判定情報を、前記ポート情報を受信した前記協力端末から受信する判定情報受信部と、
前記判定情報受信部により受信された判定情報を用いて、前記NAT種別の判定を行うNAT種別判定部とを有する
請求項6記載の通信装置。
The determination result acquisition unit
Determination information based on the determination packet transmitted by the determination packet transmission unit, the determination information used for determining the NAT type from the cooperation terminal that has received the port information, a determination information receiving unit,
The communication apparatus according to claim 6, further comprising: a NAT type determination unit configured to determine the NAT type using the determination information received by the determination information receiving unit.
インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置および第2下段NAT装置と、前記第1下段NAT装置に接続された第1通信装置と、前記第2下段NAT装置に接続された第2通信装置と、前記インターネットに接続されたサーバ装置とを備える通信システムであって、
前記第2通信装置は、
前記第2下段NAT装置のNAT種別の判定を依頼する判定依頼を前記サーバ装置に送信する判定依頼部と、
前記サーバ装置から送信されるポート情報であって、前記第1下段NAT装置が受信するパケットを前記第1通信装置に転送させるためのポートフォワードに用いられるポート番号を含むポート情報を受信するポート情報受信部と、
前記ポート情報受信部により受信されたポート情報を用いて、前記NAT種別の判定のための判定パケットを前記第1通信装置に送信する判定パケット送信部と、
前記判定パケット送信部により送信された前記判定パケットに基づいて求められた前記NAT種別を示す情報である判定結果を取得する判定結果取得部とを備え、
前記サーバ装置は、
前記第1通信装置および前記第2通信装置それぞれの接続環境を示す接続環境情報であって、前記第1下段NAT装置および前記第2下段NAT装置に関する情報を含む接続環境情報を受信する接続環境情報受信部と、
前記第2通信装置から前記判定依頼を受信する判定依頼受信部と、
前記判定依頼受信部により前記判定依頼が受信された場合、接続環境情報受信部により受信された接続環境情報を参照することで、所定の基準を満たす前記第1通信装置を協力端末として選択する協力端末選択部と、
前記協力端末選択部により選択された前記第1通信装置に、前記NAT種別の判定の協力を依頼する判定協力依頼を送信する判定協力依頼送信部と、
前記判定協力依頼を受信した前記第1通信装置から送信される前記ポート情報を受信し、かつ、受信した前記ポート情報を前記第2通信装置に送信するポート情報送受信部とを備え、
前記第1通信装置は、
前記サーバ装置から送信される前記判定協力依頼を受信する判定協力依頼受信部と、
前記判定協力依頼受信部により前記判定協力依頼が受信された場合、前記ポートフォワードの実行を前記第1下段NAT装置に命令するポートフォワード命令部と、
前記ポート情報を前記サーバ装置に送信するポート情報送信部と、
前記ポート情報を前記サーバ装置から受信した前記第2通信装置から送信される前記判定パケットを受信する判定パケット受信部と、
前記判定パケット受信部により受信された判定パケットに基づいて得られる、前記NAT種別の判定に用いられる判定情報を送信する判定情報送信部とを備え、
前記通信システムはさらに、前記判定情報送信部から送信される前記判定情報を受信して、受信した判定情報を用いて前記NAT種別の判定を行うことで前記判定結果を得る判定部を備え、
前記判定結果取得部は、前記判定部から前記判定結果を取得する
通信システム。
An upper NAT (Network Address Translation) device connected to the Internet, a first lower NAT device and a second lower NAT device connected to the upper NAT device, and a first communication device connected to the first lower NAT device A communication system comprising: a second communication device connected to the second lower NAT device; and a server device connected to the Internet,
The second communication device is
A determination requesting unit for transmitting a determination request for requesting determination of the NAT type of the second lower NAT device to the server device;
Port information transmitted from the server device, the port information receiving port information including a port number used for port forwarding for transferring a packet received by the first lower NAT device to the first communication device. A receiver,
A determination packet transmitting unit that transmits a determination packet for determining the NAT type to the first communication device using the port information received by the port information receiving unit;
A determination result acquisition unit that acquires a determination result that is information indicating the NAT type obtained based on the determination packet transmitted by the determination packet transmission unit;
The server device
Connection environment information indicating connection environments of the first communication device and the second communication device, and connection environment information for receiving connection environment information including information on the first lower NAT device and the second lower NAT device A receiver,
A determination request receiving unit that receives the determination request from the second communication device;
When the determination request is received by the determination request receiving unit, the first communication device that satisfies a predetermined standard is selected as a cooperation terminal by referring to the connection environment information received by the connection environment information receiving unit. A terminal selector,
A determination cooperation request transmission unit that transmits a determination cooperation request for requesting cooperation of determination of the NAT type to the first communication device selected by the cooperation terminal selection unit;
A port information transmission / reception unit that receives the port information transmitted from the first communication device that has received the determination cooperation request, and transmits the received port information to the second communication device;
The first communication device is
A determination cooperation request receiving unit that receives the determination cooperation request transmitted from the server device;
When the determination cooperation request is received by the determination cooperation request reception unit, a port forward instruction unit that instructs the first lower NAT device to execute the port forward;
A port information transmission unit for transmitting the port information to the server device;
A determination packet receiving unit that receives the determination packet transmitted from the second communication device that has received the port information from the server device;
A determination information transmission unit that transmits determination information used for determination of the NAT type obtained based on the determination packet received by the determination packet reception unit;
The communication system further includes a determination unit that receives the determination information transmitted from the determination information transmission unit and obtains the determination result by determining the NAT type using the received determination information,
The determination result acquisition unit acquires the determination result from the determination unit.
インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して、前記インターネットに接続されたサーバ装置と通信する通信装置によって実行される通信方法であって、
前記サーバ装置から送信される、前記上段NAT装置に接続された第2下段NAT装置のNAT種別の判定の協力を依頼する判定協力依頼を受信する判定協力依頼受信ステップと、
前記判定協力依頼受信ステップにおいて前記判定協力依頼が受信された場合、前記第1下段NAT装置が受信するパケットを当該通信装置に転送させるためのポートフォワードの実行を前記第1下段NAT装置に命令するポートフォワード命令ステップと、
前記ポートフォワードに用いられるポート番号を含むポート情報を前記サーバ装置に送信するポート情報送信ステップと、
前記第2下段NAT装置に接続された依頼端末であって、前記ポート情報を前記サーバ装置から受信した依頼端末から送信される前記NAT種別の判定のための判定パケットを受信する判定パケット受信ステップと、
前記判定パケット受信ステップにおいて受信された判定パケットに基づいて得られる、前記NAT種別の判定に用いられる判定情報を送信する判定情報送信ステップと
を含む通信方法。
Executed by a communication device that communicates with the server device connected to the Internet via an upper NAT (Network Address Translation) device connected to the Internet and a first lower NAT device connected to the upper NAT device. A communication method,
A determination cooperation request receiving step for receiving a determination cooperation request for requesting cooperation for determining the NAT type of the second lower NAT device connected to the upper NAT device, transmitted from the server device;
When the determination cooperation request is received in the determination cooperation request reception step, the first lower NAT device is instructed to execute port forwarding for transferring the packet received by the first lower NAT device to the communication device. A port forward instruction step;
A port information transmission step of transmitting port information including a port number used for the port forwarding to the server device;
A determination packet receiving step connected to the second lower NAT device, and receiving a determination packet for determining the NAT type transmitted from the request terminal that has received the port information from the server device; ,
A determination information transmission step of transmitting determination information used for determination of the NAT type obtained based on the determination packet received in the determination packet reception step.
インターネットと、前記インターネットに接続された上段(Network Address Translation)NAT装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して第1通信装置と通信し、かつ、前記インターネットと、前記上段NAT装置と、前記上段NAT装置に接続された第2下段NAT装置とを介して第2通信装置と通信するサーバ装置によって実行される通信方法であって、
前記第1通信装置および前記第2通信装置それぞれの接続環境を示す接続環境情報であって、前記第1下段NAT装置および前記第2下段NAT装置に関する情報を含む接続環境情報を受信する接続環境情報受信ステップと、
前記第2通信装置から送信される、前記第2下段NAT装置のNAT種別の判定を依頼する判定依頼を受信する判定依頼受信ステップと、
前記判定依頼受信ステップにおいて前記判定依頼が受信された場合、接続環境情報受信ステップにおいて受信された接続環境情報を参照することで、所定の基準を満たす前記第1通信装置を協力端末として選択する協力端末選択ステップと、
前記協力端末選択ステップにおいて選択された前記第1通信装置に、前記NAT種別の判定の協力を依頼する判定協力依頼を送信する判定協力依頼送信ステップと、
前記判定協力依頼を受信した前記第1通信装置から送信されるポート情報であって、前記第1下段NAT装置が受信するパケットを前記第1通信装置に転送させるためのポートフォワードに用いられるポート番号を含むポート情報を受信するポート情報受信ステップと、
ポート情報受信ステップにおいて受信されたポート情報を前記第2通信装置に送信するポート情報送信ステップと
を含む通信方法。
Communicating with the first communication device via the Internet, a Network Address Translation NAT device connected to the Internet, and a first lower NAT device connected to the upper NAT device; and the Internet; A communication method executed by a server device that communicates with a second communication device via the upper NAT device and a second lower NAT device connected to the upper NAT device,
Connection environment information indicating connection environments of the first communication device and the second communication device, and connection environment information for receiving connection environment information including information on the first lower NAT device and the second lower NAT device Receiving step;
A determination request receiving step of receiving a determination request for requesting determination of the NAT type of the second lower NAT device, transmitted from the second communication device;
When the determination request is received in the determination request reception step, the first communication device that satisfies the predetermined standard is selected as a cooperation terminal by referring to the connection environment information received in the connection environment information reception step. A terminal selection step;
A determination cooperation request transmission step of transmitting a determination cooperation request for requesting cooperation of the determination of the NAT type to the first communication device selected in the cooperation terminal selection step;
Port number transmitted from the first communication device that has received the request for cooperation for determination, and used for port forwarding for transferring a packet received by the first lower NAT device to the first communication device. A port information receiving step for receiving port information including:
A port information transmitting step of transmitting the port information received in the port information receiving step to the second communication device.
インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して、前記インターネットに接続されたサーバ装置と通信する通信装置によって実行される通信方法であって、
前記第1下段NAT装置のNAT種別の判定を依頼する判定依頼を前記サーバ装置に送信する判定依頼ステップと、
前記サーバ装置から送信されるポート情報であって、前記上段NAT装置に接続された第2下段NAT装置が受信するパケットを前記第2下段NAT装置に接続された協力端末に転送させるためのポートフォワードに用いられるポート番号を含むポート情報を受信するポート情報受信ステップと、
前記ポート情報受信ステップにおいて受信されたポート情報を用いて、前記NAT種別の判定のための判定パケットを前記協力端末に送信する判定パケット送信ステップと、
前記判定パケット送信ステップにおいて送信された前記判定パケットに基づいて求められた前記NAT種別を示す情報である判定結果を取得する判定結果取得ステップと
を含む通信方法。
Executed by a communication device that communicates with the server device connected to the Internet via an upper NAT (Network Address Translation) device connected to the Internet and a first lower NAT device connected to the upper NAT device. A communication method,
A determination requesting step for transmitting a determination request for requesting determination of the NAT type of the first lower NAT device to the server device;
Port forward for transmitting a packet received by the second lower NAT device connected to the upper NAT device to a cooperating terminal connected to the second lower NAT device, which is port information transmitted from the server device A port information receiving step for receiving port information including a port number used for
A determination packet transmission step of transmitting a determination packet for determination of the NAT type to the cooperation terminal using the port information received in the port information reception step;
A determination result acquisition step of acquiring a determination result which is information indicating the NAT type obtained based on the determination packet transmitted in the determination packet transmission step.
インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して、前記インターネットに接続されたサーバ装置と通信する集積回路であって、
前記サーバ装置から送信される、前記上段NAT装置に接続された第2下段NAT装置のNAT種別の判定の協力を依頼する判定協力依頼を受信する判定協力依頼受信部と、
前記判定協力依頼受信部により前記判定協力依頼が受信された場合、前記第1下段NAT装置が受信するパケットを当該通信装置に転送させるためのポートフォワードの実行を前記第1下段NAT装置に命令するポートフォワード命令部と、
前記ポートフォワードに用いられるポート番号を含むポート情報を前記サーバ装置に送信するポート情報送信部と、
前記第2下段NAT装置に接続された依頼端末であって、前記ポート情報を前記サーバ装置から受信した依頼端末から送信される前記NAT種別の判定のための判定パケットを受信する判定パケット受信部と、
前記判定パケット受信部により受信された判定パケットに基づいて得られる、前記NAT種別の判定に用いられる判定情報を送信する判定情報送信部と
を備える集積回路。
An integrated circuit that communicates with a server device connected to the Internet via an upper NAT (Network Address Translation) device connected to the Internet and a first lower NAT device connected to the upper NAT device,
A determination cooperation request receiving unit that receives a determination cooperation request for requesting cooperation for determining the NAT type of the second lower NAT device connected to the upper NAT device, transmitted from the server device;
When the determination cooperation request reception unit receives the determination cooperation request, the first lower NAT device is instructed to execute port forwarding for transferring a packet received by the first lower NAT device to the communication device. A port forward command,
A port information transmission unit that transmits port information including a port number used for the port forwarding to the server device;
A determination terminal that is connected to the second lower NAT device and receives a determination packet for determining the NAT type transmitted from the request terminal that has received the port information from the server device; ,
An integrated circuit comprising: a determination information transmitting unit that transmits determination information used for determining the NAT type obtained based on the determination packet received by the determination packet receiving unit.
インターネットと、前記インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して第1通信装置と通信し、かつ、前記インターネットと、前記上段NAT装置と、前記上段NAT装置に接続された第2下段NAT装置とを介して第2通信装置と通信する集積回路であって、
前記第1通信装置の接続環境を示す接続環境情報であって、前記第1下段NAT装置に関する情報を含む接続環境情報を受信する接続環境情報受信部と、
前記第2通信装置から送信される、前記第2下段NAT装置のNAT種別の判定を依頼する判定依頼を受信する判定依頼受信部と、
前記判定依頼受信部により前記判定依頼が受信された場合、接続環境情報受信部により受信された接続環境情報を参照することで、所定の基準を満たす前記第1通信装置を協力端末として選択する協力端末選択部と、
前記協力端末選択部により選択された前記第1通信装置に、前記NAT種別の判定の協力を依頼する判定協力依頼を送信する判定協力依頼送信部と、
前記判定協力依頼を受信した前記第1通信装置から送信されるポート情報であって、前記第1下段NAT装置が受信するパケットを前記第1通信装置に転送させるためのポートフォワードに用いられるポート番号を含むポート情報を受信し、かつ、受信したポート情報を前記第2通信装置に送信するポート情報送受信部と
を備える集積回路。
Communicating with the first communication device via the Internet, an upper NAT (Network Address Translation) device connected to the Internet, and a first lower NAT device connected to the upper NAT device, and the Internet An integrated circuit that communicates with a second communication device via the upper NAT device and a second lower NAT device connected to the upper NAT device;
A connection environment information receiving unit for receiving connection environment information indicating connection environment information of the first communication device, the connection environment information including information on the first lower NAT device;
A determination request receiving unit that receives a determination request for requesting determination of the NAT type of the second lower NAT device, transmitted from the second communication device;
When the determination request is received by the determination request receiving unit, the first communication device that satisfies a predetermined standard is selected as a cooperation terminal by referring to the connection environment information received by the connection environment information receiving unit. A terminal selector,
A determination cooperation request transmission unit that transmits a determination cooperation request for requesting cooperation of determination of the NAT type to the first communication device selected by the cooperation terminal selection unit;
Port number transmitted from the first communication device that has received the request for cooperation for determination, and used for port forwarding for transferring a packet received by the first lower NAT device to the first communication device. An integrated circuit comprising: a port information transmission / reception unit that receives port information including the port information and transmits the received port information to the second communication device.
インターネットに接続された上段NAT(Network Address Translation)装置と、前記上段NAT装置に接続された第1下段NAT装置とを介して、前記インターネットに接続されたサーバ装置と通信する集積回路であって、
前記第1下段NAT装置のNAT種別の判定を依頼する判定依頼を前記サーバ装置に送信する判定依頼部と、
前記サーバ装置から送信されるポート情報であって、前記上段NAT装置に接続された第2下段NAT装置が受信するパケットを前記第2下段NAT装置に接続された協力端末に転送させるためのポートフォワードに用いられるポート番号を含むポート情報を受信するポート情報受信部と、
前記ポート情報受信部により受信されたポート情報を用いて、前記NAT種別の判定のための判定パケットを前記協力端末に送信する判定パケット送信部と、
前記判定パケット送信部により送信された前記判定パケットに基づいて求められた前記NAT種別を示す情報である判定結果を取得する判定結果取得部と
を備える集積回路。
An integrated circuit that communicates with a server device connected to the Internet via an upper NAT (Network Address Translation) device connected to the Internet and a first lower NAT device connected to the upper NAT device,
A determination requesting unit for transmitting a determination request for requesting determination of the NAT type of the first lower NAT device to the server device;
Port forward for transmitting a packet received by the second lower NAT device connected to the upper NAT device to a cooperating terminal connected to the second lower NAT device, which is port information transmitted from the server device A port information receiving unit for receiving port information including a port number used for
A determination packet transmitting unit that transmits a determination packet for determining the NAT type to the cooperating terminal using the port information received by the port information receiving unit;
An integrated circuit comprising: a determination result acquisition unit that acquires a determination result that is information indicating the NAT type obtained based on the determination packet transmitted by the determination packet transmission unit.
JP2010155272A 2010-07-07 2010-07-07 Communication device, server device, communication system, communicating method, and integrated circuit Pending JP2012019361A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010155272A JP2012019361A (en) 2010-07-07 2010-07-07 Communication device, server device, communication system, communicating method, and integrated circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010155272A JP2012019361A (en) 2010-07-07 2010-07-07 Communication device, server device, communication system, communicating method, and integrated circuit

Publications (1)

Publication Number Publication Date
JP2012019361A true JP2012019361A (en) 2012-01-26

Family

ID=45604270

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010155272A Pending JP2012019361A (en) 2010-07-07 2010-07-07 Communication device, server device, communication system, communicating method, and integrated circuit

Country Status (1)

Country Link
JP (1) JP2012019361A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016005212A (en) * 2014-06-19 2016-01-12 株式会社アイ・オー・データ機器 Communication connection system and communication connection method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016005212A (en) * 2014-06-19 2016-01-12 株式会社アイ・オー・データ機器 Communication connection system and communication connection method

Similar Documents

Publication Publication Date Title
KR100901790B1 (en) CONTROL TUNNEL AND DIRECT TUNNEL CONFIGURATION METHOD IN IPv6 SERVICE PROVIDE SYSTEM BASED IPv4 NETWORK
US8626879B2 (en) Systems and methods for establishing network connections using local mediation services
JP4327142B2 (en) Information processing system, tunnel communication device, tunnel communication method, proxy response device, and proxy response method
KR101055048B1 (en) Information communication system, information processing apparatus and method, and recording medium
JP4331154B2 (en) Information processing system, tunnel communication apparatus, and tunnel communication method
US11924164B2 (en) Cloud access to local network addresses
US8761170B2 (en) Communication device, communication method, integrated circuit, and program
JP6082156B1 (en) COMMUNICATION SYSTEM, ADDRESS NOTIFICATION DEVICE, COMMUNICATION CONTROL DEVICE, TERMINAL, COMMUNICATION METHOD, AND PROGRAM
JP2011160103A (en) Gateway device and program, and communication system
US20130124735A1 (en) Method and apparatus for provisioning network address translator traversal methods
JP4712481B2 (en) Communication method and apparatus
Tseng et al. Can: A context-aware NAT traversal scheme
JP2008236278A (en) Communication connection method and communication apparatus
JP2012019361A (en) Communication device, server device, communication system, communicating method, and integrated circuit
JPWO2010143286A1 (en) Communication terminal, address resolution server, and computer program
KR101445255B1 (en) Method, apparatus and computer-readable recording medium for automatically providing load balancing setting
JP4191180B2 (en) Communication support device, system, communication method, and computer program
WO2008069504A1 (en) Method for configuring control tunnel and direct tunnel in ipv4 network-based ipv6 service providing system
JP5054666B2 (en) VPN connection device, packet control method, and program
JP2007104438A (en) Outdoor access system, server, and communication method
JP2007329791A (en) Gateway device
JP2016005212A (en) Communication connection system and communication connection method
WO2022201980A1 (en) Communication method, router, server, communication system, and communication program
JP5084716B2 (en) VPN connection apparatus, DNS packet control method, and program
KR20070061036A (en) Apparatus and method for sharing media inter homenetworks