JP5535757B2 - Client device and program - Google Patents
Client device and program Download PDFInfo
- Publication number
- JP5535757B2 JP5535757B2 JP2010111300A JP2010111300A JP5535757B2 JP 5535757 B2 JP5535757 B2 JP 5535757B2 JP 2010111300 A JP2010111300 A JP 2010111300A JP 2010111300 A JP2010111300 A JP 2010111300A JP 5535757 B2 JP5535757 B2 JP 5535757B2
- Authority
- JP
- Japan
- Prior art keywords
- tunnel
- packet
- client
- time
- server
- 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
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Description
本発明は、通信ネットワークにおけるトンネリング技術に関するものである。 The present invention relates to a tunneling technique in a communication network.
企業内ネットワークや家庭内ネットワーク等のプライベートネットワークと、インターネット等の外部ネットワークとの間には、通信のセキュリティを確保するためのファイアウォール装置(NAT装置等も含む)が設置されるのが一般的である。 Firewall devices (including NAT devices) are generally installed between private networks such as corporate networks and home networks and external networks such as the Internet to ensure communication security. is there.
このようなファイアウォール装置では、ネットワーク管理のポリシーに応じて、通信を許可するプロトコルが設定されるが、例えば、多くの場合、プライベートネットワーク内のクライアント装置からの要求に係るHTTP/HTTPS通信は許容されている。 In such a firewall device, a protocol for permitting communication is set according to a network management policy. For example, in many cases, HTTP / HTTPS communication related to a request from a client device in a private network is allowed. ing.
そこで、プライベートネットワーク内のクライアント装置と、外部の装置との間で、IP電話や映像会議等の通信を行うために、HTTPのように通信が許容されているプロトコルのヘッダで、目的とする通信のパケットをカプセリングすることにより、仮想的な通信路であるトンネルを形成し、当該トンネルを通して、IP電話や映像会議等の目的とする通信を行うトンネリング技術が用いられている。 Therefore, in order to perform communications such as IP phone calls and video conferencing between a client device in a private network and an external device, the target communication is performed using a protocol header that allows communication such as HTTP. A tunneling technique is used in which a tunnel, which is a virtual communication path, is formed by encapsulating these packets, and communication for a purpose such as an IP phone or video conference is performed through the tunnel.
一般に、トンネリング技術では、トンネリング機能を備えたクライアント装置と、外部ネットワークに設置されたトンネルサーバ装置との間でトンネルを形成し、通信を行う。 In general, in the tunneling technology, communication is performed by forming a tunnel between a client device having a tunneling function and a tunnel server device installed in an external network.
ここで、クライアント装置(PC等)をトンネリング対応とするための従来技術の1つとして図1に示すようなライブラリ方式がある。この方式では、トンネリング処理を行うソフトウェアをライブラリとして備えるとともに、当該トンネリング用のライブラリに対応したアプリケーションを備える。 Here, there is a library system as shown in FIG. 1 as one of conventional techniques for making a client device (PC or the like) compatible with tunneling. In this method, software for performing tunneling processing is provided as a library, and an application corresponding to the tunneling library is provided.
また、クライアント装置をトンネリング対応とするための他の従来技術として、図2に示すように、OS上に仮想的なネットワークインタフェースを設けて、そこにIPアドレスを付与することにより、当該仮想ネットワークインタフェースを経由して通信する部分をトンネリング経由にする方式もある。この方式では、あたかも仮想ネットワークインタフェースが、トンネリングサーバの存在する遠隔のネットワーク上に存在するかのように動作する。なお、本願に関連する先行技術文献の1つとして、特許文献1がある。 In addition, as another conventional technique for making a client device tunnel-capable, as shown in FIG. 2, a virtual network interface is provided on the OS, and an IP address is assigned to the virtual network interface. There is also a method of making the part that communicates via the tunneling via tunneling. In this method, the virtual network interface operates as if it exists on a remote network where the tunneling server exists. In addition, there exists patent document 1 as one of the prior art documents relevant to this application.
しかしながら、上記の従来技術におけるライブラリ方式では、使用するアプリケーションの改造が必要となる。また、仮想的なネットワークインタフェースを設ける方式では、アドレスの消費やセキュリティの面で問題が生じる可能性があった。より詳細には下記のとおりである。 However, in the above-described library method in the prior art, it is necessary to modify the application to be used. Further, the method of providing a virtual network interface may cause problems in terms of address consumption and security. More details are as follows.
ライブラリ方式によりトンネリングを実現する場合、アプリケーションのソケットAPI部分についてアプリケーションの改造を要する。また、TCP等のソケットAPIを模擬しようとすると、プロトコル処理をライブラリ側で行う必要があり、アプリケーションが元々有しているプロトコル処理との互換性上の問題で、アプリケーションの動作に影響が出る可能性があった。また、アプリケーションをトンネリング対応に改造しようとする場合において、第三者が作成したライブラリ等のオブジェクトを利用する場合などソースコードがない場合には、そもそも改造が困難であった。 When tunneling is realized by the library method, it is necessary to modify the application for the socket API portion of the application. In addition, when trying to simulate a socket API such as TCP, it is necessary to perform protocol processing on the library side, and compatibility problems with the protocol processing originally possessed by the application may affect the operation of the application. There was sex. In addition, when attempting to remodel an application to support tunneling, if there is no source code, such as when an object such as a library created by a third party is used, the remodeling is difficult in the first place.
また、仮想ネットワークインタフェースを作成し、パケットをルーティングすることでトンネリングする方式では、基本的に全てのパケットが相互に外部と疎通してしまうため、セキュリティ上問題が生じる可能性があった。更に、仮想ネットワークインタフェースが出来てしまうことによる、複数インタフェース間のルーティング設定の煩雑化、あるいはそれに起因する通信障害等のトラブルの発生率が上昇する問題があった。また、一般に、対外的な通信を担うことから、仮想インタフェースに対してグローバルアドレスを割り当てることになるため、IPv4のようにアドレス空間が限られている環境で、貴重なグローバルアドレスを1台のクライアントで1つ占有してしまう問題もある。 In addition, in the method of creating a virtual network interface and tunneling by routing packets, basically all packets communicate with each other, which may cause a security problem. Furthermore, there has been a problem that the occurrence rate of troubles such as complication of routing setting between a plurality of interfaces due to the creation of a virtual network interface or a communication failure resulting from the complexity increases. In general, since a global address is assigned to a virtual interface because it is responsible for external communication, a valuable global address is assigned to one client in an environment where the address space is limited as in IPv4. There is also a problem of occupying one.
ところで、トンネルを通じたデータ送信に当たって、制御パケットと、データパケットを区別する等のためのヘッダを付けたパケットをトンネル経由で送信し、受信側において、ヘッダからパケット種別を判別して受信処理を行う従来技術がある。そのような従来技術では、受信パケットが破損していた場合に、次のヘッダまで、パケットを読み飛ばし、次のパケットで受信処理行っている。 By the way, when transmitting data through the tunnel, a control packet and a packet with a header for distinguishing the data packet are transmitted through the tunnel, and on the receiving side, the packet type is determined from the header and reception processing is performed. There are conventional techniques. In such a conventional technique, when a received packet is damaged, the packet is skipped to the next header, and reception processing is performed on the next packet.
しかし、このような従来技術では、任意のデータの中において、上記次のヘッダを識別できるようにするために、ヘッダをある程度の大きさを持ったサイズとしなければならず、通信のオーバーヘッドが大きくなるという問題があった。 However, in such a conventional technique, in order to be able to identify the next header in arbitrary data, the header must be sized to a certain size, resulting in a large communication overhead. There was a problem of becoming.
また、トンネリングを用いた通信を行う場合に、ファイアウォール装置の機能により、長時間無通信の場合に、強制的に切断させられてしまう場合や、切断状態にならないのに、信号が疎通しなくなっている、いわゆるトンネルが詰まった状態が生じる場合がある。このようなことを回避するために、クライアント装置と、トンネルサーバ装置との間で、生存確認要求/生存確認要求応答の送受信を一定時間間隔で行うことが一般に行われている。 Also, when performing communication using tunneling, the function of the firewall device may cause a forced disconnection when there is no communication for a long time, or the signal will not communicate even if the disconnection state does not occur. The so-called tunnel may be clogged. In order to avoid such a situation, transmission / reception of a survival confirmation request / survival confirmation request response is generally performed at regular time intervals between the client apparatus and the tunnel server apparatus.
しかし、このような疎通確認技術では、生存確認要求の送信間隔が短いと、本来の通信パケット以外の無駄なパケットが増加し、無通信クライアントを含む多数のクライアントのトラフィックが集中するトンネルサーバ装置やそのネットワークにおいて、処理負荷が増加し、性能低下を招く恐れがある。逆に、送信間隔を長くしてしまうと、詰まり状態を長時間検出できず、通信が長時間途切れたりする問題が生じる。つまり、処理負担軽減と異常状態検出時間の短縮という相反する条件を、生存確認要求の送信周期の調整でもって同時に満たすことは困難であった。 However, in such a communication confirmation technology, if the transmission interval of the survival confirmation request is short, useless packets other than the original communication packet increase, and a tunnel server device in which traffic of many clients including non-communication clients concentrates. In the network, the processing load increases, and there is a risk of performance degradation. Conversely, if the transmission interval is lengthened, the clogged state cannot be detected for a long time, causing a problem that communication is interrupted for a long time. That is, it has been difficult to satisfy the conflicting conditions of reducing the processing load and shortening the abnormal state detection time at the same time by adjusting the transmission cycle of the survival confirmation request.
本発明は上記の問題点に鑑みてなされたものであり、アプリケーションの改造をほとんどすることなく、クライアント装置にトンネリング機能を備えることを可能とした技術を提供することを目的とする。 The present invention has been made in view of the above-described problems, and an object of the present invention is to provide a technique that enables a client device to have a tunneling function without almost modifying an application.
また、本発明は、パケットに付するヘッダを短くし、効率的な通信を実現する技術を提供することも目的としている。更に、本発明は、処理負担軽減と異常状態検出時間の短縮という相反する条件を満たすことを可能とした、生存確認の技術を提供することも目的としている。 Another object of the present invention is to provide a technique for realizing efficient communication by shortening a header attached to a packet. Furthermore, another object of the present invention is to provide a survival confirmation technique that makes it possible to satisfy the conflicting conditions of reducing the processing burden and shortening the abnormal state detection time.
上記の課題を解決するために、本発明は、トンネルサーバ装置との間に構築されたトンネルを介して、通信相手装置とデータ通信を行うクライアント装置であって、前記トンネルサーバ装置との間で前記トンネルを構築し、当該トンネルを介してパケットの送受信を行うトンネル機能手段と、通信ネットワークを介してデータ送受信を行うためのデータ通信手段と、前記データ通信手段を経由するパケットを監視し、当該パケットの通信情報に基づき、当該パケットが、前記クライアント装置が備えるアプリケーション部から出力されたパケットであると判定した場合に、当該パケットを前記トンネル機能手段に渡すパケット制御手段とを備え、前記トンネル機能手段は、前記パケット制御手段から受け取った前記パケットを、前記トンネルを経由して前記通信相手装置に向けて送信することを特徴とするクライアント装置として構成される。 In order to solve the above-described problem, the present invention provides a client device that performs data communication with a communication partner device via a tunnel established between the tunnel server device and the tunnel server device. The tunnel function means for constructing the tunnel and transmitting / receiving packets via the tunnel, the data communication means for performing data transmission / reception via a communication network, and monitoring the packets passing through the data communication means, A packet control means for passing the packet to the tunnel function means when it is determined that the packet is a packet output from an application unit included in the client device based on the communication information of the packet; Means for transmitting the packet received from the packet control means to the tunnel; Configured as a client device, characterized in that via transmitted toward the communication counterpart apparatus.
また、前記クライアント装置において、前記パケット制御手段は、前記トンネル機能手段から、前記トンネルを経由して受信したパケットを受け取り、当該パケットを前記データ通信手段を介して前記アプリケーション部に送出する。 In the client device, the packet control means receives a packet received via the tunnel from the tunnel function means, and sends the packet to the application unit via the data communication means.
前記トンネル機能手段が前記トンネルを経由して受信するパケットには、ヘッダが付されており、前記トンネル機能手段は、前記ヘッダの情報に基づき、前記パケットが破損しているか否かを判定し、当該パケットが破損していると判定した場合に、前記トンネルを切断し、その後に、前記トンネルサーバ装置との間にトンネルを再構築する破損処理手段を備えることとしてもよい。 The packet received by the tunnel function means via the tunnel has a header, and the tunnel function means determines whether or not the packet is damaged based on the information of the header, When it is determined that the packet is damaged, it is possible to provide a damage processing means for disconnecting the tunnel and then reconstructing the tunnel with the tunnel server device.
また、前記トンネル機能手段は、前記トンネルサーバ装置から、当該トンネルサーバ装置のアドレスとポート番号であるサーバアドレスとサーバポート番号を受け取り、当該サーバアドレスとサーバポート番号とを、前記アプリケーション部に対応するクライアントポート番号に対応付けて記憶手段に格納し、前記パケット制御手段から、前記クライアントポート番号を発ポート番号として含むパケットを受け取った場合に、前記記憶手段を参照することにより、前記パケットにおける発アドレスを前記サーバアドレスに変換し、前記パケットにおける発ポート番号を前記サーバポート番号に変換し、当該変換を施したパケットを前記トンネルを経由して送出するように構成してもよい。 The tunnel function means receives a server address and a server port number, which are the address and port number of the tunnel server device, from the tunnel server device, and corresponds the server address and server port number to the application unit. When a packet including the client port number as an outgoing port number is received from the packet control unit in association with a client port number, the source address in the packet is referred to by referring to the storage unit May be converted into the server address, the source port number in the packet is converted into the server port number, and the converted packet may be transmitted via the tunnel.
また、前記トンネル機能手段は、前記トンネルを経由して、前記サーバアドレスを宛先アドレスとして含み、前記サーバポート番号を宛先ポート番号として含むパケットを受信した場合に、前記記憶手段を参照することにより、前記パケットにおける宛先アドレスを前記クライアント装置のアドレスに変換し、前記パケットにおける宛先ポート番号を前記クライアントポート番号に変換し、当該変換を施したパケットを、前記パケット制御手段を介して前記アプリケーション部に送出するように構成してもよい。 Further, when the tunnel function means receives a packet including the server address as a destination address and the server port number as a destination port number via the tunnel, by referring to the storage means, The destination address in the packet is converted into the address of the client device, the destination port number in the packet is converted into the client port number, and the converted packet is sent to the application unit via the packet control means You may comprise.
また、前記トンネルサーバ装置は、前記クライアント装置からパケットを受信する度に、当該パケットの受信時刻を最終受信時刻として記憶手段に保持し、データパケットを送信する場合には、当該データパケットの送信時刻の前記最終受信時刻からの経過時間を算出し、当該経過時間をサーバ側経過時間として前記データパケットに含めて送信してもよく、この場合、前記トンネル機能手段は、パケットを前記トンネルサーバ装置に送信する度に、当該パケットの送信時刻を最終送信時刻として記憶手段に保持し、前記トンネルサーバ装置から、前記データパケットを受信した場合に、当該データパケットの受信時刻の前記最終送信時刻からの経過時間をクライアント側経過時間として算出し、前記データパケットから取得したサーバ側経過時間と、前記クライアント側経過時間とに基づき、前記トンネルサーバ装置に対して生存確認要求を送信するか否かを決定するように構成してもよい。 Further, each time the tunnel server device receives a packet from the client device, the tunnel server device holds the reception time of the packet as a final reception time in the storage unit, and when transmitting a data packet, the transmission time of the data packet The elapsed time from the last reception time may be calculated and the elapsed time may be included in the data packet and transmitted as the server-side elapsed time. In this case, the tunnel function means sends the packet to the tunnel server device. Each time transmission is performed, the transmission time of the packet is held in the storage unit as the final transmission time, and when the data packet is received from the tunnel server device, the elapsed time of the reception time of the data packet from the final transmission time The time is calculated as the client side elapsed time, and the server side time obtained from the data packet is calculated. Time, on the basis of the said client-side elapsed time, may be configured to determine whether to transmit a presence confirmation request to the tunnel server.
また、上記構成において、前記トンネル機能手段は、前記クライアント側経過時間が、所定の時間以上である場合には、前記サーバ側経過時間が前記クライアント側経過時間より大きい場合に、生存確認要求を送信し、前記クライアント側経過時間が、前記所定の時間未満である場合には、前記サーバ側経過時間が、パケットの送信時刻から算出される平均送信間隔の所定数倍以上である場合に、生存確認要求を送信することとしてよい。 In the above configuration, when the client side elapsed time is equal to or longer than a predetermined time, the tunnel function means transmits a survival confirmation request when the server side elapsed time is larger than the client side elapsed time. If the client-side elapsed time is less than the predetermined time, the server-side elapsed time is greater than or equal to a predetermined number of average transmission intervals calculated from the packet transmission time. A request may be sent.
前記所定の時間は、例えば、前記クライアント装置と前記トンネルサーバ装置間におけるラウンドトリップ時間の2倍の時間であり、前記所定数は、例えば、4である。 The predetermined time is, for example, twice the round trip time between the client device and the tunnel server device, and the predetermined number is four, for example.
また、前記トンネル機能手段は、前記トンネルサーバ装置からデータパケットを受信した後、その後にパケットを受信することなく、所定のタイマー時間が経過した場合に、生存確認要求を送信するように構成してもよい。 Further, the tunnel function means is configured to transmit a survival confirmation request when a predetermined timer time has elapsed without receiving a packet after receiving a data packet from the tunnel server device. Also good.
本発明によれば、アプリケーションの改造をほとんどすることなく、クライアント装置にトンネリング機能を備えることが可能になる。また、本発明によれば、パケットの読み飛ばし処理が不要になるため、パケットに付するヘッダを短くすることができ、効率的な通信を実現することが可能となる。更に、本発明によれば、処理負担軽減と異常状態検出時間の短縮という相反する条件を満たすことを可能とした、生存確認の技術を提供することが可能となる。 According to the present invention, a client device can be provided with a tunneling function with almost no application modification. Further, according to the present invention, the packet skipping process is not required, so the header attached to the packet can be shortened, and efficient communication can be realized. Furthermore, according to the present invention, it is possible to provide a survival confirmation technique that makes it possible to satisfy the conflicting conditions of reducing the processing burden and shortening the abnormal state detection time.
以下、図面を参照して本発明の実施の形態を説明する。 Embodiments of the present invention will be described below with reference to the drawings.
<第1の実施の形態>
(システム構成)
図3に、第1の実施の形態におけるシステムの全体構成を示す。図3に示すように、本実施の形態のシステムは、インターネット5と、企業内ネットワーク等のプライベートネットワーク6との境界に設置されるファイアフォール装置4、ファイアウォール装置4配下にあるクライアント装置1、トンネルサーバ装置2、及び、クライアント装置1と通信を行う通信相手装置3とを含む。本実施の形態では、トンネルサーバ装置2と、通信相手装置3は、インターネット5に接続されている。
<First Embodiment>
(System configuration)
FIG. 3 shows the overall configuration of the system in the first embodiment. As shown in FIG. 3, the system according to the present embodiment includes a
クライアント装置1は、一般的なOS(オペレーティングシステム)と、IP電話や映像会議等の目的の通信を行うアプリケーションと、本発明に係るトンネル処理機能を備えるコンピュータ(PC、携帯端末等)である。 The client device 1 is a computer (PC, portable terminal, etc.) provided with a general OS (operating system), an application that performs communication for a purpose such as an IP phone or video conference, and a tunnel processing function according to the present invention.
トンネルサーバ装置2は、クライアント装置1からの要求を受けてクライアント装置1との間にトンネルを形成し、クライアント装置1とトンネルを介した通信を行う機能を備えた装置である。ファイアウォール装置4は、当該トンネルの通信を許容するファイアウォール装置4である。なお、本実施の形態では、ファイアウォール装置4での通信が許容されているトンネルであれば、トンネルのプロトコルの種類はどのようなものでもよい。
The
本実施の形態における通信相手装置3は、例えばSIPサーバや、その他のアプリケーションサーバであり、クライアント装置1と通信を行う。もちろん、通信相手装置3は、同一または他のプライベートネットワーク内に備えられた他のクライアント装置であってもよい。
The
図4に、クライアント装置1の機能構成図を示す。図4に示すように、クライアント装置1は、データ通信部11、トンネル機能部12、アプリケーション部13を備える。データ通信部11は、パケット捕捉・放流部14(パケット制御手段と称してもよい)を備える。
FIG. 4 shows a functional configuration diagram of the client device 1. As shown in FIG. 4, the client device 1 includes a
データ通信部11は、通信ネットワークを介してデータ通信を行うための機能部であり、アプリケーション部13から出力されるデータをIPパケットにしたり、その逆の処理を行う機能、IPパケットを入出力するネットワークインターフェースの機能等を含むものである。データ通信部11が備えるパケット捕捉・放流部14の機能については後述する。
The
アプリケーション部13は、目的の通信サービス(例えば映像会議通信)を提供するためのアプリケーションに対応する機能部であり、例えば、SIP等の制御通信を行う機能、音声/映像等のメディア通信を行う機能等を含む。
The
トンネル機能部12は、トンネルサーバに対応するトンネリングクライアントアプリケーションに相当し、トンネル処理部121と、破損データ処理部122を有している。トンネル処理部121は、パケット捕捉・放流部14から受け取ったパケット(IPパケット)を、トンネル経由で送出する機能、及び、トンネル経由でパケットを受信したりする機能部である。より具体的には、トンネル処理部121は、受け取ったパケットを、例えばHTTPヘッダ等を用いてカプセリングし、カプセリングした後のパケットをデータ通信部11を介して送出する機能や、トンネルヘッダでカプセリングされているパケットを受け取った場合に、トンネルヘッダのカプセリングをはずして中身のパケットを取り出し、当該パケットを、出力する機能等を有する。なお、本明細書において、「トンネル経由で送信する」等の表現や、「トンネル経由で受信する」等との表現は、実際には、上記のようにカプセリング/デカプセリングを行うことを意味している。
The
更に、本実施の形態においては、トンネル処理部121は、トンネルに送出するパケットの種別(制御パケット、データパケットの種別等)を示す識別子と、パケットの長さとからなるヘッダを付加したパケットを生成し、当該ヘッダ付きパケットをトンネルに送出する機能を有している。
Furthermore, in the present embodiment,
破損データ処理部122は、トンネルから受信したパケットが破損しているか否かを調べ、破損していた場合に、トンネル接続を一旦切断するとともに、トンネルを再接続する等の破損データ処理機能を有している。
The damaged
パケット捕捉・放流部14は、データ通信部11を流れるパケットを監視し、例えばトンネル機能部12から指定される特定のIPアドレス及びポート番号、もしくは特定のポート番号(これらを通信情報と呼ぶことにする)を有するパケットを検知した場合には、当該パケットを取得(捕捉)し、トンネル機能部12に渡す等の機能を有する。
The packet capturing / discharging
本実施の形態では、アプリケーション部13から送出されるパケットは、パケット捕捉・放流部14で捕捉され、トンネル機能部12に渡される。また、パケット捕捉・放流部14は、トンネル機能部12によりデカプセリングされたパケットを受け取り、それをアプリケーション部13に向けて送出(放流)する。
In the present embodiment, a packet transmitted from the
なお、指定された特定の通信情報を有するパケット以外のパケットについては、データ通信部11の機能により、パケットの種類・宛先等に応じて、アプリケーション部13に渡されたり、外部に送出される。
Note that packets other than the packet having the specified specific communication information are transferred to the
図5は、図4に示す構成をソフトウェア(プログラムモジュール)のスタックイメージで表記した図である。図5において、図4との対応を分かりやすくするために、図4において対応する機能部に付された参照符号を付している。図5の記載位置からわかるように、パケット捕捉・放流部14は、デバイスドライバにより実現することができる。なお、トンネルクライアントプログラムと、当該デバイスドライバは、コンピュータをトンネル機能部12及びパケット捕捉・放流部14として機能させるプログラムである。
FIG. 5 is a diagram representing the configuration shown in FIG. 4 as a stack image of software (program module). In FIG. 5, in order to make the correspondence with FIG. 4 easier to understand, the reference numerals attached to the corresponding functional units in FIG. 4 are given. As can be seen from the description position in FIG. 5, the packet capturing / discharging
図6に、トンネルサーバ装置2の機能構成図を示す。図6に示すように、本実施の形態におけるトンネルサーバ装置2は、トンネル処理部21と破損データ処理部22を有する。トンネル処理部21は、クライアント装置1におけるトンネル処理部121に対応するトンネルサーバ処理を行う機能部である。また、破損データ処理部22は、クライアント装置1における破損データ処理部122と同様にして、受信パケットの破損データ検知を行って、トンネル切断処理等を行う機能部である。
FIG. 6 shows a functional configuration diagram of the
本実施の形態に係るクライアント装置1及びトンネルサーバ装置2のそれぞれは、CPU、記憶装置等を有するコンピュータに上記の各機能を実現するためのプログラムを実行させることにより実現できる。当該プログラムは可搬メモリ等の記録媒体からコンピュータにインストールすることとしてもよいし、ネットワーク上のサーバからダウンロードすることとしてもよい。
Each of the client device 1 and the
クライアント装置1を、上記のような構成としたことにより、トンネリングに係る処理は、アプリケーション部13に対して隠蔽される。つまり、アプリケーション部13は、トンネリングを意識することなく、トンネリング機能部がない場合と同様の通常の通信処理を行いながら、トンネリングを実現できる。
By configuring the client device 1 as described above, processing related to tunneling is hidden from the
(システムの動作について)
次に、本実施の形態に係るシステムの動作概要について、図7のシーケンスチャートを参照して説明する。
(About system operation)
Next, an outline of the operation of the system according to the present embodiment will be described with reference to the sequence chart of FIG.
まず、クライアント装置1におけるトンネル機能部12が、トンネルサーバ装置2にトンネル接続要求を送信することにより、トンネルの設定(トンネル接続)を行う(ステップ1)。すなわち、トンネルサーバ装置2と、クライアント装置1のトンネル機能部12とにおいて、トンネル通信を行うために必要な設定がなされる。なお、トンネル機能部12は、例えば、アプリケーション部13からの要求に基づき、トンネル接続を行ってよい。
First, the
その後、アプリケーション部13からパケットが送出される。より詳細には、アプリケーション部13から出力されるデータが、データ通信部11によりIPパケット化されるが、ここでは便宜上、アプリケーション部13からパケットが送出されると表現することにする(ステップ2)。
Thereafter, a packet is transmitted from the
パケットは、パケット捕捉・放流部14を経由して、トンネル機能部12に届けられ、トンネル機能部12において、パケットの種別を示す識別子と、パケットの長さ情報とをヘッダとして付加し、ヘッダ付きパケットをトンネル経由で送出する(ステップ3)。
The packet is delivered to the
送出されたヘッダ付きパケットは、トンネルを経由してトンネルサーバ装置2が受信する。トンネルサーバ装置2では、パケットの破損チェックが行われる。破損がなければ、ヘッダを取り外したパケットが、通信相手装置3に送信される。
The sent header-attached packet is received by the
また、通信相手装置3から送出されたパケットを受信したトンネルサーバ装置2は(ステップ5)、パケットにヘッダ(識別子と長さ)を付加し、ヘッダ付きパケットをトンネル経由で送出する(ステップ6)。
Also, the
クライアント装置1におけるトンネル機能部12は、トンネル経由でヘッダ付きパケットを受信し、破損チェックを行う。破損がなければ、ヘッダを取り外したパケットが、パケット捕捉・放流部14を介してアプリケーション部13に渡される(ステップ7)。
The
トンネルサーバ装置2もしくはクライアント装置1において、パケットの破損を検出した場合には、トンネルが切断され(ステップ8)、すぐにトンネルの再接続が行われ(ステップ9)、以降、ステップ2〜ステップ7と同様にしてパケット通信が行われる。
When the
次に、各フローチャートを参照して、主要な処理について詳細に説明する。 Next, main processes will be described in detail with reference to each flowchart.
まず、アプリケーション部13からデータが送出される場合におけるクライアント装置1の動作を図8のフローチャートを参照して説明する。
First, the operation of the client device 1 when data is transmitted from the
アプリケーション部13から送出されたデータは、データ通信部11において通信情報が付加されたパケットにされる。そして、パケット捕捉部・放流部14は、パケットにおける通信情報が、指定された通信情報と一致するか否かを調べる(ステップ11)。一例として、より具体的には、、指定された通信情報は、OSが管理するソケット管理テーブルのようにメモリ等に格納されているものであり、パケット捕捉部・放流部14は、発アドレスがクライアント装置1のアドレスであり、プロトコル種別および発ポート番号がアプリケーション部13が所有するソケットに対応するものであるか否かの一致確認を行う。
The data transmitted from the
監視しているパケットの通信情報が、指定された通信情報と一致する場合、パケット捕捉部・放流部14は、当該パケットを捕捉し、捕捉したパケットをトンネル機能部12に渡す。トンネル機能部12は、パケット捕捉・放流部14から受け取ったパケットに、識別子(IDとする)と長さ情報からなるヘッダを付加したヘッダ付きパケットを生成し、当該ヘッダ付きパケットをトンネル経由で送出する(ステップ12)。
When the communication information of the monitored packet matches the designated communication information, the packet capturing unit /
ステップ11において、パケットにおける通信情報が、指定された通信情報と一致しない場合、パケットは、適切な宛先に転送されることになる。
In
次に、クライアント装置1におけるトンネル機能部12が、トンネル経由でヘッダ付きパケットを受信した場合の動作を、図9のフローチャートを参照して説明する。
Next, the operation when the
トンネル機能部12は、例えば、ヘッダの識別子が予め定めた値と一致するかどうか、長さ情報が、実際のパケットの長さと一致するかどうか、等のチェックを行うことにより、パケットが破損しているか否かの判定を行う(ステップ21)。パケットが破損していないと判定した場合、パケット機能部12は、ヘッダを取り外したパケットを、パケット捕捉・放流部14を介してアプリケーション部13側に送出(放流)する(ステップ22)。
For example, the
ステップ21において、パケットが破損していると判定された場合には、パケット機能部12は、トンネル接続を一旦切断し(ステップ23)、再び、トンネルサーバへ接続要求を送信することにより、トンネル接続を再開する(ステップ24)。
If it is determined in
次に、トンネルサーバ装置2が、トンネル経由でヘッダ付きパケットを受信した場合の動作を、図10のフローチャートを参照して説明する。
Next, the operation when the
トンネルサーバ装置2は、クライアント装置1のトンネル機能部12と同様に、パケットが破損しているか否か判定する(ステップ31)。パケットが破損していなければ、ヘッダを取り外したパケットをネットワークに送出する(ステップ32)。ステップ31において、パケットの破損が検出された場合には、トンネル接続を切断する。なお、このとき、クライアント装置1のトンネル機能部12は、トンネルが切断されたことを検知し、再接続処理を行うことになる。
The
図11に、トンネルサーバ装置2もしくはクライアント装置1における破損パケット受信時の処理の概念図を示す。図11に示すように、トンネル経由で送信されるパケットに破損が検出されなければ、ヘッダを取り外したパケットが送出されるが、破損が検出された場合には、切断後、再接続されたトンネルにてヘッダ付きパケットが送信される。
FIG. 11 shows a conceptual diagram of processing when a damaged packet is received in the
このような処理を行うのは、パケットが破損している可能性が非常に低いことに基づく。そして、上記のように、パケット破損時に、切断/再接続を行うこととしたため、従来のように、パケットを読み飛ばして次のヘッダを検知する処理が不要になるので、ヘッダ(識別子等)の長さを従来に比べて非常に短くすることができる。その結果、通信のオーバーヘッドを、従来に比べて低減できる。 This processing is based on the fact that the possibility that a packet is corrupted is very low. As described above, since the disconnection / reconnection is performed when the packet is damaged, the process of skipping the packet and detecting the next header as in the conventional case is not necessary. The length can be made much shorter than before. As a result, communication overhead can be reduced as compared to the conventional case.
<第2の実施の形態>
次に、本発明の第2の実施の形態について説明する。第2の実施の形態では、ポートマッピングが行われる。
<Second Embodiment>
Next, a second embodiment of the present invention will be described. In the second embodiment, port mapping is performed.
(システム構成)
本実施の形態における全体のシステム構成については、図3に示した第1の実施の形態でのシステム構成と同じである。以下では、主に、第1の実施の形態と異なる点を中心に説明する。
(System configuration)
The overall system configuration in the present embodiment is the same as the system configuration in the first embodiment shown in FIG. In the following, the description will mainly focus on differences from the first embodiment.
図12に、本実施の形態におけるクライアント装置1のトンネル機能部12の機能構成図を示す。図12に示すように、本実施の形態に係るトンネル機能部12は、破損データ処理部122、トンネル処理部121に加えて、アドレス・ポートの取得処理、管理、変換処理を行うアドレス・ポート処理部123、及び、テーブル情報格納部124を備える。
FIG. 12 shows a functional configuration diagram of the
図13に、本実施の形態におけるトンネルサーバ装置2の機能構成図を示す。図13に示すように、本実施の形態におけるトンネルサーバ装置2は、破損データ処理部22、トンネル処理部21に加えて、アドレス/ポート情報の管理や払い出し等に係る処理を行うアドレス・ポート処理部24、及びテーブル情報格納部23を有する。
FIG. 13 shows a functional configuration diagram of
図14に、クライアント装置1のテーブル情報格納部124に格納されるテーブルの例を示す。図14に示すとおり、クライアント装置1のテーブル情報格納部124には、クライアント装置1のトンネル接続、セッションID、及びサーバアドレスを対応付けて記録するクライアント接続管理テーブルと、セッションID、マップしたポートのプロトコル種別、サーバポート番号、及びクライアントポート番号を対応付けて記録するクライアントポートマップテーブルと、クライアントアドレスを記録するクライアントアドレステーブルとを格納する。もちろん、クライアント装置1のテーブル情報格納部124等の記憶手段には、クライアント装置1のアドレスが格納されている。
FIG. 14 shows an example of a table stored in the table
図15に、トンネルサーバ装置2のテーブル情報格納部23に格納されるテーブルの例を示す。図15に示すとおり、トンネルサーバ装置2のテーブル情報格納部23には、サーバ接続管理テーブルと、サーバポートマップテーブルと、サーバ空きポートリストが格納される。
FIG. 15 shows an example of a table stored in the table
サーバ接続管理テーブルは、トンネル接続の識別子と、セッションIDとを対応付けて記録する。サーバポートマップテーブルは、セッションID、マップしたポートのプロトコル種別、及びポート番号を記録する。サーバ空きポートリストは、プロトコル種別毎に、トンネルサーバ装置2における空きポート番号を記録する。
The server connection management table records the tunnel connection identifier and the session ID in association with each other. The server port map table records the session ID, the protocol type of the mapped port, and the port number. The server free port list records free port numbers in the
(システムの動作)
まず、図16を参照して、本実施の形態におけるトンネリング通信例について説明する。本例では、各装置に、図16に示すとおりのアドレスが割り当てられているものとする。また、図16には、トンネルを介して送受信されるパケットのヘッダ(通信情報)の中の情報も示されている。図16の例において、クライアント装置1のトンネル機能部12におけるテーブル情報格納部124には、トンネルサーバ装置1のアドレス(12.23.45.78)及びポート番号(1235)が、アプリケーション部13が使用するポート番号であるクライアントポート番号(5534)及びクライアント装置1のアドレス(10.10.9.8)と対応付けて格納されている。
(System operation)
First, an example of tunneling communication according to the present embodiment will be described with reference to FIG. In this example, it is assumed that addresses as shown in FIG. 16 are assigned to each device. FIG. 16 also shows information in a header (communication information) of a packet transmitted / received via a tunnel. In the example of FIG. 16, the table
まず、アプリケーション部13から、上りパケットが送信されると、パケット捕捉・放流部14により、発アドレス(SRC_ADDR:10.10.9.8)がクライアント装置1のアドレス(10.10.9.8)と一致し、プロトコル種別(PROTOCOL:UDP)および発ポート番号(SRC_PORT:5534)がクライアントポートマップテーブルに存在することが確認され、当該上りパケットは、トンネル機能部12に渡される。トンネル機能部12では、上りパケットの発ポート番号(SRC_PORT:5534)に基づき、テーブル情報格納部124を検索し、当該発ポート番号に対応する発アドレス(SRC_ADDR:12.23.45.78)と、発ポート番号(SRC_PORT:1235)とを取得し、上りパケットにおける発アドレスと発ポート番号とを、上記取得した発アドレス(SRC_ADDR:12.23.45.78)と発ポート番号(SRC_PORT:1235)に変換する。そして、トンネル機能部12は、変換を行った上りパケットをトンネル経由で送出する。
First, when an upstream packet is transmitted from the
上りパケットをトンネル経由で受信したトンネルサーバ装置2は、上りパケットを通信相手装置3に送出する。
The
上りパケットには、発アドレス及び発ポート番号として、トンネルサーバ装置2のアドレス及びポート番号が設定してあるので、上りパケットを受信した通信相手装置3は、当該パケットは、トンネルサーバ装置2から送出されたものであると認識する。
Since the address and port number of the
その後、通信相手装置3は、宛先アドレス及び宛先ポート番号を、トンネルサーバ装置2のものに設定した下りパケットを送信する。下りパケットを受信したトンネルサーバ装置2は、当該下りパケットをトンネルを経由してクライアント装置1に送出する。
Thereafter, the
トンネルから下りパケットを受け取ったクライアント装置1のトンネル機能部12は、テーブル情報格納部124を参照することにより、下りパケットにおける宛先アドレスと宛先ポート番号とを、クライアント装置1のアドレス(10.10.9.8)とポート番号(5534)に変換し、変換を行ったパケットを、パケット捕捉・放流部14を介してアプリケーション部13に送出する。
The
次に、図17を参照して本実施の形態における処理のシーケンスを示す。このシーケンスに沿ってまずは処理の概要を説明する。 Next, a processing sequence in the present embodiment will be described with reference to FIG. First, the outline of the process will be described along this sequence.
まず、アプリケーション部13が、トンネル機能部12に対して初期化要求を行うと(ステップ41)、トンネル機能部12は、初期化処理を行うとともに、トンネル接続要求をトンネルサーバ装置2に対して送信することにより、トンネルを設定する(ステップ42)。ここでの初期化処理では、例えば、クライアントポートマップテーブル、及びクライアント接続管理テーブルのエントリを全てクリアする処理が行われる。
First, when the
トンネル接続要求を受信したトンネルサーバ装置2は、トンネルを接続する。また、ここでトンネルサーバ装置2は、図15に示すサーバ接続管理テーブルに、接続識別子とセッションIDを記録する。。
The
そして、トンネルサーバ装置2は、トンネルサーバ装置2のアドレスと、セッションIDとを含むトンネル接続応答を、クライアント装置1のトンネル機能部12に返し、トンネル機能部12は、アプリケーション部13に対して初期化結果応答を返す。
Then, the
上記の処理より、トンネルが設定され、以降のトンネルサーバ装置2とクライアント装置1間の通信は、トンネルを介して行われる。
From the above processing, a tunnel is set, and subsequent communication between the
その後、アプリケーション部13は、ポートマップ要求をトンネル機能部12に対して送信し(ステップ45)、トンネル機能部12は、ポートマップ要求をトンネルサーバ装置2に送信する(ステップ46)。このポートマップ要求には、アプリケーション部13が用いるプロトコル種別が含まれる。なお、ポートマップ解除要求も行うことが可能であるため、図17においては、両方を含む意味で、ポート要求と記述している。
Thereafter, the
トンネルサーバ装置2は、空きのポート番号から1つのポート番号を払い出して、ポート要求結果に含めて、クライアント装置1のトンネル機能部12に送信する(ステップ47)。ポート番号を受信したトンネル機能部12は、ポート番号をテーブル情報格納部124に格納するとともに、アプリケーション部13に、ポート要求の結果応答を返す(ステップ48)。
The
その後、図16で説明したようなパケット通信が行われる(ステップ49〜ステップ54)。また、第2の実施の形態でも、第1の実施の形態と同様に、トンネルを経由して送受信されるパケットには、ヘッダ(識別子+長さ)が付され、第1の実施の形態と同様にして、破損チェックが行われる。 Thereafter, the packet communication as described with reference to FIG. 16 is performed (steps 49 to 54). Also in the second embodiment, a header (identifier + length) is attached to a packet transmitted / received via a tunnel, as in the first embodiment. Similarly, a damage check is performed.
破損が検出された場合等には、トンネルが切断され(ステップ55)、トンネル再接続が行われる(ステップ56)。このときのトンネル接続要求には、セッションIDが付加され、トンネルサーバ装置2からの応答には、セッションIDが含められる(ステップ57)。これにより、トンネル切断後も、トンネル切断前と同じセッションIDのセッションを継続できる。 If damage is detected, the tunnel is disconnected (step 55), and tunnel reconnection is performed (step 56). The session ID is added to the tunnel connection request at this time, and the session ID is included in the response from the tunnel server device 2 (step 57). As a result, a session with the same session ID as before the tunnel disconnection can be continued after the tunnel disconnection.
次に、各フローチャートを参照して、シーケンスに示した処理における主要な処理をより詳細に説明する。 Next, with reference to each flowchart, main processes in the processes shown in the sequence will be described in more detail.
図18に、クライアント装置1におけるトンネル接続処理を示す。図18に示すように、クライアント装置1のトンネル機能部12は、トンネルサーバ装置1に接続を行った後(ステップ71)、サーバアドレスとセッションIDをトンネルサーバ装置1から受信する(ステップ72)。そして、トンネル機能部12は、クライアント接続管理テーブル及びクライアントポートマップテーブルにエントリを追加する(ステップ73)。
FIG. 18 shows tunnel connection processing in the client device 1. As shown in FIG. 18, the
図19に、トンネルサーバ装置2におけるトンネル接続時の処理を示す。図19に示すように、トンネル接続要求を受信したトンネルサーバ装置2は、まず、トンネル接続要求にセッションIDが付加されているか否かをチェックする(ステップ81)。
FIG. 19 shows processing at the time of tunnel connection in the
セッションIDがなければ、トンネルサーバ装置2は、擬似乱数からセッションIDを生成し(ステップ82)、正常完了応答、サーバアドレス、及びセッションIDをトンネル経由でクライアント装置1に返す(ステップ86)。
ステップ81において、セッションIDがトンネル接続要求に含まれていた場合、トンネルサーバ装置2は、サーバ接続管理テーブルにおいて当該セッションIDが存在するかどうかをチェックし、存在しなければエラーを返す(ステップ84)。存在する場合、サーバ接続管理テーブルのセッションIDに該当するエントリの接続識別子を更新し、ステップ86に進む。
If there is no session ID, the
In
図20に、クライアント装置1側でのポートマップ要求処理を示し、図21に、トンネルサーバ装置2でのポートマップ要求時の処理を示す。
FIG. 20 shows port map request processing on the client device 1 side, and FIG. 21 shows processing at the time of port map request in the
図20に示すように、クライアント装置1側でのポートマップ要求処理においては、まず、トンネル機能部12が、アプリケーション部13からの要求に基づき、ポートマップ要求と、要求するプロトコル種別をトンネル経由でトンネルサーバ装置2に送信する(ステップ91)。
As shown in FIG. 20, in the port map request process on the client device 1, the
正常終了応答が返ってきた場合に、トンネル機能部12は、クライアント接続管理テーブルからセッションIDを取得し(ステップ94)、クライアントポートマップテーブルに、セッションID、プロトコル種別、サーバポート番号、クライアントポート番号を追加する(ステップ95)。
When the normal end response is returned, the
続いて、図21を参照して、トンネルサーバ装置2側でのポートマップ要求に係る処理を説明する。
Next, with reference to FIG. 21, a process related to the port map request on the
ポートマップ要求を受信したトンネルサーバ装置2は、サーバ空きポートリストから、要求に対応するプロトコル種別のエントリ(プロトコル種別、ポート番号)を取得するとともに、当該エントリをリストから削除する(ステップ101、103)。そして、サーバポートマップテーブルにエントリ(プロトコル種別、ポート番号、セッションID)を追加するとともに(ステップ104)、正常完了応答と、払い出したポート番号をトンネル経由でクライアント装置1に送信する(ステップ105)。なお、要求に対応するプロトコル種別のエントリがない場合にはエラーが返される(ステップ102)。
The
本実施の形態では、ポートマップによる通信が終了した場合等において、ポートマップ解除処理を行う。図22に、クライアント装置1側のポートマップ解除処理を示し、図23に、トンネルサーバ装置2側のポートマップ解除処理を示す。
In the present embodiment, port map release processing is performed when communication using a port map is completed. FIG. 22 shows port map release processing on the client device 1 side, and FIG. 23 shows port map release processing on the
まず、図22を参照して、クライアント装置1側のポートマップ解除処理を説明する。アプリケーション部13から、ポートマップ解除要求を受信したトンネル機能部12は、アプリケーション部13に対応する解除対象ポート番号が、クライアントポートマップテーブルに存在するかどうかをチェックし、存在しなければエラーを返す(ステップ111、112)。
First, the port map release processing on the client device 1 side will be described with reference to FIG. Upon receiving the port map release request from the
解除対象ポート番号が存在する場合、トンネル機能部12は、ポートマップ解除要求、解除するプロトコル種別、及び解除するポート番号(サーバポート番号)をトンネルサーバ装置2にトンネルを経由して送信する(ステップ113)。
When the port number to be released exists, the
その後、正常終了応答が返却されれば、トンネル機能部12は、クライアント接続管理テーブルからセッションIDを取得し(ステップ115)、クライアントポートマップテーブルから、セッションIDに対応するエントリを削除する(ステップ116)。
Thereafter, if a normal end response is returned, the
次に、図23を参照して、トンネルサーバ装置2側でのポートマップ解除要求に係る処理を説明する。
Next, with reference to FIG. 23, processing related to a port map release request on the
ポートマップ解除要求を受信したトンネルサーバ装置2は、要求に係るプロトコル種別とポート番号との組み合わせがサーバポートマップテーブルに存在するか否かをチェックし、存在しなければエラーを返し(ステップ121、122)、存在すればステップ123に進む。ステップ123において、トンネルサーバ装置2は、サーバポートマップテーブルから解除対象エントリを削除し(ステップ123)、空きポートリストにエントリを追加し(ステップ124)、正常完了をトンネルを経由してクライアント装置1に送信する(ステップ125)。
The
図24に、クライアント装置1におけるパケット送信の際の処理を示し、図25にクライアント装置におけるパケット受信の際の処理を示す。 FIG. 24 shows processing at the time of packet transmission in the client device 1, and FIG. 25 shows processing at the time of packet reception in the client device.
まず、図24を参照して、パケット送信の際の処理を説明する。パケット捕捉・放流部14は、データ通信部11を流れる個々のパケットを監視し、パケットにおける通信情報が、指定された通信情報と一致するか否かを調べる(ステップ131)。本実施形態では、発アドレスがクライアント装置1のアドレスであり、プロトコル種別および発ポート番号がクライアントポートマップテーブルに存在するプロトコル種別およびクライアントポート番号である場合に、パケットをトンネル機能部13に渡す(トンネル送信する)ことが指定されており、パケット捕捉・放流部14は、パケットの通信情報が上記条件に合致すること判定した場合に、パケットをトンネル機能部12に渡す。
First, with reference to FIG. 24, processing at the time of packet transmission will be described. The packet capture /
トンネル機能部12は、図16を参照して説明したとおりに、パケットの発アドレスをサーバアドレスに書き換え、発ポート番号をサーバポート番号に書き換える(ステップ132)。そして、トンネル機能部12は、識別子と長さ情報からなるヘッダを付加したヘッダ付きパケットを生成し、当該ヘッダ付きパケットをトンネル経由で送出する(ステップ133)。
As described with reference to FIG. 16, the
次に、クライアント装置1におけるトンネル機能部12が、トンネル経由でヘッダ付きパケットを受信した場合の動作を図25のフローチャートを参照して説明する。
Next, the operation when the
まず、パケットを受信したトンネル機能部12は、それが切断通知か否か判定する(ステップ141)。切断通知である場合には、トンネル切断処理を行う(ステップ142)。
First, the
切断通知でない場合、第1の実施の形態と同様にして、トンネル機能部12は、パケットが破損しているか否かの判定を行う(ステップ143)。パケットが破損していないと判定した場合、パケット機能部12は、パケットからヘッダを取り外し(ステップ144)、宛先アドレスをローカルアドレスに、宛先ポート番号をローカルポート番号に書き換え、書き換えたパケットをパケット捕捉・放流部14を介してアプリケーション部13側に送出する(ステップ145)。
If it is not a disconnection notification, the
ステップ143において、パケットが破損していると判定された場合には、パケット機能部12は、トンネル再接続処理を行う(ステップ146)。
If it is determined in step 143 that the packet is damaged, the
図26に、トンネルサーバ装置2において、通信相手装置3から受信したパケットをトンネルに送信する際の処理を示し、図27にトンネルサーバ装置2においてトンネルからパケットを受信する際の処理を示す。
FIG. 26 shows processing when the
トンネルサーバ装置2は、通信相手装置3から受信したパケットの宛先ポート番号を参照し、まず、サーバポートマップテーブルから、当該ポート番号(サーバポート番号)に対応するセッションIDを探し(ステップ151)、無ければパケットを廃棄し(ステップ152)、あればセッションIDを取得する(ステップ153)。そして、セッションIDに対応する接続識別子を取得し、パケットにヘッダ(識別子+長さ)を付し、ヘッダ付きパケットを、接続識別子に対応付けて設定してあるトンネル経由で送信する(ステップ154)。
The
次に、図27を参照して、トンネルサーバ装置2においてトンネルからパケットを受信する際の処理を説明する。
Next, with reference to FIG. 27, processing when the
トンネルサーバ装置2は、受信したパケットが切断通知であるかどうかをチェックし(ステップ161)、切断通知である場合、サーバ接続管理テーブル、及びポートマップテーブルの該当エントリをクリアし、トンネル接続を切断する(ステップ165、163)。
The
受信したパケットが切断通知でない場合、クライアント装置のトンネル機能部と同様に、パケットが破損しているか否か判定する。パケットが破損していなければ、ヘッダを取り外したパケットをネットワークに送出する(ステップ162、164)。ステップ162において、パケットの破損が検出された場合には、トンネル接続を切断する(ステップ163)。
If the received packet is not a disconnection notification, it is determined whether the packet is damaged as in the tunnel function unit of the client device. If the packet is not damaged, the packet with the header removed is sent to the network (
なお、このとき、クライアント装置1のトンネル機能部12は、トンネルが切断されたことを検知し、再接続処理を行うことになる。
At this time, the
次に、図28を参照して、クライアント装置1側での、アプリケーション部13からの指示に基づくトンネル切断処理を説明する。
Next, tunnel disconnection processing based on an instruction from the
アプリケーション部13から、トンネル切断要求を受けたトンネル機能部12は、トンネルサーバ装置2に対して切断通知を送信し(ステップ171)、トンネルサーバ装置1との接続を切断する(ステップ172)。そして、トンネル機能部12は、セッションIDをクライアント接続管理テーブルから取得し(ステップ173)、セッションIDをキーとして、クライアントポートマップテーブル、及びクライアント接続管理テーブルのエントリをクリアする(ステップ174)。
The
次に、図29を参照して、クライアント装置1側におけるトンネル再接続処理(パケット破損時等)を説明する。 Next, with reference to FIG. 29, a tunnel reconnection process (such as when a packet is damaged) on the client apparatus 1 side will be described.
まず、トンネル機能部12は、トンネルサーバ装置2との接続を一旦切断する(ステップ181)。そして、トンネル機能部12は、トンネルサーバ装置182に接続し(ステップ182)、切断前に接続していたトンネル接続のセッションIDをトンネルサーバ装置2に送信し(ステップ183)、トンネルサーバ装置2からサーバアドレスとセッションIDを受信する(ステップ184)。なお、サーバ側でパケット破損があった場合等、意図しないトンネル切断があった場合は、ステップ182から開始する。
First, the
トンネル機能部12は、送信したセッションIDと受信したセッションIDとが同一であるか否かを確認し(ステップ185)、同一であればここでの処理を終了する。つまり、この場合、切断前のセッションIDにてトンネル通信が行われることになる。
The
ステップ185にて、送信したセッションIDと受信したセッションIDとが同一でなかった場合、旧セッションIDのテーブルエントリがクリアされ、新セッションIDでのエントリが追加される(ステップ186、187)。その後は、新セッションIDにてトンネル通信が行われる。 If the transmitted session ID and the received session ID are not the same in step 185, the table entry of the old session ID is cleared and an entry with the new session ID is added (steps 186 and 187). After that, tunnel communication is performed with the new session ID.
つまり、本実施の形態では、切断と再接続の場合に、セッションIDを使用して、既に行われているポートマッピングの状態を保持することとしている。 That is, in the present embodiment, in the case of disconnection and reconnection, the state of port mapping already performed is held using the session ID.
<第3の実施の形態>
次に第3の実施の形態について説明する。本実施の形態における全体のシステム構成については、図3に示した第1の実施の形態でのシステム構成と同じである。また、クライアント装置1とトンネルサーバ装置2は、第1及び第2の実施の形態で説明した機能を含むものとする。以下、第1及び第2の実施の形態と異なる点を中心に説明する。
<Third Embodiment>
Next, a third embodiment will be described. The overall system configuration in the present embodiment is the same as the system configuration in the first embodiment shown in FIG. The client device 1 and the
図30に、本実施の形態におけるクライアント装置1のトンネル機能部12の機能構成図を示す。図30に示すように、本実施の形態におけるクライアント装置1のトンネル機能部12は、第2の実施の形態での構成に加えて、生存確認処理部125及び時間情報格納部126を有する。
FIG. 30 is a functional configuration diagram of the
生存確認処理部125は、後述する生存確認に係る処理を行う機能とともに、当該処理ためのタイマーとして、(従来と同様の)生存確認要求を送信するタイミング決定用のタイマー1(一例として30秒程度)、受信途切れ検出用のタイマー2(一例として一秒程度)、及び、切断検出時間計測用のタイマー3(一例として3秒程度)を備えている。時間情報格納部126には、後述するRTT、最終送信時刻、平均送信間隔、要求送信時刻等の時間情報が格納されるとともに、受信予測フラグの情報も格納される。
The survival
図31に、本実施の形態におけるトンネルサーバ装置2の機能構成図を示す。図31に示すように、本実施の形態におけるトンネルサーバ装置2は、第2の実施の形態での構成に加えて、生存確認のための処理を行う生存確認処理部25及び時間情報格納部26を有する。時間情報格納部26には、後述する最終受信時刻等が格納される。
FIG. 31 shows a functional configuration diagram of
次に、図32、及び各フローチャートを適宜参照して、本実施の形態における処理を説明する。図32におけるトンネルサーバ装置2と、クライアント装置1(トンネル機能部12)間の通信はトンネルを介した通信である。
Next, processing in the present embodiment will be described with reference to FIG. 32 and each flowchart as appropriate. Communication between the
まず、クライアント装置1のトンネル機能部12は、初期化処理を行う。初期化処理では、RTT値を0に設定し、現在時刻を最終送信時刻にセットする。そして、タイマー1をスタートさせ、受信予測フラグをクリアする(例えば0にする)。なお、受信予測フラグは、データパケットの受信途切れを検知するためのフラグであり、データパケットを受信した場合にセットされ、当該フラグがセットされた状態で、タイマー2が満了した場合に、生存確認要求が送信される。
First, the
トンネル機能部12は、ポートマップ要求等の制御パケット(アプリケーション部13から送信されるデータを含むデータパケット以外のパケット)を送信する場合に、送信する時刻を「要求送信時刻」として記録しておく。
When the
特に、制御パケットとして生存確認要求を送信する場合には、送信する時刻を「要求送信時刻」として記録しておくとともに、生存確認要求応答待ち時間満了(つまり、切断)を検知するためのタイマー3を始動させる。タイマー3がタイムアウトした場合は、現在のトンネル接続を切断し、トンネル再接続を実行することになる。
In particular, when a survival confirmation request is transmitted as a control packet, the transmission time is recorded as a “request transmission time”, and a
トンネル機能部12が、制御パケットに対する応答を受信した場合には、当該受信時刻に基づき、パケットがトンネルサーバ装置2とクライアント装置1との間を往復する時間であるRTT(Round Trip Time)を決定し、それを時間情報格納部126に格納する。
When the
図33は、制御パケット受信時におけるトンネル機能部12の処理をより詳細に示した図である。図33を参照して、制御パケット受信時の処理をより具体的に説明する。
FIG. 33 is a diagram showing in more detail the processing of the
図33に示すように、制御パケットのうち、生存確認要求応答を受信した場合には、タイマー1を始動させ(既に始動していた場合には一旦停止し再始動させ)、タイマー3を停止する(ステップ191)。その後、ステップ192に進む。生存確認要求応答以外の制御パケットの場合は、ステップ192から開始する。
As shown in FIG. 33, when a survival confirmation request response is received in the control packet, the timer 1 is started (if already started, it is stopped and restarted), and the
ステップ192において、トンネル機能部12は、受信予測フラグをクリアし、タイマー2を停止する。そして、現在時刻−要求送信時刻を算出し、それを応答時間とし、応答時間が現在のRTT値より大きいかどうかをチェックし、大きくなければ処理を終了し、大きければ、当該応答時間をRTT値として時間情報格納部126に格納する。すなわち、ここでの処理により、セッションの中での最大のRTTが、記録されることになる。
In
図32に戻り、クライアント装置1は、パケット(制御パケットパケットを含む全ての種類のパケット)を送信する度に、当該パケットの送信時刻を「最終送信時刻」として、時間情報格納部126に格納し、当該「最終送信時刻」に基づき、「平均送信間隔」を計算し、それを時間情報格納部126に格納しておく。
Returning to FIG. 32, each time the client device 1 transmits a packet (all types of packets including control packet packets), the transmission time of the packet is stored in the time
より具体的には、図34のフローチャートに示すように、トンネル機能部12は、まず、現在時刻−最終送信時刻を、送信間隔とする。そして、時間情報格納部126に格納されている平均送信間隔を取得し、当該平均送信間隔を用いて、α×送信間隔+(1−α)×平均送信間隔を計算し、これを新たな平均送信間隔として時間情報格納部126に格納する。αは、0から1の間の定数であり、事前に定めておくものである。
More specifically, as shown in the flowchart of FIG. 34, the
そして、トンネル機能部12は、現在時刻を、「最終送信時刻」として時間情報格納部126に格納する。
Then, the
図32に戻り、トンネルサーバ装置2は、クライアント装置1からパケット(制御パケットパケットを含む全ての種類のパケット)を受信する度に、受信時刻を「最終受信時刻」として時間情報格納部26に格納しておき、データパケット(制御パケットでないデータのIPパケット)の送信時に、当該データパケットの送信時刻の「最終受信時刻」からの経過時間を、IPパケットヘッダの所定の領域(本実施形態ではチェックサム欄)に上書きして送信する。図35に、チェックサム欄を含むIPパケットの構成を示す。
Returning to FIG. 32, every time a packet (all types of packets including control packet packets) is received from the client device 1, the
クライアント装置1のトンネル機能部12が、トンネルサーバ装置1からデータパケットを受信した際の処理は、図36に示すとおりである。
The processing when the
図36に示すように、トンネル機能部12が、データパケットを受信すると、まず、受信予測フラグをセットして(ステップ211)、タイマー2を始動する(ステップ212)。
As shown in FIG. 36, when the
また、トンネル機能部12は、パケットを受信した時刻(「現在時刻」)の「最終送信時刻」からの経過時間(現在時刻−最終送信時刻)を算出し、当該経過時間が2×RTT以上である場合には、「チェックサム欄」が(「現在時刻」−「最終送信時刻」)より大きい場合にのみ生存確認要求をトンネルサーバ装置1に送信する(ステップ213、214、215)。
Further, the
上記経過時間が、2×RTT未満の場合には、「チェックサム欄」が「平均送信間隔」×4よりも大きい場合にのみ、生存確認要求を送信する(ステップ213、216、215)。
When the elapsed time is less than 2 × RTT, a survival confirmation request is transmitted only when the “checksum field” is larger than “average transmission interval” × 4 (
すなわち、クライアント装置1から前回のパケットを送信した時刻(最終送信時刻)から、今回のデータパケットを受信した時刻までの経過時間がRTTと比較してある程度長い場合(本実施形態では、RTTの2倍以上)、生存確認の役割を果たすべき、クライアント装置から送信するパケットの時間間隔が長くなっている可能性を予想できる。 That is, when the elapsed time from the time when the previous packet was transmitted from the client device 1 (final transmission time) to the time when the current data packet was received is somewhat longer than the RTT (in this embodiment, 2 of RTT). It is possible to predict the possibility that the time interval of packets transmitted from the client device, which should play the role of survival confirmation, is long.
そこで、この場合、サーバ側での経過時間(チェックサム欄)と、クライアント側での経過時間を比較し、サーバ側での経過時間のほうが短い場合には、クライアント装置1から送ったパケットがサーバに届いており、生存確認の役割を果たしていると判断できるため、生存確認要求を送出しない。一方、サーバ側での経過時間のほうが長い場合には、クライアント装置1から前回送信したパケットが正常にトンネルサーバに届いていないことを想定できるため、前回送信したパケットが生存確認の役割を果たしていないと推定でき、生存確認要求を送信することとしている。 Therefore, in this case, the elapsed time (checksum field) on the server side is compared with the elapsed time on the client side. If the elapsed time on the server side is shorter, the packet sent from the client device 1 is Therefore, the existence confirmation request is not sent out because it can be determined that it has played the role of existence confirmation. On the other hand, when the elapsed time on the server side is longer, it can be assumed that the packet transmitted last from the client device 1 has not normally reached the tunnel server, so the packet transmitted last time does not play the role of survival confirmation. It is assumed that a survival confirmation request is sent.
一方、クライアント装置1から前回のパケットを送信した時刻(最終送信時刻)から、データパケットを受信した時刻までの経過時間がRTTと比較してある程度短い場合(本実施形態では、RTTの2倍未満)、前回送信したパケットに対応するデータパケットではなく、それ以前の送信パケットに対応するデータパケットを受信したこと等を想定できる。 On the other hand, when the elapsed time from the time when the previous packet was transmitted from the client device 1 (last transmission time) to the time when the data packet was received is somewhat shorter than the RTT (in this embodiment, less than twice the RTT) ) It can be assumed that a data packet corresponding to a previous transmission packet is received instead of a data packet corresponding to the previously transmitted packet.
そこで、この場合は、サーバ側での経過時間が、平均送信間隔よりもある程度長いか否か(本実施形態では、平均送信間隔×4より長いか否か)をチェックしている。サーバ側での経過時間が、平均送信間隔よりもある程度長くないのであれば、クライアント装置1が受信したデータパケットを送信したサーバにおいて、前回受信されたパケットにて、生存確認が成立していると判断できるので、生存確認要求送信は行われない。 Therefore, in this case, it is checked whether or not the elapsed time on the server side is somewhat longer than the average transmission interval (in this embodiment, whether or not it is longer than the average transmission interval × 4). If the elapsed time on the server side is not somewhat longer than the average transmission interval, the server that transmitted the data packet received by the client apparatus 1 has confirmed that the survival confirmation has been established in the previously received packet. Since it can be determined, the survival confirmation request is not transmitted.
一方、サーバ側での経過時間が、平均送信間隔よりもある程度長い場合には、サーバにおいて、前回受信されたパケットによる生存確認以降、クライアント装置1からの生存確認の役割を果たすパケット送信が行われていないことを推定できるため、生存確認要求を送信することとしている。 On the other hand, if the elapsed time on the server side is somewhat longer than the average transmission interval, the server transmits a packet that plays a role of survival confirmation from the client apparatus 1 after the survival confirmation by the previously received packet. Since it is possible to estimate that there is not, a survival confirmation request is sent.
一方、上記のチェックと並行して、クライアント装置1は、データパケット受信時にタイマー2を起動した後、パケットを受信せずに、タイマー2の時間が経過した場合に生存確認要求を送信する。つまり、受信途切れを検出した場合に、生存確認要求を送信している。
On the other hand, in parallel with the above check, after starting the
また、クライアント装置1は、タイマー1を用いて、タイマー1が満了する度に、一定時間間隔で生存確認要求送出を行っている。 Further, the client device 1 uses the timer 1 to send out a survival confirmation request at regular time intervals whenever the timer 1 expires.
図37は、生存確認動作概念の一例を示す図である。図37に示す例は、データパケットの送受信が全く行われていなかった場合の例であり、この場合、タイマー1のタイムアウト毎に、定期的に生存確認要求送信が行われることになる。 FIG. 37 is a diagram illustrating an example of a survival confirmation operation concept. The example shown in FIG. 37 is an example in the case where transmission / reception of data packets has not been performed at all. In this case, a survival confirmation request is periodically transmitted every time the timer 1 times out.
図38は、生存確認動作概念の他の例を示す図である。図38に示す例において、前述したとおり、クライアント装置1には、トンネルサーバ装置2での最終受信時刻からの経過時間をチェックサム欄に含むデータパケットが届けられる。そして、前述したロジックで、パケット毎にRTTや平均送信間隔の値から異常判定を行うことにより、生存確認要求送出要否が判定される。更に、データパケット受信時に起動するタイマー2により、データパケットの受信途切れをチェックし、受信途切れを検知した場合には、その都度生存確認要求を送信することとしている。
FIG. 38 is a diagram illustrating another example of the survival confirmation operation concept. In the example shown in FIG. 38, as described above, the client device 1 is delivered with a data packet including the elapsed time from the last reception time in the
本方式により、データが途切れることなく送受信されている場合には、送受信データ自身が生存確認の役割を果たすため、生存確認要求を行わず、一方、図36に示したロジックで異常を検知した場合や、タイマー2でデータの途切れを検知した場合には、生存確認要求を送信することとしているので、従来技術に比べて、生存確認要求自身の送信に係る負担を減らしながら、データ通信中は、比較的短時間で異常を検出でき、効率的なデータ通信が可能になる。
When data is transmitted and received without interruption by this method, since the transmitted / received data itself plays a role of survival confirmation, a survival confirmation request is not made, whereas an abnormality is detected by the logic shown in FIG. Or, when the interruption of data is detected by the
<実施の形態のまとめ、効果について>
本発明の実施の形態では、アプリケーション部13が、通常の通信ライブラリを使用して送受信するパケットを、ネットワークインタフェースの直前に設けたパケット捕捉・放流部14により捕捉し、トンネルを使って送信する。逆に、トンネルから送られてきたパケットを、パケット捕捉・放流部14から放流し、OSのプロトコルスタックを経由してアプリケーション部13に引き渡している。
<Summary of Embodiments and Effects>
In the embodiment of the present invention, the
また、破損データ対応では、ヘッダを短くし、パケットをトンネルから受信する段階で、破損データを発見した場合には、そもそもトンネル処理が破綻しているとみなし、トンネルを切断し、再接続を行うことで、破損データの読み飛ばし処理を省略している。 Corresponding to corrupted data, if the corrupted data is found at the stage where the header is shortened and the packet is received from the tunnel, it is assumed that the tunnel processing has failed in the first place, and the tunnel is disconnected and reconnected. As a result, the process of skipping damaged data is omitted.
また、本発明の実施の形態では、トンネル機能部12は、トンネルの利用開始に先立ち、トンネルサーバ装置2が持つアドレスを取得する。そして、アプリケーション部13は、自らが通信に利用するポート番号をトンネル機能部12に対して予め宣言し予約すると同時に、トンネル機能部12は、トンネルサーバ装置2側に、対応するポート番号を割り当ててもらい、トンネル機能部12は、そのポート番号を受信する。
In the embodiment of the present invention, the
その結果、宣言したポートのパケットのみがトンネルを通じて送受信され、また、送受信に際してはIPアドレス及びポート番号変換が行われる。また、トンネル接続の際は、再接続に備えて、セッションIDをトンネルサーバが払い出し、再接続が発生した場合に、セッションIDを提示することで、ポートマッピング状態を引き継ぐこととしている。 As a result, only the packet of the declared port is transmitted / received through the tunnel, and the IP address and port number are converted at the time of transmission / reception. In tunnel connection, in preparation for reconnection, the tunnel server issues a session ID, and when reconnection occurs, the session mapping is presented to take over the port mapping state.
また、本発明の実施の形態では、トンネル接続が正常動作するか否かを確認するための生存確認要求以外に、データパケットや、データパケット以外の制御パケットの応答時間等を利用して効率的に生存確認要求を行っている。具体的には、トンネル機能部12が、トンネルサーバ装置2からデータパケットを受信した際には、最終送信時刻からの経過時間を調べ、それが2×RTT以上の場合であって、チェックサム欄>現在時刻−最終送信時刻の場合には、生存確認要求を送信し、2×RTT未満の場合には、「チェックサム欄」>平均送信間隔×4の場合に、生存確認要求を送信する。更に、データパケット受信時に、前述したタイマー2を起動し、データパケットが途切れてタイマー2の時間が経過した場合にも、生存確認要求を送信する。
Further, in the embodiment of the present invention, in addition to the survival confirmation request for confirming whether the tunnel connection operates normally, the response time of the control packet other than the data packet and the data packet is efficiently used. A survival confirmation request is made. Specifically, when the
本実施の形態で説明した技術を用いることにより、アプリケーションの改造等が少なく、効率の良く安定(かつセキュアな)した通信経路を提供することが可能となる。より具体的には以下のとおりである。 By using the technique described in the present embodiment, it is possible to provide an efficient and stable (and secure) communication path with less modification of applications and the like. More specifically, it is as follows.
トンネル機能を実現するために、ネットワークインタフェースの直前に、パケット捕捉・放流部14を設けた。これにより、アプリケーション部13は、OSが提供するプロトコルスタックをそのまま使用することができるため、改造が不要あるいは小規模で済む。これは、オブジェクト形式で提供される既存ソフトウェアやライブラリを使用しなければならない場合に特に有用である。また、OSが提供するプロトコルスタックをそのまま使用するため、自前でのプロトコル処理が不要となり、OSのプロトコルスタックとの仕様の差分による不安定要因を持たずに済む上、トンネル機能部13の実装が小規模で済む。
In order to realize the tunnel function, a packet capturing / discharging
破損データ対応では、ヘッダを短くすることにより、パケット送信毎に必要だったオーバーヘッドを省略することができ、結果として伝送効率を向上させることができる。特に、トンネル接続として、HTTPSのように接続が暗号化され途中ノードで復号されない場合、通常はトンネルデータが破損することはなく、ヘッダ短縮の効果がより大きくなる。更に、伝送路のMTU(Message Transfer Unit)サイズに上限がある場合に、トンネリングのためのオーバーヘッドでそれを越えやすくなってしまうが、本実施の形態による技術では、ヘッダ長が短いために、同じMTUの中でより大きなパケットを伝送できる。 In correspondence with damaged data, by shortening the header, the overhead required for each packet transmission can be omitted, and as a result, the transmission efficiency can be improved. In particular, as a tunnel connection, when the connection is encrypted and is not decrypted by the intermediate node as in HTTPS, the tunnel data is not normally damaged, and the effect of shortening the header is further increased. Furthermore, when there is an upper limit on the MTU (Message Transfer Unit) size of the transmission path, it is easy to exceed it due to the overhead for tunneling. However, in the technique according to this embodiment, the header length is short, so the same. Larger packets can be transmitted within the MTU.
第2の実施の形態で説明したポートマッピング方式では、予めアプリケーション部13等から指定された特定ポートのパケットのみを伝送する方式とした。これにより、アプリケーション部13が使用する必要最低限のポートのみが外部に対して開かれることになり、外部からの侵入や攻撃、あるいはトロイの木馬等による内部からの情報流出のリスクを最小化することができる。
In the port mapping method described in the second embodiment, only a packet of a specific port designated in advance by the
また、アドレス・ポート変換を行うことにより、トンネルサーバ側に割り当てられたIPアドレスを複数のトンネルクライアントでポート単位に分割して利用できるため、枯渇が心配されているIPv4のグローバルIPアドレス等を節約して利用することができる。また、従来技術の複数の仮想ネットワークアダプタが存在する方式に比べて、ルーティングが単純なままで通信することができるため、ルーティングに起因するトラブルを未然に防止することができる。 In addition, by performing address / port conversion, the IP address assigned to the tunnel server can be divided into ports by multiple tunnel clients, saving IPv4 global IP addresses that are worried about exhaustion. Can be used. In addition, since communication can be performed while routing is simple as compared with a conventional technique in which a plurality of virtual network adapters exist, troubles due to routing can be prevented in advance.
また、第3の実施の形態として説明した技術によれば、無通信の場合は、単純な生存確認要求を送付する場合と同程度の間隔で生存確認要求を実現できる。また、データパケットによる通信が行われている場合には、データパケット毎に応答悪化を検出可能な点に加えて、定常的なデータパケットの受信が途切れた段階で、生存確認要求を送付することとしているので、通信中の異常検出を短時間で実施することができる。 Further, according to the technique described as the third embodiment, in the case of no communication, the survival confirmation request can be realized at the same interval as when a simple survival confirmation request is sent. In addition, when communication is performed using data packets, in addition to being able to detect response deterioration for each data packet, a survival confirmation request should be sent when regular data packet reception is interrupted. Therefore, it is possible to detect an abnormality during communication in a short time.
また、データパケットがIPパケットである場合、受信時のポート書き換えで再計算しなければならず、伝送が無意味なIPパケットのチェックサム欄を利用することで、適宜発せられる生存確認要求パケットを除き、本実施の形態に係る通信オーバーヘッドは無いことになる。 In addition, if the data packet is an IP packet, it must be recalculated by rewriting the port at the time of reception, and by using the checksum column of the IP packet whose transmission is meaningless, a survival confirmation request packet that is appropriately transmitted can be obtained. Except for this, there is no communication overhead according to the present embodiment.
本発明は、上記の実施の形態に限定されることなく、特許請求の範囲内において、種々変更・応用が可能である。 The present invention is not limited to the above-described embodiments, and various modifications and applications are possible within the scope of the claims.
1 クライアント装置
2 トンネルサーバ装置
3 通信相手装置
4 ファイアフォール装置
5 インターネット
6 プライベートネットワーク
11 データ通信部
12 トンネル機能部
13 アプリケーション部
14 パケット捕捉・放流部
21 トンネル処理部
22 破損データ処理部
23 テーブル情報格納部
24 アドレス・ポート処理部
25 生存確認処理部
26 時間情報格納部
121 トンネル処理部
122 破損データ処理部
123 アドレス・ポート処理部
124 テーブル情報格納部
125 生存確認処理部
126 時間情報格納部
DESCRIPTION OF SYMBOLS 1
Claims (9)
前記トンネルサーバ装置との間で前記トンネルを構築し、当該トンネルを経由してパケットの送受信を行うトンネル機能手段と、
通信ネットワークを介してデータ送受信を行うためのデータ通信手段と、
前記データ通信手段を経由するパケットを監視し、当該パケットの通信情報に基づき、当該パケットが、前記クライアント装置が備えるアプリケーション部から出力されたパケットであると判定した場合に、当該パケットを前記トンネル機能手段に渡すパケット制御手段とを備え、
前記トンネル機能手段は、前記パケット制御手段から受け取った前記パケットを、前記トンネルを経由して前記通信相手装置に向けて送信するクライアント装置であり、
前記トンネル機能手段は、
前記トンネルサーバ装置から、当該トンネルサーバ装置のアドレスとポート番号であるサーバアドレスとサーバポート番号を受け取り、当該サーバアドレスとサーバポート番号とを、前記アプリケーション部に対応するクライアントポート番号に対応付けて記憶手段に格納し、
前記パケット制御手段から、前記クライアントポート番号を発ポート番号として含むパケットを受け取った場合に、前記記憶手段を参照することにより、前記パケットにおける発アドレスを前記サーバアドレスに変換し、前記パケットにおける発ポート番号を前記サーバポート番号に変換し、当該変換を施したパケットを前記トンネルを経由して送出する
ことを特徴とするクライアント装置。 A client device that performs data communication with a communication partner device via a tunnel established with a tunnel server device,
Tunnel function means for constructing the tunnel with the tunnel server device and transmitting and receiving packets via the tunnel;
Data communication means for transmitting and receiving data via a communication network;
The packet passing through the data communication means is monitored, and when it is determined that the packet is a packet output from the application unit included in the client device based on the communication information of the packet, the packet is transferred to the tunnel function. A packet control means for passing to the means,
The tunnel function means is a client device that transmits the packet received from the packet control means to the communication counterpart device via the tunnel ,
The tunnel function means is
A server address and a server port number which are the address and port number of the tunnel server device are received from the tunnel server device, and the server address and the server port number are stored in association with the client port number corresponding to the application unit. Stored in the means,
When a packet including the client port number as an outgoing port number is received from the packet control means, the outgoing address in the packet is converted into the server address by referring to the storage means, and the outgoing port in the packet A client device , wherein a number is converted into the server port number, and the converted packet is transmitted via the tunnel .
前記トンネル機能手段は、
前記ヘッダの情報に基づき、前記パケットが破損しているか否かを判定し、当該パケットが破損していると判定した場合に、前記トンネルを切断し、その後に、前記トンネルサーバ装置との間にトンネルを再構築する破損処理手段を備える
ことを特徴とする請求項1又は2に記載のクライアント装置。 The packet received by the tunnel function means via the tunnel has a header,
The tunnel function means is
Based on the information of the header, it is determined whether or not the packet is damaged. When it is determined that the packet is damaged, the tunnel is disconnected, and thereafter, between the tunnel server device and the tunnel server device. The client apparatus according to claim 1, further comprising a damage processing unit that reconstructs a tunnel.
前記トンネルを経由して、前記サーバアドレスを宛先アドレスとして含み、前記サーバポート番号を宛先ポート番号として含むパケットを受信した場合に、前記記憶手段を参照することにより、前記パケットにおける宛先アドレスを前記クライアント装置のアドレスに変換し、前記パケットにおける宛先ポート番号を前記クライアントポート番号に変換し、当該変換を施したパケットを、前記パケット制御手段を介して前記アプリケーション部に送出する
ことを特徴とする請求項1ないし3のうちいずれか1項に記載のクライアント装置。 The tunnel function means is
When the packet including the server address as the destination address and the server port number as the destination port number is received via the tunnel, the destination address in the packet is determined by referring to the storage unit. The device address is converted to a device address, the destination port number in the packet is converted to the client port number, and the converted packet is sent to the application unit via the packet control means. 4. The client device according to any one of 1 to 3 .
前記トンネルサーバ装置との間で前記トンネルを構築し、当該トンネルを経由してパケットの送受信を行うトンネル機能手段と、
通信ネットワークを介してデータ送受信を行うためのデータ通信手段と、
前記データ通信手段を経由するパケットを監視し、当該パケットの通信情報に基づき、当該パケットが、前記クライアント装置が備えるアプリケーション部から出力されたパケットであると判定した場合に、当該パケットを前記トンネル機能手段に渡すパケット制御手段とを備え、
前記トンネル機能手段は、前記パケット制御手段から受け取った前記パケットを、前記トンネルを経由して前記通信相手装置に向けて送信するクライアント装置であり、
前記トンネルサーバ装置は、前記クライアント装置からパケットを受信する度に、当該パケットの受信時刻を最終受信時刻として記憶手段に保持し、データパケットを送信する場合には、当該データパケットの送信時刻の前記最終受信時刻からの経過時間を算出し、当該経過時間をサーバ側経過時間として前記データパケットに含めて送信し、
前記トンネル機能手段は、
パケットを前記トンネルサーバ装置に送信する度に、当該パケットの送信時刻を最終送信時刻として記憶手段に保持し、
前記トンネルサーバ装置から、前記データパケットを受信した場合に、当該データパケットの受信時刻の前記最終送信時刻からの経過時間をクライアント側経過時間として算出し、
前記データパケットから取得したサーバ側経過時間と、前記クライアント側経過時間とに基づき、前記トンネルサーバ装置に対して生存確認要求を送信するか否かを決定する
ことを特徴とするクライアント装置。 A client device that performs data communication with a communication partner device via a tunnel established with a tunnel server device,
Tunnel function means for constructing the tunnel with the tunnel server device and transmitting and receiving packets via the tunnel;
Data communication means for transmitting and receiving data via a communication network;
The packet passing through the data communication means is monitored, and when it is determined that the packet is a packet output from the application unit included in the client device based on the communication information of the packet, the packet is transferred to the tunnel function. A packet control means for passing to the means,
The tunnel function means is a client device that transmits the packet received from the packet control means to the communication counterpart device via the tunnel,
Each time the tunnel server device receives a packet from the client device, the tunnel server device stores the reception time of the packet as a final reception time in a storage unit, and when transmitting a data packet, the transmission time of the data packet Calculate the elapsed time from the last reception time, send the elapsed time included in the data packet as the server side elapsed time,
The tunnel function means is
Each time a packet is transmitted to the tunnel server device, the transmission time of the packet is held in the storage means as the final transmission time,
When the data packet is received from the tunnel server device, the elapsed time from the last transmission time of the reception time of the data packet is calculated as the client-side elapsed time,
A client device, wherein whether or not to transmit a survival confirmation request to the tunnel server device is determined based on the server-side elapsed time acquired from the data packet and the client-side elapsed time.
前記クライアント側経過時間が、所定の時間以上である場合には、前記サーバ側経過時間が前記クライアント側経過時間より大きい場合に、生存確認要求を送信し、
前記クライアント側経過時間が、前記所定の時間未満である場合には、前記サーバ側経過時間が、パケットの送信時刻から算出される平均送信間隔の所定数倍以上である場合に、生存確認要求を送信する
ことを特徴とする請求項5に記載のクライアント装置。 The tunnel function means is
When the client side elapsed time is equal to or longer than a predetermined time, if the server side elapsed time is greater than the client side elapsed time, a survival confirmation request is transmitted,
When the client side elapsed time is less than the predetermined time, the server side elapsed time is not less than a predetermined number of times the average transmission interval calculated from the packet transmission time, and a survival confirmation request is issued. The client apparatus according to claim 5 , wherein the client apparatus transmits the client apparatus.
A program for causing a computer to function as tunnel function means and packet control means in the client device according to any one of claims 1 to 8 .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010111300A JP5535757B2 (en) | 2010-05-13 | 2010-05-13 | Client device and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010111300A JP5535757B2 (en) | 2010-05-13 | 2010-05-13 | Client device and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2011239343A JP2011239343A (en) | 2011-11-24 |
| JP5535757B2 true JP5535757B2 (en) | 2014-07-02 |
Family
ID=45326793
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2010111300A Expired - Fee Related JP5535757B2 (en) | 2010-05-13 | 2010-05-13 | Client device and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5535757B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6403210B2 (en) * | 2015-03-25 | 2018-10-10 | Necプラットフォームズ株式会社 | Communication control device, communication control program, and PPP session recovery method |
| WO2025062549A1 (en) * | 2023-09-21 | 2025-03-27 | 日本電信電話株式会社 | Interval calculation device and interval calculation method |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3990395B2 (en) * | 2004-09-30 | 2007-10-10 | 株式会社東芝 | Communication method and communication system |
-
2010
- 2010-05-13 JP JP2010111300A patent/JP5535757B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2011239343A (en) | 2011-11-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108601043B (en) | Method and apparatus for controlling wireless access point | |
| US8219606B2 (en) | Methods, systems, and computer program products for sharing information for detecting an idle TCP connection | |
| US11064058B1 (en) | Methods, systems, and computer program products for sharing information for detecting at least one time period for a connection | |
| JP5378494B2 (en) | Data transmission system and method using relay server | |
| CA2718274C (en) | System and method for creating a transparent data tunnel | |
| US8984114B2 (en) | Dynamic session migration between network security gateways | |
| WO2008044432A1 (en) | Information communication device, information communication method and program | |
| WO2014019451A1 (en) | Method, device, and system for quick notification of cgn exception | |
| JP2011188358A (en) | Vpn device and ip communication apparatus | |
| CN107205026A (en) | A kind of Point-to-Point Data Transmission method and system | |
| CN116233279B (en) | A message processing method, device and system | |
| JP2012083891A (en) | Failover system, storage processor, and failover control method | |
| JP2011211490A (en) | Vpn device, ip communication apparatus, and server device | |
| US10075565B1 (en) | Methods, systems, and computer program products for sharing information for detecting an idle TCP connection | |
| CN104580346B (en) | Data transmission method and device | |
| CN107332793A (en) | A kind of message forwarding method, relevant device and system | |
| JP2011239277A (en) | Vpn apparatus, vpn networking method, program, and storage medium | |
| JP5535757B2 (en) | Client device and program | |
| CN101465858B (en) | Method for implementing private network penetration of monitoring business, network appliance and server | |
| JP2016162324A (en) | Information processing system, control program and control method | |
| JP2011160286A (en) | Call control server, relay server, vpn device, vpn communication system, vpn networking method, program, and storage medium | |
| JP5025449B2 (en) | Relay communication system | |
| JP5889122B2 (en) | Control node and communication control method | |
| KR101410510B1 (en) | Method and apparatus for data transmission using SCTP | |
| JP4796883B2 (en) | NAT management system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130130 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131011 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131022 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20131224 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20140401 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140423 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5535757 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |