JP4722615B2 - Communication method and communication apparatus - Google Patents

Communication method and communication apparatus Download PDF

Info

Publication number
JP4722615B2
JP4722615B2 JP2005232556A JP2005232556A JP4722615B2 JP 4722615 B2 JP4722615 B2 JP 4722615B2 JP 2005232556 A JP2005232556 A JP 2005232556A JP 2005232556 A JP2005232556 A JP 2005232556A JP 4722615 B2 JP4722615 B2 JP 4722615B2
Authority
JP
Japan
Prior art keywords
address
virtual
packet
communication
network device
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.)
Expired - Fee Related
Application number
JP2005232556A
Other languages
Japanese (ja)
Other versions
JP2007049498A (en
Inventor
大介 佐藤
雄司 須之内
Original Assignee
パナソニックシステムネットワークス株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by パナソニックシステムネットワークス株式会社 filed Critical パナソニックシステムネットワークス株式会社
Priority to JP2005232556A priority Critical patent/JP4722615B2/en
Publication of JP2007049498A publication Critical patent/JP2007049498A/en
Application granted granted Critical
Publication of JP4722615B2 publication Critical patent/JP4722615B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、通信方法及び通信装置に関し、より詳細には、NAT機能を有するネットワーク機器に接続されたコンピュータからP2P型通信を行うための通信方法及びプログラム並びに通信装置に関する。   The present invention relates to a communication method and a communication apparatus, and more particularly to a communication method and program for performing P2P communication from a computer connected to a network device having a NAT function, and a communication apparatus.

近年、インターネットに接続するホストコンピュータの増大により、IP(Internet Protocol)アドレスの不足という問題が顕著化している。そこで、IPアドレスの不足を解消するための一つの方法として、NAT(Network Address Translator)機能が利用されている。NAT機能は、閉域網であるLAN(local area network)内のプライベートアドレス(プライベートIPアドレス)を有するホストコンピュータと、インターネット内のグローバルアドレス(グローバルIPアドレス)を有するホストコンピュータとの間で通信を行うために、アドレス変換を行う。また、NATの拡張された機能として、NAPT(network address port translation)機能も周知であり利用されている。NAPT機能は、別にIPマスカレードとも呼ばれ、プライベートIPアドレスとポート番号を変更することで、一つのグローバルIPアドレスを使って、複数のホストコンピュータを共有できるようにする技術である。本明細書においては、以下、NATとNAPTとをまとめて広義にNATと呼ぶこととする。   In recent years, with the increase of host computers connected to the Internet, the problem of lack of IP (Internet Protocol) addresses has become prominent. Therefore, a NAT (Network Address Translator) function is used as one method for solving the shortage of IP addresses. The NAT function performs communication between a host computer having a private address (private IP address) in a local area network (LAN) that is a closed network and a host computer having a global address (global IP address) in the Internet. Therefore, address conversion is performed. As an extended function of NAT, a network address port translation (NAPT) function is also known and used. The NAPT function is also called IP masquerading, and is a technology that allows a plurality of host computers to be shared using a single global IP address by changing the private IP address and port number. In the present specification, hereinafter, NAT and NAPT are collectively referred to as NAT.

図9に、NAT機能を説明するためのネットワーク接続図を示す。ルータ13、14には、NAT(NAPT)機能が実装されており、プライベートアドレス/ポート番号のペアとグローバルアドレスとの対応・変換の関係を規定した変換テーブルが格納されている。端末11、12等は、PC(personal computer)やプリンター等であり、搭載されたプロセッサがプログラムに従って動作することに鑑み、広義のコンピュータシステムである。   FIG. 9 shows a network connection diagram for explaining the NAT function. The routers 13 and 14 have a NAT (NAPT) function, and store a conversion table that defines the correspondence / translation relationship between a private address / port number pair and a global address. The terminals 11 and 12 are PCs (personal computers), printers, and the like, and are computer systems in a broad sense in view of the installed processor operating according to a program.

端末11には、ルータ13によってプライベートアドレス「A」とポート「100」とが割り当てられている。ここで端末11からインターネットを介し別なLAN内の端末12(グローバルアドレスNのルータ14に接続されている)へ、ルータ13、14を介してパケットを送信する。端末11から送信されるIPヘッダには、宛先アドレス21として「N」、送信元アドレス22として「A」が書き込まれ、TCPヘッダまたはUDPヘッダには、宛先ポート番号23として「200」、送信元ポート番号24として「100」が書き込まれている。ルータ13は、変換テーブルを参照して、送信元アドレス22のプライベートアドレス「A」をルータ13のグローバルアドレス「M」に変換し、ルータ14に向けてパケットを送信する。   A private address “A” and a port “100” are assigned to the terminal 11 by the router 13. Here, the packet is transmitted from the terminal 11 to the terminal 12 in another LAN (connected to the router 14 having the global address N) via the Internet via the routers 13 and 14. In the IP header transmitted from the terminal 11, “N” as the destination address 21 and “A” as the source address 22 are written, and “200” as the destination port number 23 in the TCP header or UDP header. “100” is written as the port number 24. The router 13 refers to the conversion table, converts the private address “A” of the source address 22 to the global address “M” of the router 13, and transmits the packet to the router 14.

次に、端末12から端末11へ、ルータ14、13を介してIPパケットを送信する。端末12から送信されるパケットのヘッダには、宛先アドレス31として「M」、送信元アドレス32として「B」が書き込まれ、TCPヘッダまたはUDPヘッダには、宛先ポート番号33として「100」、送信元ポート番号34として「200」が書き込まれている。ルータ13は、変換テーブルを参照して、宛先アドレス31のグローバルアドレス「M」をプライベートアドレス「A」に変換し、LAN内の端末11に向けてパケットを送信する。   Next, an IP packet is transmitted from the terminal 12 to the terminal 11 via the routers 14 and 13. In the header of the packet transmitted from the terminal 12, “M” as the destination address 31 and “B” as the transmission source address 32 are written, and “100” as the destination port number 33 is transmitted in the TCP header or UDP header. “200” is written as the original port number 34. The router 13 refers to the conversion table, converts the global address “M” of the destination address 31 to the private address “A”, and transmits the packet toward the terminal 11 in the LAN.

一方、オンラインゲームやビデオチャットなどのP2P(peer to peer)型通信を利用したアプリケーション(以下、P2Pアプリケーションという)の利用が増えている。P2P型通信は、サーバを介さずに、端末間で直接通信をおこなう。NAT機能を利用した接続環境において、P2Pアプリケーションを利用するために、IETF(Internet Engineering Task Force)の規格であるSTUN(例えば、非特許文献1参照)技術が知られている。   On the other hand, applications using P2P (peer to peer) type communication such as online games and video chat (hereinafter referred to as P2P applications) are increasing. P2P type communication directly communicates between terminals without going through a server. In order to use a P2P application in a connection environment using the NAT function, STUN (see Non-Patent Document 1, for example) technology that is a standard of IETF (Internet Engineering Task Force) is known.

また、NAT機能を有するネットワーク機器を使用した通信方法を開示した文献がある(例えば、特許文献1参照)。   Further, there is a document disclosing a communication method using a network device having a NAT function (for example, see Patent Document 1).

REC3489 “STUN-Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs)” March 2003REC3489 “STUN-Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs)” March 2003 特開2005−117587号公報JP 2005-117487 A

しかしながら、STUN技術によっても端末間で通信ができない場合がある。これは、規格が詳細な部分まで規定されていなかったり、ルータによって実装する部分が異なるためである。また、通信経路の途中に、UDP(User Datagram Protocol)による通信が行えないファイアウォールが接続されていると、端末間で通信することができない。即ち、通信を行う2つ以上の端末がある場合に、それらの端末の間に、NAT機能が存在するネットワーク機器(ルータ等)が接続されている場合、通信を行うことができなかった(所謂、NAT越え問題)。又は端末の間に、ファイアウォール機能が存在するネットワーク機器(WEBプロキシサーバ等)が接続されている場合、通信を行うことができなかった(所謂、ファイアウォール越え問題)。   However, communication may not be possible between terminals even with the STUN technology. This is because the standard is not stipulated in detail, or the parts to be implemented differ depending on the router. Further, if a firewall that cannot perform UDP (User Datagram Protocol) communication is connected in the middle of the communication path, communication between terminals cannot be performed. That is, when there are two or more terminals that perform communication and a network device (router or the like) having a NAT function is connected between the terminals, the communication cannot be performed (so-called “so-called”). , NAT traversal problem). Alternatively, when a network device (WEB proxy server or the like) having a firewall function is connected between terminals, communication cannot be performed (so-called firewall traversal problem).

従来、これらのNAT越え問題及びファイアウォール越え問題に対処するために、図9の端末11に実装されているアプリケーションを、NAT越え及びファイアウォール越え用の市販のSDK(Software Development Kit)等を使用して変更する必要があった。さらに、NAT越え問題及びファイアウォール越え問題に対処するためには、図9のルータ13等の設定を変更する必要があった。従って、NAT越え及びファイアウォール越えの通信は、ネットワーク環境にインパクトを与えなければ行えないという点において、上記従来技術には未だ改善の余地があった。   Conventionally, in order to deal with these NAT traversal problems and firewall traversal problems, an application installed in the terminal 11 of FIG. 9 is used by using a commercially available SDK (Software Development Kit) for NAT traversal and firewall traversal. There was a need to change. Furthermore, in order to cope with the NAT traversal problem and the firewall traversal problem, it is necessary to change the settings of the router 13 and the like in FIG. Therefore, there is still room for improvement in the above prior art in that communication over NAT and firewall cannot be performed without impacting the network environment.

本発明は、このような状況に鑑みてなされたもので、その目的とするところは、ネットワーク環境において、簡易な構成で確実にP2Pアプリケーションを実行可能とする通信方法及び通信装置を提供することにある。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide a communication method and a communication apparatus that can reliably execute a P2P application with a simple configuration in a network environment. is there.

このような目的を達成するために、本発明の通信方法(図1、3)は、NAT機能を有する第1のネットワーク機器(13)に接続された第1のコンピュータ(11)と、NAT機能を有する第2のネットワーク機器(14)に接続された第2のコンピュータ(12)との間でP2P型通信を行うための通信方法であって、第1のプライベートアドレスとは別に割り当てられた論理的なIPアドレスである第1の仮想IPアドレスを割り当てられた第1の通信装置(17)が、前記第1のネットワーク機器と前記第1のコンピュータとの間に接続されており、第2のプライベートアドレスとは別に割り当てられた論理的なIPアドレスである第2の仮想IPアドレスを割り当てられた第2の通信装置(18)が、前記第2のネットワーク機器と前記第2のコンピュータとの間に接続されており、前記第1の通信装置が、ヘッダに前記第2の仮想IPアドレスを含むパケットを前記第1のコンピュータから受信する第1の受信ステップ(S306→S316)と、前記第1の通信装置が、前記第1の受信ステップにおいて受信したパケットに前記第1の仮想IPアドレスを設定し、該パケットをNAT越え機能(図4、5)を使用して前記第1のネットワーク機器を介し前記第2のコンピュータに向けて送信する第1の送信ステップ(S316〜S322)と、前記第1の通信装置が、前記第1の送信ステップの後に、前記第1の仮想IPアドレス及び前記第2の仮想IPアドレスを含むパケットを前記第1のネットワーク機器から受信する第2の受信ステップ(S306→S308)と、前記第1の通信装置が、前記第2の受信ステップにおいて受信したパケットのヘッダに前記第2の仮想IPアドレスを設定し、該パケットを前記第1のコンピュータに向けて送信する第2の送信ステップ(S308〜S314)とを備えることを特徴とする。   In order to achieve such an object, a communication method (FIGS. 1 and 3) according to the present invention includes a first computer (11) connected to a first network device (13) having a NAT function, and a NAT function. A communication method for performing P2P communication with a second computer (12) connected to a second network device (14) having a logic assigned separately from the first private address A first communication device (17) assigned a first virtual IP address, which is a typical IP address, is connected between the first network device and the first computer; A second communication device (18) to which a second virtual IP address, which is a logical IP address assigned separately from a private address, is assigned to the second network device. A first receiving step (S306), connected to the second computer, wherein the first communication device receives a packet including the second virtual IP address in a header from the first computer. → S316), the first communication device sets the first virtual IP address to the packet received in the first reception step, and uses the NAT traversal function (FIGS. 4 and 5) for the packet. A first transmission step (S316 to S322) for transmitting to the second computer via the first network device, and the first communication device, after the first transmission step, A second receiving step (S306 → S308) for receiving a packet including one virtual IP address and the second virtual IP address from the first network device; And the first communication device sets the second virtual IP address in the header of the packet received in the second reception step, and transmits the packet to the first computer. A transmission step (S308 to S314).

また、上記目的を達成するために、本発明のプログラムは、上記に記載の通信方法の各ステップをコンピュータに実行させることを特徴とする。   In order to achieve the above object, a program according to the present invention causes a computer to execute each step of the communication method described above.

また、上記目的を達成するために、本発明の通信装置(17)は、NAT機能を有する第1のネットワーク機器に接続された第1のコンピュータと、NAT機能を有する第2のネットワーク機器に接続された第2のコンピュータとの間でP2P型通信を行うための通信システム(図1)の通信装置であって、前記通信装置は、第1のプライベートアドレスとは別に割り当てられた論理的なIPアドレスである第1の仮想IPアドレスを割り当てられ、前記第1のネットワーク機器と前記第1のコンピュータとの間に接続されており、前記通信システムは、第2のプライベートアドレスとは別に割り当てられた論理的なIPアドレスである第2の仮想IPアドレスを割り当てられ、前記第2のネットワーク機器と前記第2のコンピュータとの間に接続された他の通信装置(18)を含み、前記通信装置は、ヘッダに前記第2の仮想IPアドレスを含むパケットを前記第1のコンピュータから受信する第1の受信手段と、前記第1の受信手段によって受信したパケットに前記第1の仮想IPアドレスを設定し、該パケットをNAT越え機能を使用して前記第1のネットワーク機器を介し前記第2のコンピュータに向けて送信する第1の送信手段と、前記第1の送信手段による送信の後に、前記第1の仮想IPアドレス及び前記第2の仮想IPアドレスを含むパケットを前記第1のネットワーク機器から受信する第2の受信手段と、前記第2の受信手段によって受信したパケットのヘッダに前記第2の仮想IPアドレスを設定し、該パケットを前記第1のコンピュータに向けて送信する第2の送信手段とを備えたことを特徴とする。   In order to achieve the above object, the communication device (17) of the present invention is connected to the first computer connected to the first network device having the NAT function and the second network device having the NAT function. 1 is a communication device of a communication system (FIG. 1) for performing P2P type communication with a second computer that has been assigned a logical IP assigned separately from the first private address. A first virtual IP address, which is an address, is assigned and connected between the first network device and the first computer, and the communication system is assigned separately from a second private address A second virtual IP address, which is a logical IP address, is allocated between the second network device and the second computer. Another communication device (18) connected, wherein the communication device receives a packet including the second virtual IP address in a header from the first computer; and First transmission for setting the first virtual IP address in the packet received by the receiving means, and transmitting the packet to the second computer via the first network device using the NAT traversal function And second receiving means for receiving a packet including the first virtual IP address and the second virtual IP address from the first network device after transmission by the first transmitting means, The second virtual IP address is set in the header of the packet received by the second receiving means, and the packet is transmitted to the first computer. Characterized in that a transmission means.

なお、特許請求の範囲の構成要素と対応する実施形態中の図中符号等を()で示した。ただし、特許請求の範囲に記載した構成要素は上記()部の実施形態の構成要素に限定されるものではない。   In addition, the code | symbol etc. in the figure in embodiment corresponding to the component of a claim are shown by (). However, the constituent elements described in the claims are not limited to the constituent elements in the embodiment of the above () part.

以上の構成により、本発明の通信機器は、設置先のネットワーク環境にインパクトを与えずに導入できる。また、端末(上記第1のコンピュータ)に割り当てられるIPアドレスは従来どおり既に設置されていた上記第1のネットワーク機器(ルータ)がNAT機能の変換テーブルで割り当てたものを利用でき、端末は同ネットワークに設置されている既存の端末(他のPCやプリンター等)と設定変更なく通信することが可能になる。   With the above configuration, the communication device of the present invention can be introduced without impacting the network environment of the installation destination. Further, the IP address assigned to the terminal (the first computer) can be the one assigned by the first network device (router) that has already been installed in the conventional manner in the conversion table of the NAT function. It is possible to communicate with existing terminals (other PCs, printers, etc.) installed in the PC without changing settings.

本発明によれば、ネットワーク環境において、簡易な構成で確実にP2Pアプリケーションを実行可能にするという効果を奏する。   According to the present invention, it is possible to reliably execute a P2P application with a simple configuration in a network environment.

以下、図面を参照して本発明の実施形態を詳細に説明する。なお、各図面において同じ機能を有する箇所には同一の符号を付す。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In addition, the same code | symbol is attached | subjected to the location which has the same function in each drawing.

[装置構成]
図1は、本実施形態のP2P通信方法の説明図である。図1を参照し、端末11、12間のパケット通信について説明する。端末11、12等は、PCやプリンター等であり、搭載されたプロセッサがプログラムに従って動作することに鑑み、広義のコンピュータシステムである。
[Device configuration]
FIG. 1 is an explanatory diagram of the P2P communication method of the present embodiment. The packet communication between the terminals 11 and 12 will be described with reference to FIG. The terminals 11, 12 and the like are PCs, printers, and the like, and are computer systems in a broad sense in view of the installed processor operating according to a program.

ルータ13、14には、NAT(NAPT)機能が実装されており、プライベートアドレス/ポート番号のペアとグローバルアドレスとの対応・変換の関係を規定した変換テーブルが格納されている。ルータ13、14は、各々グローバルアドレス「M」、「N」を有する。端末11には、ルータ13によってプライベートアドレス「A」とポート「100」とが割り当てられている。端末12には、ルータ14によってプライベートアドレス「B」とポート「200」とが割り当てられている。   The routers 13 and 14 have a NAT (NAPT) function, and store a conversion table that defines the correspondence / translation relationship between a private address / port number pair and a global address. The routers 13 and 14 have global addresses “M” and “N”, respectively. A private address “A” and a port “100” are assigned to the terminal 11 by the router 13. A private address “B” and a port “200” are assigned to the terminal 12 by the router 14.

図中符号17、18は本実施形態に特徴的な通信装置であって、本実施形態ではNNM(Nomadic Node Module)と呼ぶ。NNM17には、ルータ13によってプライベートアドレス「P」とポート「100」とが割り当てられており、さらにプライベートアドレス「P」とは別に論理的なIPアドレス「X」が割り当てられている。このプライベートアドレスとは別に割り当てられる論理的なIPアドレスを、本実施形態においては「仮想IPアドレス」と呼び、NNM17には、仮想IPアドレス「X」が割り当てられている。仮想IPアドレスの取得方法については、後述する。   Reference numerals 17 and 18 in the figure denote communication devices that are characteristic of the present embodiment, and are referred to as NNM (Nomadic Node Module) in the present embodiment. A private address “P” and a port “100” are assigned to the NNM 17 by the router 13, and a logical IP address “X” is assigned separately from the private address “P”. A logical IP address assigned separately from this private address is called a “virtual IP address” in the present embodiment, and a virtual IP address “X” is assigned to the NNM 17. A method for acquiring the virtual IP address will be described later.

NNM18には、ルータ14によってプライベートアドレス「Q」とポート「200」とが割り当てられており、さらに仮想IPアドレス「Y」が割り当てられている。各NNMは、NAT越え及びファイアウォール越え用の市販のSDK等を組み込み作成したNNMプログラムを実装している。NNMプログラムの処理内容については、後述する。   A private address “Q” and a port “200” are assigned to the NNM 18 by the router 14, and a virtual IP address “Y” is further assigned. Each NNM implements an NNM program created by incorporating a commercially available SDK for NAT traversal and firewall traversal. The processing contents of the NNM program will be described later.

セッション管理サーバ25は、ソケット(ポート番号+仮想IPアドレス+グローバルアドレス)のデータを格納している。セッション管理サーバ25のソケットの格納については後述する。   The session management server 25 stores socket (port number + virtual IP address + global address) data. The storage of the socket of the session management server 25 will be described later.

また、端末11、NNM17、及びルータ13を含むLAN内には、ファイアウォール機能が存在するWEBプロキシサーバ(不図示)が接続されている。同様に、端末12、NNM18、及びルータ14を含むLAN内にも、ファイアウォール機能が存在する別のWEBプロキシサーバ(不図示)が接続されている。   A WEB proxy server (not shown) having a firewall function is connected to the LAN including the terminal 11, the NNM 17, and the router 13. Similarly, another WEB proxy server (not shown) having a firewall function is also connected to the LAN including the terminal 12, the NNM 18, and the router 14.

ここで端末11からインターネットを介し別なLAN内の端末12(グローバルアドレスNのルータ14に接続されている)へ、NNM17、ルータ13、14、及びNNM18を介してパケットを送信する。端末11から送信されるパケット30のIPヘッダには、宛先アドレス21として仮想IPアドレス「Y」、送信元アドレス22として「A」が書き込まれ、TCPヘッダまたはUDPヘッダには、宛先ポート番号23として「200」、送信元ポート番号24として「100」が書き込まれている。宛先アドレス21としての仮想IPアドレス「Y」は、端末11によってセッション管理サーバ25から宛先ポート番号「200」をキーとして取得される。   Here, the packet is transmitted from the terminal 11 to the terminal 12 in another LAN (connected to the router 14 with the global address N) via the Internet via the NNM 17, the routers 13 and 14, and the NNM 18. In the IP header of the packet 30 transmitted from the terminal 11, the virtual IP address “Y” is written as the destination address 21 and “A” is written as the source address 22, and the destination port number 23 is written in the TCP header or UDP header. “200” and “100” are written as the source port number 24. The virtual IP address “Y” as the destination address 21 is acquired by the terminal 11 from the session management server 25 using the destination port number “200” as a key.

NNM17は、宛先グローバルアドレス(仮想IPアドレス)「Y」をペイロードに設定し、不図示のRAM(random access memory)に格納されている送信元仮想IPアドレス「X」を取得し、ペイロードに設定する。送信元仮想IPアドレス「X」のRAMへの格納については後述する。NNM17は、宛先グローバルアドレス「N」、送信元アドレスとしてプライベートアドレス「P」を取得し、ヘッダに設定する。宛先グローバルアドレス「N」は、NNM17によってセッション管理サーバ25から宛先ポート番号「200」をキーとして取得される。プライベートアドレス「P」は、予めルータ13によって割り当てられている。そしてNNM17は、NAT越え及びファイアウォール越え用のSDK等の機能を用いて、NNM18へ向けパケットを転送する。   The NNM 17 sets the destination global address (virtual IP address) “Y” in the payload, acquires the source virtual IP address “X” stored in a RAM (random access memory) (not shown), and sets it in the payload. . The storage of the transmission source virtual IP address “X” in the RAM will be described later. The NNM 17 acquires the destination global address “N” and the private address “P” as the source address, and sets them in the header. The destination global address “N” is acquired by the NNM 17 from the session management server 25 using the destination port number “200” as a key. The private address “P” is assigned in advance by the router 13. Then, the NNM 17 transfers the packet to the NNM 18 by using a function such as an SDK for NAT traversal and firewall traversal.

ルータ13は、変換テーブルを参照して、送信元アドレスのプライベートアドレス「P」をルータ13のグローバルアドレス「M」に変換し、ルータ14に向けてパケットを送信する。   The router 13 refers to the conversion table, converts the private address “P” of the transmission source address to the global address “M” of the router 13, and transmits the packet to the router 14.

次に、端末12から端末11へ、NNM18、ルータ14、13、及びNNM17を介してパケットを送信する。端末12から送信されるパケットのヘッダには、宛先アドレス31として仮想IPアドレス「X」、送信元アドレス32として「B」が書き込まれ、TCPヘッダまたはUDPヘッダには、宛先ポート番号33として「100」、送信元ポート番号34として「200」が書き込まれている。これに次ぐNNM18の処理は、上述したNNM17と同様である。   Next, the packet is transmitted from the terminal 12 to the terminal 11 via the NNM 18, the routers 14 and 13, and the NNM 17. In the header of the packet transmitted from the terminal 12, the virtual IP address “X” is written as the destination address 31 and “B” is written as the source address 32, and “100” is set as the destination port number 33 in the TCP header or UDP header. "200" is written as the source port number 34. Subsequent processing of the NNM 18 is the same as that of the NNM 17 described above.

ルータ14は、変換テーブルを参照して、送信元アドレスのプライベートアドレス「Q」をルータ14のグローバルアドレス「N」に変換し、ルータ13に向けてパケットを送信する。   The router 14 refers to the conversion table, converts the private address “Q” of the source address to the global address “N” of the router 14, and transmits the packet to the router 13.

ルータ13は、変換テーブルを参照して、宛先アドレス31のグローバルアドレス「M」をプライベートアドレス「P」に変換し、LAN内のNNM17に向けてパケット40を送信する。   The router 13 refers to the conversion table, converts the global address “M” of the destination address 31 to the private address “P”, and transmits the packet 40 toward the NNM 17 in the LAN.

NNM17は、ペイロードから宛先仮想IPアドレス「X」を削除し、ペイロードの送信元仮想IPアドレス「Y」を送信元アドレスとしてヘッダに設定する。そしてNNM17は、宛先プライベートアドレス「A」を取得し、宛先アドレスとしてヘッダに設定し、そのパケットを端末11へ送信する。接続されている端末11のプライベートアドレス「A」の取得については、後述する。   The NNM 17 deletes the destination virtual IP address “X” from the payload, and sets the payload source virtual IP address “Y” as a source address in the header. The NNM 17 acquires the destination private address “A”, sets the destination address in the header, and transmits the packet to the terminal 11. Acquisition of the private address “A” of the connected terminal 11 will be described later.

通常の通信ではNNM17は、ルータ13からDHCP(dynamic host configuration protocol)によるIP取得を行うブリッジとして動作する。NNM17にはルータ13が割り当てる実IPアドレス(プライベートアドレス「P」)とは別に論理的なIPアドレス(仮想IPアドレス「X」)を新たに割り当てる。NNM同士がお互いに通信する際は仮想IPアドレスを指定して行う。仮想IPアドレス間の通信は市販のSDK等によるNAT越え及びファイアウォール越えのセッションを張り、そのセッション上でパケットをトンネリングさせることで通信が行われる。   In normal communication, the NNM 17 operates as a bridge that acquires IP from the router 13 by DHCP (dynamic host configuration protocol). A logical IP address (virtual IP address “X”) is newly assigned to the NNM 17 separately from the real IP address (private address “P”) assigned by the router 13. When NNMs communicate with each other, a virtual IP address is designated. Communication between virtual IP addresses is performed by setting up a session over NAT and firewall over a commercially available SDK or the like and tunneling packets over the session.

端末11は、NNM17を接続することで、NNM17に割り当てられている仮想IPアドレス「X」で他のネットワーク上の端末からアクセス可能である。NNM17は、この仮想IPアドレス「X」を設けることで、端末11上で動作する既存のアプリケーションに影響(改変等)を与えずにNAT越え及びファイアウォール越えの通信が行えることに特徴がある。   By connecting the NNM 17, the terminal 11 can be accessed from terminals on other networks with the virtual IP address “X” assigned to the NNM 17. The NNM 17 is characterized in that by providing this virtual IP address “X”, communication across NAT and firewall can be performed without affecting (modifying) existing applications running on the terminal 11.

[動作説明]
次に、図1を参照し上述した端末11、12間のパケット通信における、NNM17の不図示のCPU(central processing unit)が実行する通信制御処理の主な手順を説明する。
[Description of operation]
Next, a main procedure of communication control processing executed by a CPU (central processing unit) (not shown) of the NNM 17 in the packet communication between the terminals 11 and 12 described above with reference to FIG.

本実施形態のNNM17の上述した動作に関わる処理は、図2〜8のフローチャートや通信方法の説明図に示す処理手順により行われる。これらの処理手順は、NNM17のCPUが、ROM(read only memory)に記憶されているNNMプログラムを読み出して実行することにより行われる処理である。   Processing related to the above-described operation of the NNM 17 of this embodiment is performed according to the processing procedure shown in the flowcharts of FIGS. These processing procedures are processes performed when the CPU of the NNM 17 reads and executes an NNM program stored in a ROM (read only memory).

図2は、ルータ13、セッション管理サーバ25等が既に立ち上がっている状況において、端末11及びNNM17の電源をONとした場合の、NNM17のNNMパワーON処理を示すフローチャートである。   FIG. 2 is a flowchart showing the NNM power ON process of the NNM 17 when the power of the terminal 11 and the NNM 17 is turned on in a situation where the router 13, the session management server 25, etc. are already started up.

NNM17は電源がONとなると、接続されている端末11からのネゴシエーションのパケットを受信する(ステップS200)。端末11からのネゴシエーションとしては、DHCPによるルータ13からのプライベートアドレス「A」取得、ARP(Address Resolution Protocol)リクエスト等がある。次いで、NNM17は、受信パケットから、接続されている端末11のプライベートアドレス「A」を認識し、RAMに格納する(ステップS202)。尚、この段階で、NNM17は、ルータ13から自身のプライベートアドレス「P」を取得し、RAMに格納する
次にステップS204において、NNM17は、仮想IPアドレスの取得方法によって処理を分岐する。例えば、仮想IPアドレスの取得方法設定は、NNMに実装されたDIPスイッチ等で切り替え選択可能とする等、周知の設定手段を適用すればよい。
When the power is turned on, the NNM 17 receives a negotiation packet from the connected terminal 11 (step S200). Negotiations from the terminal 11 include obtaining a private address “A” from the router 13 by DHCP, an ARP (Address Resolution Protocol) request, and the like. Next, the NNM 17 recognizes the private address “A” of the connected terminal 11 from the received packet, and stores it in the RAM (step S202). At this stage, the NNM 17 acquires its own private address “P” from the router 13 and stores it in the RAM. Next, in step S204, the NNM 17 branches the process according to the virtual IP address acquisition method. For example, the setting method for acquiring the virtual IP address may be a known setting means such as enabling switching selection with a DIP switch or the like mounted on the NNM.

NNM内の設定ファイルによって仮想IPアドレスを取得する場合、NNM17は、NNM内の設定ファイルから、それに予め設定されている仮想IPアドレス「X」を取得し、RAMに格納する(ステップS206)。NNM17は、ルータ13に問い合わせルータの変換テーブルに設定されている自身のポート番号「100」、グローバルアドレス「M」を取得し、RAMに格納する(ステップS208)。そしてNNM17は、ソケット(ポート番号「100」+仮想IPアドレス「X」+グローバルアドレス「M」)をセッション管理サーバ25へ送信し格納する。   When acquiring the virtual IP address by the setting file in the NNM, the NNM 17 acquires the virtual IP address “X” set in advance from the setting file in the NNM and stores it in the RAM (step S206). The NNM 17 acquires its own port number “100” and global address “M” set in the conversion table of the inquiry router to the router 13 and stores them in the RAM (step S208). The NNM 17 transmits the socket (port number “100” + virtual IP address “X” + global address “M”) to the session management server 25 and stores it.

セッション管理サーバ25から仮想IPアドレスを取得する場合、NNM17は、ルータ13に問い合わせルータの変換テーブルに設定されている自身のポート番号「100」を取得し、RAMに格納する(ステップS212)。NNM17は、セッション管理サーバ25へポート番号「100」に対する仮想IPアドレス割り当てをリクエストする(ステップS214)。そしてNNM17は、予めセッション管理サーバ25に格納されているソケット(ポート番号「100」+仮想IPアドレス「X」+グローバルアドレス「M」)を取得する(ステップS216)。NNM17は、取得したソケットから仮想IPアドレス「X」、グローバルアドレス「M」を取得し、RAMに格納する(ステップS218)。   When acquiring the virtual IP address from the session management server 25, the NNM 17 acquires its own port number “100” set in the conversion table of the inquiry router from the router 13, and stores it in the RAM (step S212). The NNM 17 requests the session management server 25 to allocate a virtual IP address for the port number “100” (step S214). Then, the NNM 17 acquires a socket (port number “100” + virtual IP address “X” + global address “M”) stored in advance in the session management server 25 (step S216). The NNM 17 acquires the virtual IP address “X” and the global address “M” from the acquired socket, and stores them in the RAM (step S218).

NNM同士の通信によって仮想IPアドレスを取得する場合、NNM17は、自LAN内のNNM同士のネゴシエーションにより、所定の仮想IPアドレス空間における空き仮想IPアドレス認識をする(ステップS220)。NNM17は、空き仮想IPアドレスのうちの最若番の仮想IPアドレス(この例では「X」)を取得し、RAMに格納する(ステップS222)。そしてNNM17は、ルータ13に問い合わせルータの変換テーブルに設定されている自身のポート番号「100」、グローバルアドレス「M」を取得し、RAMに格納する(ステップS224)。NNM17は、ソケット(ポート番号「100」+仮想IPアドレス「X」+グローバルアドレス「M」)をセッション管理サーバ25へ送信し格納する(ステップS226)。   When acquiring a virtual IP address by communication between NNMs, the NNM 17 recognizes a free virtual IP address in a predetermined virtual IP address space by negotiation between NNMs in its own LAN (step S220). The NNM 17 acquires the youngest virtual IP address (in this example, “X”) among the free virtual IP addresses, and stores it in the RAM (step S222). Then, the NNM 17 acquires its own port number “100” and global address “M” set in the conversion table of the inquiry router to the router 13 and stores them in the RAM (step S224). The NNM 17 transmits the socket (port number “100” + virtual IP address “X” + global address “M”) to the session management server 25 and stores it (step S226).

図3は、NNM17の電源をONとした後の通常状態における、NNM17のNNM通常処理を示すフローチャートである。   FIG. 3 is a flowchart showing the NNM normal processing of the NNM 17 in the normal state after turning on the power of the NNM 17.

NNM17は、パケットの受信を検知すると受信パケットが仮想IPアドレス宛のパケットか否かを判定する(ステップS300→S302)。即ち、ステップS302において、NNM17は、仮想IPアドレスに固有のネットワークセグメント(例:10.0.0.0/8)内のIPアドレスが受信パケットに設定されている場合、そのIPアドレスを仮想IPアドレスと判定し、受信パケットは仮想IPアドレス宛のパケットであると判定する。例えば、NNM17は、図1に示したパケット30又は40のようにIPアドレス「Y」又は「X、Y」が受信パケットに設定されている場合、それらのIPアドレスを仮想IPアドレス「Y」又は「X、Y」と判定し、パケット30又は40は仮想IPアドレス宛のパケットであると判定する。   When the NNM 17 detects reception of a packet, the NNM 17 determines whether the received packet is a packet addressed to the virtual IP address (steps S300 → S302). That is, in step S302, if the IP address in the network segment (eg, 10.0.0.0/8) unique to the virtual IP address is set in the received packet, the NNM 17 determines that the IP address is the virtual IP address. The received packet is determined to be a packet addressed to the virtual IP address. For example, when the IP address “Y” or “X, Y” is set in the received packet as in the packet 30 or 40 shown in FIG. 1, the NNM 17 changes the IP address to the virtual IP address “Y” or It is determined as “X, Y”, and it is determined that the packet 30 or 40 is a packet addressed to the virtual IP address.

NNM17は、ステップS302において受信パケットが仮想IPアドレス宛のパケットでないと判定した場合、受信パケットをそのまま受信側と反対側のネットワークに転送する(ステップS304)。   If the NNM 17 determines in step S302 that the received packet is not a packet addressed to the virtual IP address, the NNM 17 transfers the received packet as it is to the network on the opposite side of the receiving side (step S304).

NNM17は、ステップS302において受信パケットが仮想IPアドレス宛のパケットであると判定した場合、図2のステップS202の処理で取得した接続されている端末11のプライベートアドレス「A」に基づいて、受信パケットが端末11宛のパケットか否かを判定する(ステップS306)。例えば、NNM17は、図1に示したパケット30のように、送信元アドレス22として端末11のプライベートアドレス「A」が受信パケットに設定されている場合、受信パケットは端末11から他のNNM宛のパケットであると判定する。また例えば、NNM17は、図1に示したパケット40のように、端末11のプライベートアドレス「A」が受信パケットに設定されていない場合、受信パケットは端末11宛のパケットであると判定する。   When the NNM 17 determines in step S302 that the received packet is a packet addressed to the virtual IP address, the NNM 17 receives the received packet based on the private address “A” of the connected terminal 11 acquired in the process of step S202 in FIG. Is a packet addressed to the terminal 11 (step S306). For example, if the private address “A” of the terminal 11 is set as the transmission source address 22 in the reception packet as in the packet 30 shown in FIG. 1, the NNM 17 transmits the reception packet from the terminal 11 to another NNM. Judged to be a packet. Further, for example, the NNM 17 determines that the received packet is a packet addressed to the terminal 11 when the private address “A” of the terminal 11 is not set in the received packet as in the packet 40 illustrated in FIG. 1.

ステップS306において受信パケットが端末11から他のNNM宛のパケットである場合、図1の例を参照しながら説明する。端末11から送信されるパケット30のIPヘッダには、宛先アドレス21として仮想IPアドレス「Y」、送信元アドレス22として「A」が書き込まれ、TCPヘッダまたはUDPヘッダには、宛先ポート番号23として「200」、送信元ポート番号24として「100」が書き込まれている。NNM17は、宛先グローバルアドレス(仮想IPアドレス)「Y」をペイロードに設定する(ステップS316)。次いでNNM17は、RAMに格納されている送信元仮想IPアドレス「X」を取得し、ペイロードに設定する(ステップS318)。送信元仮想IPアドレス「X」のRAMへの格納は、図2を参照し前述した処理によって行われる。   A case where the received packet is a packet addressed to another NNM from the terminal 11 in step S306 will be described with reference to the example of FIG. In the IP header of the packet 30 transmitted from the terminal 11, the virtual IP address “Y” is written as the destination address 21 and “A” is written as the source address 22, and the destination port number 23 is written in the TCP header or UDP header. “200” and “100” are written as the source port number 24. The NNM 17 sets the destination global address (virtual IP address) “Y” in the payload (step S316). Next, the NNM 17 acquires the source virtual IP address “X” stored in the RAM, and sets it in the payload (step S318). The storage of the transmission source virtual IP address “X” in the RAM is performed by the process described above with reference to FIG.

そしてNNM17は、宛先グローバルアドレス「N」、送信元アドレスとしてプライベートアドレス「P」を取得し、ヘッダに設定する(ステップS320)。宛先グローバルアドレス「N」は、NNM17によってセッション管理サーバ25から宛先ポート番号「200」をキーとして取得される。プライベートアドレス「P」は、予めルータ13によって割り当てられている。そしてNNM17は、NAT越え及びファイアウォール越え用のSDK等の機能を用いて、NNM18へ向けパケットを転送する(ステップS322)。ステップS322の処理の詳細については後述する。   The NNM 17 acquires the destination global address “N” and the private address “P” as the transmission source address, and sets them in the header (step S320). The destination global address “N” is acquired by the NNM 17 from the session management server 25 using the destination port number “200” as a key. The private address “P” is assigned in advance by the router 13. Then, the NNM 17 transfers the packet to the NNM 18 by using a function such as an SDK for NAT traversal and firewall traversal (step S322). Details of the processing in step S322 will be described later.

ステップS306において受信パケットが端末11宛のパケットである場合、図1の例を参照しながら説明する。ルータ13から送信されるパケット40のヘッダには、宛先アドレスとしてプライベートアドレス「P」、送信元アドレスとしてグローバルアドレス「N」が書き込まれ、TCPヘッダまたはUDPヘッダには、宛先ポート番号として「100」、送信元ポート番号として「200」が書き込まれている。さらに宛先グローバルアドレス(仮想IPアドレス)「X」がペイロードに設定され、送信元仮想IPアドレス「Y」がペイロードに設定されている。NNM17は、ペイロードから宛先仮想IPアドレス「X」を削除する(ステップS308)。次いでNNM17は、ペイロードの送信元仮想IPアドレス「Y」を送信元アドレスとしてヘッダに設定する(ステップS310)。   A case where the received packet is a packet addressed to the terminal 11 in step S306 will be described with reference to the example of FIG. In the header of the packet 40 transmitted from the router 13, the private address “P” is written as the destination address and the global address “N” is written as the source address, and “100” is set as the destination port number in the TCP header or UDP header. “200” is written as the transmission source port number. Furthermore, the destination global address (virtual IP address) “X” is set in the payload, and the source virtual IP address “Y” is set in the payload. The NNM 17 deletes the destination virtual IP address “X” from the payload (step S308). Next, the NNM 17 sets the source virtual IP address “Y” of the payload as a source address in the header (step S310).

そしてNNM17は、図2のステップS202の処理で取得した接続されている端末11のプライベートアドレス「A」を、宛先アドレスとしてヘッダに設定する(ステップS312)。NNM17は、このように編集されたパケットを端末11へ転送する(ステップS314)。   The NNM 17 sets the private address “A” of the connected terminal 11 acquired in the process of step S202 in FIG. 2 in the header as a destination address (step S312). The NNM 17 transfers the packet edited in this way to the terminal 11 (step S314).

以下では、図3におけるステップS322の処理(NAT越え及びファイアウォール越え用のSDK等の機能を用いて、NNM18へ向けパケットを転送する処理)について説明する。NAT越え及びファイアウォール越え用の市販のSDK等を使用する方法は、当業者にあっては種々の方法が周知であるため、本実施形態に好適な例についてそれらの概要を説明する。   In the following, the process of step S322 in FIG. 3 (process of transferring a packet to the NNM 18 using a function such as a NAT traversal and firewall traversal SDK) will be described. Since various methods are well known to those skilled in the art using commercially available SDKs for NAT traversal and firewall traversal, their outlines will be described with reference to an example suitable for this embodiment.

ステップS322の処理の冒頭で、NNM17は、NAT及びファイアウォールの設置状況を検知する。この検知には当業者に周知な種々の方法を適用すればよい。NAT越えが必要な場合、NNM17は、後述の図4及び5に示す処理を行う。ファイアウォール越えが必要な場合、NNM17は、後述の図6〜8に示す処理を行う。   At the beginning of the process of step S322, the NNM 17 detects the installation status of the NAT and firewall. Various methods well known to those skilled in the art may be applied to this detection. When NAT traversal is necessary, the NNM 17 performs processing shown in FIGS. When it is necessary to cross the firewall, the NNM 17 performs processing shown in FIGS.

図4及び5は、NAT越え処理の本実施形態に好適な一例を示した、NNMのNAT越え処理の説明図で、特許文献1に開示された技術を適用した例である。NAT機能を利用した接続環境において、P2Pアプリケーションを実現するためには、通信の開始から終了まで、ルータにおける所定のポートを常に開いておく必要がある。そこで、図4を参照し通信の最初にポートを開いておく方法、図5を参照し一旦開いたポートを維持する方法を順次説明する。   4 and 5 are explanatory diagrams of the NAT traversal processing of NNM, showing an example suitable for this embodiment of the NAT traversal processing, and an example to which the technique disclosed in Patent Document 1 is applied. In order to realize a P2P application in a connection environment using the NAT function, it is necessary to always open a predetermined port in the router from the start to the end of communication. A method for opening a port at the beginning of communication with reference to FIG. 4 and a method for maintaining a port once opened with reference to FIG.

図4を参照すると、端末間でP2P通信を行う場合には、ICMP(Internet Control Message Protocol)パケット(宛先到達不能メッセージ)によるブロックを避けて、最初に、セッションで使用するルータのポートを開いておく必要がある。そこで、ルータ13までのホップ数を調べ、ポートを開けるためのUDPパケットを送信する。   Referring to FIG. 4, when performing P2P communication between terminals, avoid blocking by ICMP (Internet Control Message Protocol) packet (destination unreachable message), and first open the router port used in the session. It is necessary to keep. Therefore, the number of hops to the router 13 is checked, and a UDP packet for opening a port is transmitted.

具体的には、NNM17でICMPのエコーパケットを生成し、TTL(Time To Live)=1で送信する。順次、TTL=2.3…と増やして、複数のエコーパケットを送信する。TTLの数値がルータ13のホップ数と等しいエコーパケット51を送信すると、ルータ13よりエコーパケット52がNNM17に返送される。NNM17は、返送されたエコーパケット52により、ルータ13までのホップ数を知ることができる。   Specifically, the NNM 17 generates an ICMP echo packet and transmits it with TTL (Time To Live) = 1. Sequentially increasing TTL = 2.3... And transmitting a plurality of echo packets. When an echo packet 51 having a TTL value equal to the number of hops of the router 13 is transmitted, the echo packet 52 is returned from the router 13 to the NNM 17. The NNM 17 can know the number of hops to the router 13 from the returned echo packet 52.

次に、NNM17は、ルータ13のホップ数に1を加えた値αをTTLに設定し、送信元ポート番号「100」のポート設定パケット53を送信する。これによって、ルータ13の送信元ポート番号「100」のポートが開かれる。ポート設定パケット53は、ルータ13の次のホップで削除されるので、他の通信に影響を与えることはない。   Next, the NNM 17 sets a value α obtained by adding 1 to the number of hops of the router 13 to the TTL, and transmits the port setting packet 53 of the transmission source port number “100”. As a result, the port of the transmission source port number “100” of the router 13 is opened. Since the port setting packet 53 is deleted at the next hop of the router 13, it does not affect other communications.

このような構成により、ルータ13の送信元ポート番号「100」のポートを開けておくことにより、パケット54、55によるNNM間の通信を行うことができる。このとき、ルータ14もICMPパケットによりブロックを行う機能を有している場合には、NNM18においても、同様の処理を行う。   With such a configuration, communication between the NNMs using the packets 54 and 55 can be performed by opening the port of the transmission source port number “100” of the router 13. At this time, if the router 14 also has a function of blocking by the ICMP packet, the NNM 18 performs the same processing.

次に図5を参照すると、同一のセッションにおいて、パケットの送受信が途絶えている間は、ルータが変換テーブルをクリアしないように、いったん開いたポートを維持しておく必要がある。そこで、パケットの送受信が途絶えている間は、キープアライブパケットを一定時間間隔で送信する。例えば、上述したICMPエコーパケットを利用して、ルータ13までのホップ数を予め調べておく。NNM17は、ルータ13のホップ数に1を加えた値αをTTLに設定し、送信元ポート番号「100」のUDPパケット61を送信する。これによって、ルータ13に格納されている変換テーブルの内容は削除されず、以後、同一のポート番号を設定したパケットを送信することができる。   Next, referring to FIG. 5, while the packet transmission / reception is interrupted in the same session, it is necessary to maintain the opened port so that the router does not clear the conversion table. Therefore, keep-alive packets are transmitted at regular time intervals while packet transmission / reception is interrupted. For example, the number of hops to the router 13 is checked in advance using the ICMP echo packet described above. The NNM 17 sets a value α obtained by adding 1 to the number of hops of the router 13 to the TTL, and transmits the UDP packet 61 of the transmission source port number “100”. As a result, the contents of the conversion table stored in the router 13 are not deleted, and packets with the same port number set can be transmitted thereafter.

尚、図4及び図5の実施形態においては、ICMPパケットによりブロックを行う機能を有しているルータにのみ送信するようにしてもよい。ルータによっては、TTLの設定値がαの場合に、パケットを破棄してポートを閉じてしまう機能を有する場合があるからである。   In the embodiment shown in FIGS. 4 and 5, it may be transmitted only to a router having a function of blocking by an ICMP packet. This is because some routers have a function of discarding a packet and closing a port when the TTL setting value is α.

ポート設定パケットおよびキープアライブパケットが他のNNMに到達した場合に、通信の混乱が起こらないようにする。例えば、図5に示したように、全てのパケットの先頭に、フラグ63、64を付加し、キープアライブパケットの場合は「1」を、通常のパケットの場合は「0」を設定する。このようにして、NNMがキープアライブパケットを受信した場合でも、これを識別して破棄することができる。   When the port setting packet and the keep alive packet reach another NNM, the communication is prevented from being disrupted. For example, as shown in FIG. 5, flags 63 and 64 are added to the head of all packets, and “1” is set for a keep-alive packet and “0” is set for a normal packet. In this way, even when the NNM receives a keep-alive packet, it can be identified and discarded.

図6〜8は、ファイアウォール越え処理の本実施形態に好適な一例を示した、NNMファイアウォール越え処理のフローチャートである。   6 to 8 are flowcharts of the NNM firewall traversal process, showing an example suitable for the present embodiment of the firewall traversal process.

図6において、NNM17は、使用可能な通信方法のサーチを行う(ステップS600)。ステップS600のリターン値がffffH以外、即ちUDPが利用可能なネットワークである場合(ステップS602)、NNM17は、使用可能な通信方法を用いた通信経路の生成を行う(ステップS604)。   In FIG. 6, the NNM 17 searches for a usable communication method (step S600). If the return value of step S600 is other than ffffH, that is, if the network can use UDP (step S602), the NNM 17 generates a communication path using an available communication method (step S604).

図7は、前述したステップS600の通信方法サーチ処理のフローチャートである。NNM17は、UDPを用いてサーバ(不図示のWEBプロキシ)のポート番号nに対して(HTTPやPOP3等のwellknownポート番号以外を利用する)パケットを送信する(ステップS700)。NNM17は、サーバ側の待ち受けポート番号にパケットが届いたか否かを判定する(ステップS702)。サーバ側の待ち受けポート番号にパケットが届いた場合、NNM17は、リターン値=0(UDP通信が利用可能)をRAMに設定し(ステップS704)、呼び出し元の処理へ戻る(リターン)。   FIG. 7 is a flowchart of the communication method search process in step S600 described above. The NNM 17 transmits a packet (using a port other than a well-known port number such as HTTP or POP3) to the port number n of the server (WEB proxy not shown) using UDP (step S700). The NNM 17 determines whether or not the packet has reached the server-side standby port number (step S702). When the packet arrives at the server-side standby port number, the NNM 17 sets a return value = 0 (UDP communication is available) in the RAM (step S704), and returns to the caller process (return).

サーバ側の待ち受けポート番号にパケットが届かない場合、NNM17は、UDPを用いてサーバの(HTTPS通信が利用する)443番ポートに対してパケットを送信する(ステップS706)。NNM17は、サーバ側の待ち受けポート番号にパケットが届いたか否かを判定する(ステップS708)。サーバ側の待ち受けポート番号にパケットが届いた場合、NNM17は、リターン値=1(443番ポート宛のUDP通信が可能)をRAMに設定し(ステップS710)、呼び出し元の処理へ戻る(リターン)。   When the packet does not reach the server-side standby port number, the NNM 17 transmits the packet to the port 443 (used by HTTPS communication) of the server using UDP (step S706). The NNM 17 determines whether a packet has arrived at the server-side standby port number (step S708). When the packet arrives at the standby port number on the server side, the NNM 17 sets a return value = 1 (UDP communication addressed to the port 443 is possible) in the RAM (step S710), and returns to the caller process (return). .

サーバ側の待ち受けポート番号にパケットが届かない場合、NNM17は、UDPを用いてサーバの(HTTP通信が利用する)80番ポートに対してパケットを送信する(ステップS712)。NNM17は、サーバ側の待ち受けポート番号にパケットが届いたか否かを判定する(ステップS714)。サーバ側の待ち受けポート番号にパケットが届いた場合、NNM17は、リターン値=2(80番ポート宛のUDP通信が可能)をRAMに設定し(ステップS716)、呼び出し元の処理へ戻る(リターン)。   If the packet does not reach the server-side standby port number, the NNM 17 transmits the packet to the 80th port (used by HTTP communication) of the server using UDP (step S712). The NNM 17 determines whether or not the packet has reached the server-side standby port number (step S714). When the packet arrives at the standby port number on the server side, the NNM 17 sets a return value = 2 (UDP communication addressed to the 80th port is possible) in the RAM (step S716), and returns to the caller process (return). .

サーバ側の待ち受けポート番号にパケットが届かない場合、NNM17は、TCPを用いてサーバのポート番号nに対して(HTTPやPOP3等のwellknownポート番号以外を利用する)パケットを送信する(ステップS718)。NNM17は、サーバ側の待ち受けポート番号にパケットが届いたか否かを判定する(ステップS720)。サーバ側の待ち受けポート番号にパケットが届いた場合、NNM17は、リターン値=3(TCP通信が利用可能)をRAMに設定し(ステップS722)、呼び出し元の処理へ戻る(リターン)。   When the packet does not reach the server-side standby port number, the NNM 17 transmits a packet (using a port other than the well-known port number such as HTTP or POP3) to the server port number n using TCP (step S718). . The NNM 17 determines whether or not the packet has reached the server-side standby port number (step S720). If the packet arrives at the server-side standby port number, the NNM 17 sets a return value = 3 (TCP communication is available) in the RAM (step S722), and returns to the caller process (return).

サーバ側の待ち受けポート番号にパケットが届かない場合、NNM17は、TCPを用いてサーバの(HTTPS通信が利用する)443番ポートに対してパケットを送信する(ステップS724)。NNM17は、サーバ側の待ち受けポート番号にパケットが届いたか否かを判定する(ステップS726)。サーバ側の待ち受けポート番号にパケットが届いた場合、NNM17は、リターン値=4(443番ポート宛のTCP通信が可能)をRAMに設定し(ステップS728)、呼び出し元の処理へ戻る(リターン)。   When the packet does not reach the server-side standby port number, the NNM 17 transmits the packet to the port 443 (used by HTTPS communication) of the server using TCP (step S724). The NNM 17 determines whether or not the packet has reached the server-side standby port number (step S726). When the packet arrives at the standby port number on the server side, the NNM 17 sets a return value = 4 (TCP communication addressed to the port 443 is possible) in the RAM (step S728), and returns to the caller process (return). .

サーバ側の待ち受けポート番号にパケットが届かない場合、NNM17は、TCPを用いてサーバの(HTTP通信が利用する)80番ポートに対してパケットを送信する(ステップS730)。NNM17は、サーバ側の待ち受けポート番号にパケットが届いたか否かを判定する(ステップS732)。サーバ側の待ち受けポート番号にパケットが届いた場合、NNM17は、リターン値=5(80番ポート宛のTCP通信が可能)をRAMに設定し(ステップS734)、呼び出し元の処理へ戻る(リターン)。   When the packet does not reach the standby port number on the server side, the NNM 17 transmits the packet to the 80th port (used by HTTP communication) of the server using TCP (step S730). The NNM 17 determines whether or not the packet has arrived at the server-side standby port number (step S732). When the packet arrives at the server-side standby port number, the NNM 17 sets a return value = 5 (TCP communication addressed to the 80th port is possible) in the RAM (step S734), and returns to the caller process (return). .

サーバ側の待ち受けポート番号にパケットが届かない場合、NNM17は、リターン値=ffffH(UDP利用不可能)をRAMに設定し(ステップS736)、呼び出し元の処理へ戻る(リターン)。   If the packet does not reach the server-side standby port number, the NNM 17 sets a return value = ffffH (UDP unavailable) in the RAM (step S736), and returns to the caller process (return).

図8は、前述したステップS604の通信経路生成処理のフローチャートである。NNM17は、前述のステップS600のリターン値が3、4又は5のいずれかである場合、UDPが利用できない環境においてUDP通信を行うために、UDPのデータをTCPにくるむ(ステップS800→S802)。   FIG. 8 is a flowchart of the communication path generation process in step S604 described above. When the return value of the above-described step S600 is any of 3, 4, or 5, the NNM 17 wraps the UDP data in TCP in order to perform UDP communication in an environment where UDP cannot be used (steps S800 → S802).

次いでNNM17は、前述のステップS600のリターン値が1又は4のいずれかである場合、通信先の端末を443番ポートで待ち受けさせ(ステップS806)、443番ポートに対して接続を行う(ステップS804→S808)。   Next, when the return value of the above-described step S600 is either 1 or 4, the NNM 17 waits for the communication destination terminal at the port 443 (step S806) and connects to the port 443 (step S804). → S808).

或いはNNM17は、前述のステップS600のリターン値が2又は5のいずれかである場合(ステップS804→S810)、通信先の端末を80番ポートで待ち受けさせ(ステップS812)、80番ポートに対して接続を行う(ステップS814)。   Alternatively, if the return value in step S600 described above is either 2 or 5 (step S804 → S810), the NNM 17 waits for the communication destination terminal at the port 80 (step S812). Connection is made (step S814).

ここでは一例として、ネットワーク上にWEBプロキシが設置されている環境でCONNECTメソッドによるSSL(Secure Sockets Layer)通信が許可されている場合を想定する。NNM17は、以降のステップで、「HTTPS CONNECTメソッドによるファイアウォール越え」の処理を行う。   Here, as an example, it is assumed that SSL (Secure Sockets Layer) communication by the CONNECT method is permitted in an environment where a WEB proxy is installed on the network. In the subsequent steps, the NNM 17 performs a process of “beyond the firewall by the HTTPS CONNECT method”.

NNM17は、送信するペイロードをHTTPで扱えるデータ列に変換する(ステップS816)。次いでNNM17は、TCPパケットにHTTPヘッダを書き加え、変換したデータ列を添付する(書き加えるヘッダはHTTPで定義されたCONNECTヘッダを利用)(ステップS818)。そしてNNM17は、CONNECTヘッダに通信先端末のアドレスを入れ、そのパケットをWEBプロキシに送信し(ステップS820)、呼び出し元の処理へ戻る(リターン)。これにより、WEBプロキシはSSL通信と誤認し、通信を許可し、通信先端末までパケットが転送される。   The NNM 17 converts the payload to be transmitted into a data string that can be handled by HTTP (step S816). Next, the NNM 17 adds an HTTP header to the TCP packet and attaches the converted data string (the header to be added uses a CONNECT header defined by HTTP) (step S818). The NNM 17 puts the address of the communication destination terminal in the CONNECT header, transmits the packet to the WEB proxy (step S820), and returns to the caller process (return). As a result, the WEB proxy misidentifies the SSL communication, permits the communication, and transfers the packet to the communication destination terminal.

[実施形態の効果]
以上説明したように本実施形態によれば、第1の態様として、通信方法(図1、3)は、NAT機能を有する第1のネットワーク機器(13)に接続された第1のコンピュータ(11)と、NAT機能を有する第2のネットワーク機器(14)に接続された第2のコンピュータ(12)との間でP2P型通信を行うための通信方法であって、第1のプライベートアドレスとは別に割り当てられた論理的なIPアドレスである第1の仮想IPアドレスを割り当てられた第1の通信装置(17)が、上記第1のネットワーク機器と上記第1のコンピュータとの間に接続されており、第2のプライベートアドレスとは別に割り当てられた論理的なIPアドレスである第2の仮想IPアドレスを割り当てられた第2の通信装置(18)が、上記第2のネットワーク機器と上記第2のコンピュータとの間に接続されており、上記第1の通信装置が、ヘッダに上記第2の仮想IPアドレスを含むパケットを上記第1のコンピュータから受信する第1の受信ステップ(S306→S316)と、上記第1の通信装置が、上記第1の受信ステップにおいて受信したパケットに上記第1の仮想IPアドレスを設定し、該パケットをNAT越え機能(図4、5)を使用して上記第1のネットワーク機器を介し上記第2のコンピュータに向けて送信する第1の送信ステップ(S316〜S322)と、上記第1の通信装置が、上記第1の送信ステップの後に、上記第1の仮想IPアドレス及び上記第2の仮想IPアドレスを含むパケットを上記第1のネットワーク機器から受信する第2の受信ステップ(S306→S308)と、上記第1の通信装置が、上記第2の受信ステップにおいて受信したパケットのヘッダに上記第2の仮想IPアドレスを設定し、該パケットを上記第1のコンピュータに向けて送信する第2の送信ステップ(S308〜S314)とを備えることを特徴とする。
[Effect of the embodiment]
As described above, according to the present embodiment, as a first aspect, the communication method (FIGS. 1 and 3) includes the first computer (11) connected to the first network device (13) having the NAT function. ) And the second computer (12) connected to the second network device (14) having the NAT function, the first private address is a communication method for performing P2P type communication. A first communication device (17) assigned with a first virtual IP address, which is a logical IP address assigned separately, is connected between the first network device and the first computer. The second communication device (18) assigned the second virtual IP address, which is a logical IP address assigned separately from the second private address, A first reception device that is connected between the network device and the second computer, and wherein the first communication device receives a packet including the second virtual IP address in a header from the first computer. In step (S306 → S316), the first communication device sets the first virtual IP address to the packet received in the first reception step, and sets the packet to the NAT traversal function (FIGS. 4 and 5). A first transmission step (S316 to S322) for transmitting to the second computer via the first network device using the first network device, and the first communication device after the first transmission step A second receiving step (S) of receiving a packet including the first virtual IP address and the second virtual IP address from the first network device (S 06 → S308), the first communication device sets the second virtual IP address in the header of the packet received in the second reception step, and transmits the packet to the first computer. And a second transmission step (S308 to S314).

ここで、第2の態様として、第1の態様において、上記第1の受信ステップにおいて受信されるパケットは、ヘッダの宛先アドレスに上記第2の仮想IPアドレスを含み、上記第1の送信ステップにおいて送信されるパケットは、ペイロードに上記第1の仮想IPアドレスと上記第2の仮想IPアドレスとを含み、上記第2の受信ステップにおいて受信されるパケットは、ペイロードに上記第1の仮想IPアドレスと上記第2の仮想IPアドレスとを含み、上記第2の送信ステップにおいて送信されるパケットは、ヘッダの送信元アドレスに上記第2の仮想IPアドレスを含むことを特徴とするとすることができる。   Here, as a second aspect, in the first aspect, the packet received in the first reception step includes the second virtual IP address in the destination address of the header, and in the first transmission step The packet to be transmitted includes the first virtual IP address and the second virtual IP address in the payload, and the packet received in the second reception step includes the first virtual IP address in the payload. The packet that includes the second virtual IP address and is transmitted in the second transmission step includes the second virtual IP address in the source address of the header.

また、第3の態様として、第1又は2の態様において、上記第1の通信装置、上記第1のネットワーク機器、及び上記第1のコンピュータを含むネットワーク内に、ファイアウォール機能を有する第3のネットワーク機器(不図示のWEBプロキシサーバ)が接続されており、上記第1の送信ステップにおいて、上記第1の通信装置が、上記第1の仮想IPアドレスを設定したパケットをファイアウォール越え機能(図6〜8)をさらに使用して送信することを特徴とすることができる。   As a third aspect, in the first or second aspect, a third network having a firewall function in a network including the first communication device, the first network device, and the first computer. A device (a WEB proxy server (not shown)) is connected, and in the first transmission step, the first communication device has a firewall traversal function (see FIG. 6 to FIG. 6) that sets a packet in which the first virtual IP address is set. 8) can be further used for transmission.

また、第4の態様として、第1乃至3のいずれかに記載の態様において、上記第1の通信装置が、ヘッダに上記第2の仮想IPアドレスを含まないパケットを上記第1のコンピュータから受信した場合、該パケットを上記第1のネットワーク機器に向けて送信し、上記第1の仮想IPアドレス及び上記第2の仮想IPアドレスを含まないパケットを上記第1のネットワーク機器から受信した場合、該パケットを上記第1のコンピュータに向けて送信する第3の送信ステップ(S302→S304)をさらに備えることを特徴とすることができる。   According to a fourth aspect, in the aspect described in any one of the first to third aspects, the first communication device receives a packet that does not include the second virtual IP address in a header from the first computer. If the packet is transmitted to the first network device and a packet not including the first virtual IP address and the second virtual IP address is received from the first network device, A third transmission step (S302 → S304) for transmitting the packet to the first computer may be further provided.

以上の構成により、本実施形態の通信装置(NNM17)を使用する通信方法は、以下の効果を奏する。
・端末11上のアプリケーションのSDK等による変更を行う必要がない。
・ネットワーク機器(ルータ13)の設定を変更することなく、NNM17を端末11とルータ13との間の端末11の前にワンタッチで接続すればよい。
・端末11、12同士の直接通信が可能である(端末11、12間のパケット通信において、1つの論理的なLANとなる)。
With the above configuration, the communication method using the communication device (NNM 17) of the present embodiment has the following effects.
-It is not necessary to change the application on the terminal 11 by SDK or the like.
The NNM 17 may be connected to the terminal 11 between the terminal 11 and the router 13 with one touch without changing the setting of the network device (router 13).
-Direct communication between the terminals 11 and 12 is possible (in the packet communication between the terminals 11 and 12, one logical LAN is provided).

[他の実施形態]
以上述べた実施形態の他に次の形態を実施できる。
1)ネットワークカメラのリモート参照
NNMとネットワークポートを持つカメラデバイスを接続することで、カメラ・NNM・ルータから成るネットワーク内に設置するだけで、外部のネットワークからのリモート監視を可能にする。
2)情報家電機器のリモート参照
NNMとネットワークポートを持つ家電機器を接続することで、外部のネットワークからの家電参照を可能にする(家電参照:エアコンの遠隔制御、オーディオのメディアファイル参照、ビデオレコーダーの映像コンテンツのストリーミング再生)。
3)機器のリモート電源ON
NNM内に他の機器の電源を操作できるアプリケーションを搭載、あるいは電源を操作で切るデバイスを接続することで、外部の離れたネットワークから機器の電源を操作することが可能になる。
4)パソコンのリモート操作
NNMとパソコン端末を接続し、パソコン内に既存の遠隔操作ソフトウェアをインストールすることで、外部のネットワークからパソコンのリモート操作を実現する。
5)リモート印刷
NNMとプリンター機器を接続、インターネットを介して印刷を行う。外出先で利用しているデジタルカメラから直接ネットワークを経由して自宅等遠隔地にあるプリンター、印刷サービス事業者へのプリンターに出力することが可能となる。
6)IP電話の実現
NNMを端末・NNM・ルータから成るネットワーク内に設置するだけで、インターネットを介してSIP(session initiation protocol)、H.323等のIPを使う電話システム(TV会議システム、TV電話システムを含む)を実現する。
7)機器のリモートメンテナンス
NNMをネットワーク端子を持つ機器に接続することで、外部のネットワークから機器の状態を監視することが可能になる。消耗品の状況や故障状況をリモートで監視することでスピーディーに効率よく機器のメンテナンスが行える。
8)上述の実施形態は例示であって制限的なものではない。したがって、上述の実施形態の他にも変形が可能である。その変形が特許請求の範囲で述べられている本発明の技術思想に基づく限り、その変形は本発明の技術的範囲内となる。
[Other Embodiments]
In addition to the embodiments described above, the following embodiments can be implemented.
1) Remote reference of a network camera By connecting a camera device having an NNM and a network port, remote monitoring from an external network is made possible simply by installing the camera in a network consisting of a camera, NNM, and router.
2) Remote reference of information home appliances Connecting home appliances with NNM and network ports enables home appliance references from external networks (home appliance references: remote control of air conditioners, audio media file references, video recorders) Video content streaming).
3) Device remote power ON
By installing an application capable of operating the power supply of another device in NNM or connecting a device that turns off the power supply, it is possible to operate the power supply of the device from a remote network.
4) Remote operation of a personal computer By connecting NNM and a personal computer terminal and installing existing remote control software in the personal computer, remote operation of the personal computer is realized from an external network.
5) Remote printing Connect the NNM and the printer device and print via the Internet. It is possible to output to a printer in a remote place such as a home or a printer to a printing service provider from a digital camera used outside the office directly via a network.
6) Realization of IP telephone Just by installing NNM in a network composed of terminals, NNM, and routers, SIP (session initiation protocol), A telephone system using an IP such as H.323 (including a TV conference system and a TV telephone system) is realized.
7) Device remote maintenance By connecting the NNM to a device having a network terminal, it becomes possible to monitor the state of the device from an external network. By remotely monitoring the status of consumables and failure conditions, the equipment can be maintained quickly and efficiently.
8) The above-described embodiment is illustrative and not restrictive. Therefore, modifications other than the above-described embodiment are possible. As long as the modification is based on the technical idea of the present invention described in the claims, the modification is within the technical scope of the present invention.

本発明を適用できる実施形態のP2P通信方法の説明図である。It is explanatory drawing of the P2P communication method of embodiment which can apply this invention. 本発明を適用できる実施形態のNNMパワーON処理を示すフローチャートである。It is a flowchart which shows the NNM power ON process of embodiment which can apply this invention. 本発明を適用できる実施形態のNNM通常処理を示すフローチャートである。It is a flowchart which shows the NNM normal process of embodiment which can apply this invention. 本発明を適用できる実施形態のNNMのNAT越え処理の説明図である。It is explanatory drawing of the NAT traversal process of NNM of embodiment which can apply this invention. 本発明を適用できる実施形態のNNMのNAT越え処理の説明図である。It is explanatory drawing of the NAT traversal process of NNM of embodiment which can apply this invention. 本発明を適用できる実施形態のNNMファイアウォール越え処理のフローチャートである。It is a flowchart of the NNM firewall crossing process of embodiment which can apply this invention. 本発明を適用できる実施形態のNNMファイアウォール越え処理のフローチャートである。It is a flowchart of the NNM firewall crossing process of embodiment which can apply this invention. 本発明を適用できる実施形態のNNMファイアウォール越え処理のフローチャートである。It is a flowchart of the NNM firewall crossing process of embodiment which can apply this invention. 従来のNAT機能を説明するためのネットワーク接続図である。It is a network connection diagram for demonstrating the conventional NAT function.

符号の説明Explanation of symbols

11、12、15、16 端末
13、14 ルータ
17、18、19、20 NNM
21、31 宛先グローバルアドレス
22、32 送信元プライベートアドレス
23、33 宛先ポート番号
24、34 送信元ポート番号
25 セッション管理サーバ
30、40 パケット
11, 12, 15, 16 Terminal 13, 14 Router 17, 18, 19, 20 NNM
21, 31 Destination global address 22, 32 Source private address 23, 33 Destination port number 24, 34 Source port number 25 Session management server 30, 40 packets

Claims (9)

NAT機能を有する第1のネットワーク機器に接続された第1のコンピュータと、NAT機能を有する第2のネットワーク機器に接続された第2のコンピュータとの間でP2P型通信を行うための通信方法において、
第1のプライベートアドレスとは別に割り当てられた論理的なIPアドレスである第1の仮想IPアドレスを割り当てられた第1の通信装置が、前記第1のネットワーク機器と前記第1のコンピュータとの間に接続されており、第2のプライベートアドレスとは別に割り当てられた論理的なIPアドレスである第2の仮想IPアドレスを割り当てられた第2の通信装置が、前記第2のネットワーク機器と前記第2のコンピュータとの間に接続されており、
前記第1の通信装置が、ヘッダに前記第2の仮想IPアドレスを含むパケットを前記第1のコンピュータから受信する第1の受信ステップと、
前記第1の通信装置が、前記第1の受信ステップにおいて受信したパケットに前記第1の仮想IPアドレスを設定し、該パケットをNAT越え機能を使用して前記第1のネットワーク機器を介し前記第2のコンピュータに向けて送信する第1の送信ステップと、
前記第1の通信装置が、前記第1の送信ステップの後に、前記第1の仮想IPアドレス及び前記第2の仮想IPアドレスを含むパケットを前記第1のネットワーク機器から受信する第2の受信ステップと、
前記第1の通信装置が、前記第2の受信ステップにおいて受信したパケットのヘッダに前記第2の仮想IPアドレスを設定し、該パケットを前記第1のコンピュータに向けて送信する第2の送信ステップと
を備えることを特徴とする通信方法。
In a communication method for performing P2P communication between a first computer connected to a first network device having a NAT function and a second computer connected to a second network device having a NAT function ,
A first communication device to which a first virtual IP address, which is a logical IP address assigned separately from a first private address, is assigned between the first network device and the first computer. And a second communication device assigned a second virtual IP address, which is a logical IP address assigned separately from the second private address, is connected to the second network device and the second network device. Connected to two computers,
A first receiving step in which the first communication device receives a packet including the second virtual IP address in a header from the first computer;
The first communication device sets the first virtual IP address to the packet received in the first reception step, and uses the NAT traversal function to set the packet to the packet via the first network device. A first transmission step of transmitting to the two computers;
A second receiving step in which the first communication device receives a packet including the first virtual IP address and the second virtual IP address from the first network device after the first transmitting step; When,
A second transmission step in which the first communication device sets the second virtual IP address in a header of the packet received in the second reception step, and transmits the packet to the first computer; A communication method comprising: and.
前記第1の受信ステップにおいて受信されるパケットは、ヘッダの宛先アドレスに前記第2の仮想IPアドレスを含み、
前記第1の送信ステップにおいて送信されるパケットは、ペイロードに前記第1の仮想IPアドレスと前記第2の仮想IPアドレスとを含み、
前記第2の受信ステップにおいて受信されるパケットは、ペイロードに前記第1の仮想IPアドレスと前記第2の仮想IPアドレスとを含み、
前記第2の送信ステップにおいて送信されるパケットは、ヘッダの送信元アドレスに前記第2の仮想IPアドレスを含む
ことを特徴とする請求項1に記載の通信方法。
The packet received in the first receiving step includes the second virtual IP address in the destination address of the header,
The packet transmitted in the first transmission step includes the first virtual IP address and the second virtual IP address in a payload,
The packet received in the second reception step includes the first virtual IP address and the second virtual IP address in a payload,
The communication method according to claim 1, wherein the packet transmitted in the second transmission step includes the second virtual IP address in a transmission source address of a header.
前記第1の通信装置、前記第1のネットワーク機器、及び前記第1のコンピュータを含むネットワーク内に、ファイアウォール機能を有する第3のネットワーク機器が接続されており、
前記第1の送信ステップにおいて、前記第1の通信装置が、前記第1の仮想IPアドレスを設定したパケットをファイアウォール越え機能をさらに使用して送信する
ことを特徴とする請求項1又は2に記載の通信方法。
A third network device having a firewall function is connected in a network including the first communication device, the first network device, and the first computer;
The said 1st communication apparatus transmits the packet which set the said 1st virtual IP address further using a firewall traversal function in the said 1st transmission step. The claim 1 or 2 characterized by the above-mentioned. Communication method.
前記第1の通信装置が、ヘッダに前記第2の仮想IPアドレスを含まないパケットを前記第1のコンピュータから受信した場合、該パケットを前記第1のネットワーク機器に向けて送信し、前記第1の仮想IPアドレス及び前記第2の仮想IPアドレスを含まないパケットを前記第1のネットワーク機器から受信した場合、該パケットを前記第1のコンピュータに向けて送信する第3の送信ステップ
をさらに備えることを特徴とする請求項1乃至3のいずれかに記載の通信方法。
When the first communication device receives a packet that does not include the second virtual IP address in the header from the first computer, the packet is transmitted to the first network device, and the first communication device transmits the packet to the first network device. When a packet not including the virtual IP address and the second virtual IP address is received from the first network device, a third transmission step of transmitting the packet to the first computer is further provided. The communication method according to any one of claims 1 to 3.
請求項1乃至4のいずれかに記載の通信方法の各ステップをコンピュータに実行させることを特徴とするプログラム。   A program causing a computer to execute each step of the communication method according to claim 1. NAT機能を有する第1のネットワーク機器に接続された第1のコンピュータと、NAT機能を有する第2のネットワーク機器に接続された第2のコンピュータとの間でP2P型通信を行うための通信システムの通信装置であって、
前記通信装置は、第1のプライベートアドレスとは別に割り当てられた論理的なIPアドレスである第1の仮想IPアドレスを割り当てられ、前記第1のネットワーク機器と前記第1のコンピュータとの間に接続されており、
前記通信システムは、第2のプライベートアドレスとは別に割り当てられた論理的なIPアドレスである第2の仮想IPアドレスを割り当てられ、前記第2のネットワーク機器と前記第2のコンピュータとの間に接続された他の通信装置を含み、
前記通信装置は、
ヘッダに前記第2の仮想IPアドレスを含むパケットを前記第1のコンピュータから受信する第1の受信手段と、
前記第1の受信手段によって受信したパケットに前記第1の仮想IPアドレスを設定し、該パケットをNAT越え機能を使用して前記第1のネットワーク機器を介し前記第2のコンピュータに向けて送信する第1の送信手段と、
前記第1の送信手段による送信の後に、前記第1の仮想IPアドレス及び前記第2の仮想IPアドレスを含むパケットを前記第1のネットワーク機器から受信する第2の受信手段と、
前記第2の受信手段によって受信したパケットのヘッダに前記第2の仮想IPアドレスを設定し、該パケットを前記第1のコンピュータに向けて送信する第2の送信手段とを備えた
ことを特徴とする通信装置。
A communication system for performing P2P communication between a first computer connected to a first network device having a NAT function and a second computer connected to a second network device having a NAT function A communication device,
The communication device is assigned a first virtual IP address, which is a logical IP address assigned separately from a first private address, and is connected between the first network device and the first computer. Has been
The communication system is assigned a second virtual IP address, which is a logical IP address assigned separately from a second private address, and is connected between the second network device and the second computer. Other communication devices
The communication device
First receiving means for receiving a packet including the second virtual IP address in a header from the first computer;
The first virtual IP address is set in the packet received by the first receiving means, and the packet is transmitted to the second computer via the first network device using the NAT traversal function. First transmission means;
Second receiving means for receiving a packet including the first virtual IP address and the second virtual IP address from the first network device after transmission by the first transmitting means;
A second transmission unit configured to set the second virtual IP address in a header of the packet received by the second reception unit, and to transmit the packet to the first computer. Communication device.
前記第1の受信手段によって受信されるパケットは、ヘッダの宛先アドレスに前記第2の仮想IPアドレスを含み、
前記第1の送信手段によって送信されるパケットは、ペイロードに前記第1の仮想IPアドレスと前記第2の仮想IPアドレスとを含み、
前記第2の受信手段によって受信されるパケットは、ペイロードに前記第1の仮想IPアドレスと前記第2の仮想IPアドレスとを含み、
前記第2の送信手段によって送信されるパケットは、ヘッダの送信元アドレスに前記第2の仮想IPアドレスを含む
ことを特徴とする請求項6に記載の通信装置。
The packet received by the first receiving means includes the second virtual IP address in the destination address of the header,
The packet transmitted by the first transmission means includes the first virtual IP address and the second virtual IP address in a payload,
The packet received by the second receiving means includes the first virtual IP address and the second virtual IP address in a payload,
The communication apparatus according to claim 6, wherein the packet transmitted by the second transmission unit includes the second virtual IP address in a transmission source address of a header.
前記通信装置、前記第1のネットワーク機器、及び前記第1のコンピュータを含むネットワーク内に、ファイアウォール機能を有する第3のネットワーク機器が接続されており、
前記第1の送信手段は、前記通信装置が、前記第1の仮想IPアドレスを設定したパケットをファイアウォール越え機能をさらに使用して送信する
ことを特徴とする請求項6又は7に記載の通信装置。
A third network device having a firewall function is connected to a network including the communication device, the first network device, and the first computer.
The communication device according to claim 6 or 7, wherein the first transmission unit transmits the packet in which the first virtual IP address is set by further using a firewall traversal function. .
ヘッダに前記第2の仮想IPアドレスを含まないパケットを前記第1のコンピュータから受信した場合、該パケットを前記第1のネットワーク機器に向けて送信し、前記第1の仮想IPアドレス及び前記第2の仮想IPアドレスを含まないパケットを前記第1のネットワーク機器から受信した場合、該パケットを前記第1のコンピュータに向けて送信する第3の送信手段
をさらに備えたことを特徴とする請求項6乃至8のいずれかに記載の通信装置。
When a packet that does not include the second virtual IP address in the header is received from the first computer, the packet is transmitted to the first network device, and the first virtual IP address and the second virtual IP address are transmitted. 7. A third transmission means for transmitting a packet not including the virtual IP address of the first network device to the first computer when the packet is received from the first network device. The communication apparatus in any one of thru | or 8.
JP2005232556A 2005-08-10 2005-08-10 Communication method and communication apparatus Expired - Fee Related JP4722615B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005232556A JP4722615B2 (en) 2005-08-10 2005-08-10 Communication method and communication apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005232556A JP4722615B2 (en) 2005-08-10 2005-08-10 Communication method and communication apparatus

Publications (2)

Publication Number Publication Date
JP2007049498A JP2007049498A (en) 2007-02-22
JP4722615B2 true JP4722615B2 (en) 2011-07-13

Family

ID=37851957

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005232556A Expired - Fee Related JP4722615B2 (en) 2005-08-10 2005-08-10 Communication method and communication apparatus

Country Status (1)

Country Link
JP (1) JP4722615B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4780732B2 (en) * 2008-10-01 2011-09-28 Necアクセステクニカ株式会社 User terminal, remote maintenance method and remote maintenance control program
JP6363492B2 (en) * 2014-12-18 2018-07-25 日本電信電話株式会社 Call control system, load distribution device, and operation method of call control system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3760767B2 (en) * 2000-12-21 2006-03-29 株式会社日立製作所 Network management apparatus and network management method
JP3776821B2 (en) * 2002-03-28 2006-05-17 富士通株式会社 Address access system and method
US20070081530A1 (en) * 2003-09-11 2007-04-12 Yuji Nomura Packet relay apparatus
JP2005210352A (en) * 2004-01-22 2005-08-04 Nec Engineering Ltd Ip address converter and converting method
JP4712481B2 (en) * 2005-08-10 2011-06-29 パナソニックシステムネットワークス株式会社 Communication method and apparatus

Also Published As

Publication number Publication date
JP2007049498A (en) 2007-02-22

Similar Documents

Publication Publication Date Title
KR100901790B1 (en) CONTROL TUNNEL AND DIRECT TUNNEL CONFIGURATION METHOD IN IPv6 SERVICE PROVIDE SYSTEM BASED IPv4 NETWORK
US8693392B2 (en) Peer-to-peer communication system and method
US8224985B2 (en) Peer-to-peer communication traversing symmetric network address translators
EP2890092B1 (en) Cooperative nat behavior discovery
US20040153858A1 (en) Direct peer-to-peer transmission protocol between two virtual networks
JP4331154B2 (en) Information processing system, tunnel communication apparatus, and tunnel communication method
EP1931088A1 (en) Information processing system, tunnel communication device, tunnel communication method, proxy response device, and proxy response method
JP4712481B2 (en) Communication method and apparatus
US8194683B2 (en) Teredo connectivity between clients behind symmetric NATs
JP3999785B2 (en) Communication method
US20190052711A1 (en) System and method for peer-to-peer connectivity
JP2005117587A (en) Communication method
JP4722615B2 (en) Communication method and communication apparatus
JP2005033250A (en) Relaying apparatus and port forward setting method
JP4602247B2 (en) Communication method
Chen et al. Challenge and solutions of NAT traversal for ubiquitous and pervasive applications on the Internet
JP2007208999A (en) Communication method
JP4279847B2 (en) COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND PROGRAM
WO2008069504A1 (en) Method for configuring control tunnel and direct tunnel in ipv4 network-based ipv6 service providing system
Brennan et al. Improving communication through overlay detours: Pipe dream or actionable insight?
Fan et al. An SDN-assisted carrier-grade network address translation service framework for 5G core networks
KR20060020953A (en) System for connecting to private ip network by using sip protocol
Duarte Jr et al. Transparent communications for applications behind NAT/firewall over any transport protocol
Wander et al. Ntalg-tcp nat traversal with application-level gateways
Chen et al. AAAAA IP Shared Device Based on the Network Port Translation

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080811

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20081008

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20081008

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110225

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110308

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110406

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140415

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees