JP2009060245A - Communication control method, program and communication device - Google Patents
Communication control method, program and communication device Download PDFInfo
- Publication number
- JP2009060245A JP2009060245A JP2007224274A JP2007224274A JP2009060245A JP 2009060245 A JP2009060245 A JP 2009060245A JP 2007224274 A JP2007224274 A JP 2007224274A JP 2007224274 A JP2007224274 A JP 2007224274A JP 2009060245 A JP2009060245 A JP 2009060245A
- Authority
- JP
- Japan
- Prior art keywords
- packet
- ipsec
- communication device
- data
- ike
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本発明は、通信装置が他の通信装置とIPsec通信を行う際の通信制御方法、プログラム及び通信装置に関する。 The present invention relates to a communication control method, a program, and a communication device when a communication device performs IPsec communication with another communication device.
IPsecは、TCP/IPプロトコルのIP(ネットワーク層)レベルで実現される暗号化通信方式の規格であり、IPパケット単位で認証・暗号化が行われる。IPsecでは、予め、IPsec通信を行う装置(IPsec装置)間で使用する認証・暗号化アルゴリズムや暗号鍵等を交換・共有し、「SA(Security Association:セキュリティ・アソシエーション)」と呼ばれる論理的なコネクションを確立しておく必要がある。なお、このSAは単方向のコネクションである。SAの確立は、鍵交換プロトコルである「IKE(Internet Key Exchange)」によって実現される。 IPsec is a standard for an encrypted communication system realized at the IP (network layer) level of the TCP / IP protocol, and authentication and encryption are performed in units of IP packets. In IPsec, a logical connection called “SA (Security Association)” is obtained by exchanging and sharing authentication / encryption algorithms and encryption keys used in advance between apparatuses performing IPsec communication (IPsec apparatus). Need to be established. This SA is a unidirectional connection. The establishment of SA is realized by “IKE (Internet Key Exchange)” which is a key exchange protocol.
また、IPsecでは、IPsec通信を行っている一方の装置において障害が発生した場合の復旧方法として、例えば次の方法が知られている。すなわち、障害が発生したIPsec装置が、キャッシュを参照して通信を行っていたIPsec装置に向けて障害情報通知を行う。そして、この通知を受け取った通信相手のIPsec装置では、直ぐに古いSAを消去してIKE処理を始め、SAの再確立を行うといった方法である(例えば、特許文献1参照)。
上述のように、IPsecでは、装置間のIPsec通信を行う前に、IKE処理を行って送信先(相手先)の通信装置とのSAを確立しておく必要があり、送信先の装置とのSAが確立されていない場合には、この装置とのSAを確立した後、IPパケットをIPsec処理することになる。つまり、送信するIPパケットの受け付けから、このIPパケットをIPsec処理するまでの間に処理の「待ち」が生じる。すなわち、この処理の「待ち」の間は、新たに受け付けたIPパケットに対するIPsec処理を行うことができない。更に、複数の装置それぞれとIPsec通信を並列に行う場合には、SAが確立されていない装置との間の処理によって、既にSAが確立されている装置との間の通信にも影響が生じる可能性がある。 As described above, in IPsec, before performing IPsec communication between devices, it is necessary to perform an IKE process to establish an SA with a communication device of a transmission destination (destination). If the SA is not established, the IP packet is subjected to IPsec processing after establishing the SA with this apparatus. In other words, a “waiting” process occurs between the reception of an IP packet to be transmitted and the IPsec processing of this IP packet. That is, during the “waiting” of this process, the IPsec process cannot be performed on the newly received IP packet. Furthermore, when IPsec communication is performed in parallel with each of a plurality of devices, processing with devices that have not established SA may affect communication with devices that have already established SA. There is sex.
本発明は、上記事情に鑑みてなされたものであり、IPsec通信において、送信先の装置とのSAが確立されていない場合に、このSAが確立されるまでの間に生じるIPsec処理の「待ち」による不都合を解消することを目的としている。 The present invention has been made in view of the above circumstances, and in the IPsec communication, when the SA with the transmission destination apparatus is not established, the “waiting” for the IPsec process that occurs until the SA is established. The purpose is to eliminate the inconvenience caused by "."
上記課題を解決するための第1の発明は、通信装置が他の通信装置とIPsec通信を行う際の通信制御方法であって、IPパケットを受け付け、当該IPパケットの送信先に指定された他の通信装置のSAデータが、確立済のSAに関するSAデータが登録されたSAデータベースに現時点において登録されているかを判定し、未登録の場合には当該IPパケットを保留バッファに格納し、登録済の場合には当該IPパケットを登録済のSAデータに従ってIPsec処理してIPsecパケットを生成し、送信先の他の通信装置に送信する第1の処理と、前記保留バッファに格納されているIPパケットの送信先に指定された他の通信装置とのSAを確立するIKE処理を実行し、確立したSAのSAデータを前記SAデータベースに新たに登録する第2の処理と、前記SAデータベースに新たに登録され、新たなSAの確立がなされた他の通信装置を送信先とするIPパケットを前記保留バッファから検索し、当該SAデータに従ってIPsec処理してIPsecパケットを生成し、当該送信先の他の通信装置に送信して、前記保留バッファから当該IPパケットを削除する第3の処理とをそれぞれ独立して実行する通信制御方法である。 A first invention for solving the above-described problem is a communication control method when a communication device performs IPsec communication with another communication device, which receives an IP packet and is designated as a destination of the IP packet. It is determined whether the SA data of the communication device is currently registered in the SA database in which SA data related to the established SA is registered. If the SA data is not registered, the IP packet is stored in the hold buffer and registered. In this case, the IP packet is generated according to the registered SA data according to the registered SA data to generate an IPsec packet, which is transmitted to the other communication device of the transmission destination, and the IP packet stored in the hold buffer IKE processing is executed to establish an SA with another communication device designated as the destination of the transmission, and the SA data of the established SA is updated to the SA database. A second process registered in the SA database, and an IP packet destined for another communication apparatus newly registered in the SA database and for which a new SA has been established is searched from the holding buffer, and IPsec is determined according to the SA data. This is a communication control method that performs processing independently to generate an IPsec packet, transmit it to the other communication device of the transmission destination, and independently execute a third process of deleting the IP packet from the hold buffer.
第4の発明は、IPパケットを一時格納する保留バッファと、他の通信装置が指定されたSA確立依頼信号に従ってIKE処理を実行し、確立したSAのSAデータを生成するIKE処理部と、前記IKE処理部により生成されたSAデータをSAデータベースに登録して管理するSAD管理部と、新たなIPパケットを受け付け、当該IPパケットの送信先に指定された他の通信装置のSAデータが、前記SAデータベースに登録されているかを判定する判定部と、前記判定部により登録済と判定された場合に、当該判定されたIPパケットを登録済のSAデータに従ってIPsec処理してIPsecパケットを生成し、送信先の他の通信装置に送信する第1のIPパケット処理部と、前記判定部により未登録と判定された場合に、当該判定されたIPパケットを前記保留バッファに格納させる保留制御部と、前記保留バッファに格納されているIPパケットの送信先に指定されている他の通信装置とのSAを前記IKE処理部に確立させ、確立されたSAの当該他の通信装置を送信先とするIPパケットを前記保留バッファから検索し、当該SAデータに従ってIPsec処理してIPsecパケットを生成し、当該送信先の他の通信装置に送信して、前記保留バッファから当該IPパケットを削除する第2のIPパケット処理部とを備えた通信装置である。 According to a fourth aspect of the present invention, there is provided a hold buffer for temporarily storing an IP packet, an IKE processing unit that executes IKE processing according to an SA establishment request signal designated by another communication device and generates SA data of the established SA, The SAD management unit that registers and manages the SA data generated by the IKE processing unit in the SA database, and the SA data of another communication device that receives a new IP packet and is designated as the transmission destination of the IP packet A determination unit that determines whether or not the information is registered in the SA database; and when the determination unit determines that the packet has been registered, the determined IP packet is subjected to IPsec processing according to the registered SA data to generate an IPsec packet; A first IP packet processing unit that transmits to another communication device of the transmission destination, and when the determination unit determines that it is unregistered, Causing the IKE processing unit to establish an SA between the hold control unit for storing the specified IP packet in the hold buffer and the other communication device specified as the transmission destination of the IP packet stored in the hold buffer. IP packet whose destination is the other communication device of the established SA is searched from the holding buffer, IPsec processing is performed according to the SA data to generate an IPsec packet, and the packet is transmitted to the other communication device of the destination And a second IP packet processing unit that deletes the IP packet from the hold buffer.
この第1又は第4の発明によれば、通信装置が他の通信装置とIPsec通信を行う際に、(1)新たに受け付けたIPパケットの送信先に指定された他の通信装置のSAデータがSAデータベースに登録されているかを判定し、登録済みの場合には、登録されているSAデータに従ってIPsec処理してIPsecパケットを生成・送信し、未登録の場合には、このIPパケットを保留バッファに格納する処理と、(2)保留バッファに格納されているIPパケットの送信先に指定された他の通信装置とのSAを確立するIKE処理を実行し、確立したSAのSAデータをSAデータベースに登録する処理と、(3)IKE処理によりSAが確立された通信装置を送信先とするIPパケットを保留バッファから取り出し、IPsec処理してIPsecパケットを生成・送信する処理と、の各処理が独立して行われる。 According to the first or fourth invention, when the communication device performs IPsec communication with another communication device, (1) SA data of the other communication device designated as the transmission destination of the newly received IP packet. Is registered in the SA database, and if registered, IPsec processing is performed according to the registered SA data to generate and transmit an IPsec packet. If not registered, this IP packet is suspended. (2) IKE processing for establishing SA with another communication device designated as the destination of the IP packet stored in the hold buffer is executed, and the SA data of the established SA is converted into SA. Processing for registering in the database, and (3) taking out the IP packet destined for the communication device whose SA is established by the IKE processing from the hold buffer, and performing IPsec processing And generating and transmitting an IPsec packet, the processing is performed independently Te.
送信先の通信装置とのSAが確立されていないときには、当該SAが確立されるまで処理を待つといった従来の方法では、この処理の「待ち」の間に新たに受け付けたIPパケットに対するIPsec処理が行えず、更に、複数の通信装置との間で並列的にIPsec通信を行っている場合には、既にSAが確立している他の通信装置への通信をも一時停止させてしまうといった問題が生じる。そこで、本発明のように、IPパケットを格納する保留バッファを備え、SAが確立されていない通信装置を送信先とするIPパケットを保留バッファに格納する処理と、新たにSAが確立された場合に、このSAが確立された通信装置を送信先とするIPパケットを保留バッファから取り出し、IPsec処理してIPsecパケットを生成・送信する処理とを独立して行うようにすることで、この処理の「待ち」によって生じる不都合を解消することができる。すなわち、次々と受け付けられたIPパケットそれぞれに対して、IPsec処理を行うか或いは保留バッファに格納するかの何れかの処理を速やかに行うことができ、これにより、受け付けたIPパケットの送信先の通信装置とのSAが確立されていないことによる処理の「待ち」が生じない。また、SAが確立されていない通信装置を送信先とする複数のIPパケットを受け付けた場合には、当該SAが確立された時点で、保留バッファに格納されているこれらのIPパケットそれぞれについて一括して効率良くIPsec処理を行うことができる。 In the conventional method of waiting for processing until the SA is established when the SA with the destination communication device is not established, the IPsec processing for the IP packet newly accepted during the “waiting” of this processing is performed. In addition, when IPsec communication is performed in parallel with a plurality of communication devices, there is a problem in that communication to other communication devices for which SA has already been established is also temporarily stopped. Arise. Therefore, as in the present invention, a process is provided for storing an IP packet having a hold buffer for storing an IP packet, the destination being a communication apparatus for which SA is not established, in the hold buffer, and when a new SA is established. In addition, the IP packet destined for the communication apparatus with the SA established is taken out of the hold buffer, and the IPsec processing is performed independently of the processing for generating and transmitting the IPsec packet. Inconvenience caused by “waiting” can be solved. In other words, for each of the IP packets received one after another, either the IPsec process or the process of storing in the hold buffer can be performed promptly. There is no “waiting” for processing due to the SA being not established with the communication device. In addition, when a plurality of IP packets whose destination is a communication device for which SA is not established are accepted, at the time when the SA is established, these IP packets stored in the hold buffer are collectively processed. Therefore, IPsec processing can be performed efficiently.
また、第2の発明は、第1の発明の通信制御方法であって、前記第2の処理では、前記IKE処理によるSAの確立が失敗した場合には、当該IKE処理の相手先の他の通信装置を送信先とするIPパケットを前記保留バッファから削除する通信制御方法である。 The second invention is the communication control method according to the first invention, and in the second process, when the establishment of SA by the IKE process fails, the other party of the IKE process In the communication control method, an IP packet destined for a communication device is deleted from the hold buffer.
この第2の発明によれば、IKE処理によるSAの確立が失敗した場合には、このIKE処理の相手先の通信装置を送信先とするIPパケットが保留バッファから削除される。これにより、SAの確立失敗により送信され得ないIPパケットが削除されることで、保留バッファの効率の良い使用が可能となる。 According to the second aspect of the present invention, when the SA establishment by the IKE process fails, the IP packet destined for the destination communication device of the IKE process is deleted from the hold buffer. As a result, IP packets that cannot be transmitted due to SA establishment failure are deleted, thereby enabling efficient use of the reserved buffer.
第3の発明は、第1又は第2の発明の通信制御方法を、通信装置に内蔵されたコンピュータに実行させるためのプログラムである。 A third invention is a program for causing a computer incorporated in a communication device to execute the communication control method of the first or second invention.
この第3の発明によれば、このプログラムに従った演算処理をコンピュータに実行させることで、第1又は第2の発明と同様の効果を奏することができる。 According to the third aspect of the invention, the same effect as that of the first or second aspect of the invention can be achieved by causing the computer to execute arithmetic processing according to the program.
以下、図面を参照して、本発明の好適な実施形態を説明する。 Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
[システム構成]
図1は、本実施形態の通信システムの構成図である。同図に示すように、本実施形態の通信システムは、複数のPC(Personal Computer)10それぞれが、通信装置20を介してインターネットである通信ネットワークNに接続されている。
[System configuration]
FIG. 1 is a configuration diagram of a communication system according to the present embodiment. As shown in the figure, in the communication system of the present embodiment, each of a plurality of PCs (Personal Computers) 10 is connected to a communication network N that is the Internet via a
通信装置20は、IPsecを実装したIPsec装置であり、他の通信装置20との間で、IPsecによりセキュリティが確保された暗号化通信(IPsec通信)を行う。すなわち、通信装置20は、PC10から送信を要求されたIPパケットをIPsec処理してIPsecパケットを生成し、通信ネットワークNを介して他の通信装置20に送信する。また、他の通信装置20から送信されてきたIPsecパケットを復号してPC10に転送する。なお、本実施形態では、通信装置20はPC10の別体の装置として図示・説明するが、PC10に内蔵されることにしても良い。
The
IPsecは、インターネットの標準プロトコルであるTCP/IPのIP層で規定される暗号化通信の標準規格であり、IPパケット単位で認証・暗号化を行う。IPsecでは、先ず、「IKE」による「IPsec−SA(以下、単に「SA」と表記する)」の確立(合意)がなされた後、このSAに従ったIPsec通信が行われる。「IKE」は、相手装置とのネゴシエーションを行って使用する認証・暗号化アルゴリズムや暗号鍵等の生成・交換を行う鍵交換プロトコルであり、「ISAKMP(Internet Security Association and Key Management Protocol)」や「Oakley」をもとにしている。そして、このIKE処理によって合意が得られた認証・暗号化アルゴリズムや暗号鍵に関する取り決めが「SA」であり、これは、送信先の通信装置との間で確立される論理的な単方向のコネクション(トンネル)に相当する。SAには、確立からの経過時間或いは送受信したパケット量で設定される有効期間があり、この有効期間を満了すると消滅し、新たなSAが確立される(ReKey)。また、SAの確立とともに、このSAに関連付けられた「SPI(Security Parameters Index)」が決定される。「SPI」は、IPsecパケットのヘッダに付加され、当該SPIが適用されるSAを識別するために用いられる。また、IPsecでは、認証・暗号化のためのプロトコルとして、暗号化及び認証機能を提供するAH(Authentication Header:認証ヘッダ)と、認証機能のみを提供するESP(Encapsulating Security Payload:暗号ペイロード)との2種類が規定されており、両方又は一方が使用される。 IPsec is a standard for encrypted communication defined by the IP layer of TCP / IP, which is a standard protocol for the Internet, and performs authentication and encryption in units of IP packets. In IPsec, first, “IPsec-SA (hereinafter simply referred to as“ SA ”)” is established (agreement) by “IKE”, and then IPsec communication according to this SA is performed. “IKE” is a key exchange protocol for generating and exchanging authentication / encryption algorithms and encryption keys to be used by negotiating with a partner apparatus, such as “ISAKMP (Internet Security Association and Key Management Protocol)” and “ Based on "Oakley". The agreement regarding the authentication / encryption algorithm and encryption key agreed upon by the IKE process is “SA”, which is a logical unidirectional connection established with the destination communication device. Corresponds to (tunnel). The SA has a valid period set by the elapsed time from establishment or the amount of transmitted / received packets. When this valid period expires, the SA disappears and a new SA is established (ReKey). Further, along with the establishment of the SA, the “SPI (Security Parameters Index)” associated with the SA is determined. “SPI” is added to the header of the IPsec packet and used to identify the SA to which the SPI is applied. Moreover, in IPsec, as a protocol for authentication / encryption, AH (Authentication Header: authentication header) that provides encryption and authentication functions and ESP (Encapsulating Security Payload: encryption payload) that provides only authentication functions are used. Two types are defined, both or one is used.
本実施形態の特徴として、通信装置20は、IPパケットを一時的に格納(保持)する保留バッファを備える。この保留バッファ310には、IPパケットの送信時に、送信先の通信装置20とのSAが確立されていない場合、そのIPパケットが格納される。保留バッファに格納されているIPパケットは、送信先の通信装置20とのSAが確立されると保留バッファ310から取り出され、当該SAに従ってIPsec化されて送信先の通信装置20に送信される。
As a feature of the present embodiment, the
[通信装置]
図2は、通信装置20の内部構成を示すブロック図である、同図によれば、通信装置20は、CPU110と、フラッシュメモリ120と、RAM130と、IP通信部150と、PC用通信部140とを備えて構成される。
[Communication device]
FIG. 2 is a block diagram illustrating an internal configuration of the
CPU110は、フラッシュメモリ120やRAM130に記憶されているプログラムやデータ、PC用通信部140やIP通信部150を介して外部装置(主に、PC10や他の通信装置20)から受信されたデータ等に基づいて、通信装置20の全体制御等の各種処理を行う。
フラッシュメモリ120は、CPU110が通信装置20を統合的に制御するためのシステムプログラムや、本実施形態のIPsec通信を実現するための通信制御プログラム121を記憶している。RAM130は、CPU110の作業領域として用いられ、保留バッファ310が形成されるとともに、IPsec−SAD320と、IPsec−SPD330と、ISAKMP−SAD340と、ISAKMP−SPD350といったデータベースを記憶する。
The
PC用通信部140は、接続されたPC10とデータの送受信を行う。なお、通信装置20がPC10に内蔵される場合、このPC用通信部140はバス等で実現される。IP通信部150は、TCP/IPプロトコルを実装し、通信ネットワークNを介して他の通信装置20とIP通信を行う。
The
[通信装置]
図3は、通信装置20におけるIPsecパケットの送信処理に関する機能構成図である。同図によれば、通信装置20は、送信処理に関する機能部として、NETWORK部210と、認証・暗号化処理部220と、AH/ESPモジュール部230と、AH/ESPタスク部240と、IKEタスク部250とを備えて構成される。これらの処理機能部は、CPU110により実行されるソフトウェアとして実現される。また、データベースとして、IPsec−SAD320と、IPsec−SPD330と、ISAKMP−SPD350と、ISAKMP−SAD340とを備えている。
[Communication device]
FIG. 3 is a functional configuration diagram relating to the transmission processing of the IPsec packet in the
NETWORK部210は、TCP/IPプロトコルスタックを実装しており、PC10との間でデータの送受信を行うとともに、他の通信装置20との間でIPsecパケットを送受信するIPsec通信を行う。具体的には、PC10からIPパケットの送信要求がなされると、AH/ESPモジュール部230にIPsecパケットの編集(生成)を要求する。そして、この要求に応答して生成されたIPsecパケットの送信が要求されると、このIPsecパケットを、通信ネットワークNを介して該当する他の通信装置20に送信する。このNETWORK部210は、図2のIP通信部150及びPC用通信部140に該当する。
The
認証・暗号化処理部220は、AH/ESPモジュール部230やAH/ESPタスク部240からの認証・暗号化要求に応じて、データの認証や暗号化を行う。暗号化処理としては、DES(Data Encryption Standard)や3DES、AES(Advanced Encryption Standard)等のアルゴリズムに従った処理を実行する。また、認証処理としては、HMAC−MD5、HMAC−SHA等のアルゴリズムに従った処理を実行する。
The authentication /
AH/ESPモジュール部230は、NETWORK部210からIPsecパケットの編集要求がなされると、IPsec−SPD330を参照して、IPsec−SAD320から、要求されたIPパケットに該当するIPsec−SAデータを検索する。該当するIPsec−SAデータが“有る”ならば、要求されたIPパケットを、当該IPsec−SAデータに従ってIPsec化してIPsecパケットを生成し、NETWORK部210に、生成したIPsecパケットの送信を要求する。このとき、認証・暗号化処理部220にIPパケットの認証・暗号化を要求し、この要求に応答して認証・暗号化されたデータをIPsec化してIPsecパケットを生成する。一方、IPsec−SAD320に該当するIPsec−SAデータが“無い”ならば、AH/ESPタスク部240に、当該IPパケットの送信先の通信装置20とのSA確立を要求する。
When a request to edit an IPsec packet is made from the
図4は、AH/ESPモジュール部230が実行する処理の流れを説明するためのフローチャートである。同図によれば、AH/ESPモジュール部230は、NETWORK部210からIPパケットの編集要求がなされると(ステップA1:YES)、要求されたIPパケットの送信先の通信装置20とのIPsec−SAデータをIPsec−SAD320から検索する(ステップA3)。
FIG. 4 is a flowchart for explaining the flow of processing executed by the AH /
そして、該当するIPsec−SAデータが有るならば(ステップA5:YES)、このIPsec−SAデータに従って、要求されたIPパケットをIPsec処理してIPsecパケットを生成し(ステップA7)、NETWORK部210に、生成したIPsecパケットの送信を要求する(ステップA9)。一方、該当するIPsec−SAデータが無いならば(ステップA5:NO)、AH/ESPタスク部240に、要求されたIPパケットの送信先の通信装置20とのSA確立を要求する(ステップA11)。その後、ステップA1に戻り、以上の処理を繰り返し実行する。
If there is corresponding IPsec-SA data (step A5: YES), the requested IP packet is subjected to IPsec processing according to this IPsec-SA data to generate an IPsec packet (step A7), and the
図3に戻り、AH/ESPタスク部240は、AH/ESPモジュール部230からSA確立要求がなされると、IKEタスク部250にSA確立を要求するとともに、要求されたIPパケットを保留バッファ310に格納する。そして、この要求に応答してIKEタスク部250からSA確立が通知されると、保留バッファ310から、当該SAが確立された通信装置20を送信先とするIPパケットを抜き出し、IPsec化してIPsecパケットを生成し、NETWORK部210に生成したIPsecパケットの送信を要求する。ここで、該当するIPパケットが複数有る場合、全てを抜き出し、それぞれについてIPsec化してIPsecパケットを生成する。また、IKEタスク部250からSA確立失敗が通知されると、保留バッファ310から、当該SAの確立が失敗した通信装置20を送信先とするIPパケットを削除する。
Returning to FIG. 3, when the SA establishment request is made from the AH /
図5は、AH/ESPタスク部240が実行する処理の流れを説明するためのフローチャートである。同図によれば、AH/ESPタスク部240は、AH/ESPモジュール部230からSA確立要求がなされると(ステップB1:YES)、要求されたIPパケットを保留バッファ310に格納するとともに(ステップB3)、IKEタスク部250に、このIPパケットの送信先の通信装置20とのSAの確立を要求する(ステップB5)。
FIG. 5 is a flowchart for explaining the flow of processing executed by the AH /
また、IKEタスク部250からSA確立が通知されたならば(ステップB7:YES)、保留バッファ310から、確立が通知されたSAの通信装置20を送信先とするIPパケットを取り出す(ステップB9)。また、IPsec−SAD320から、確立されたSAのIPsec−SAデータを検索する(ステップB11)。そして、取り出したIPパケットを検索したIPsec−SAデータに従ってIPsec処理してIPパケットを生成し(ステップB13)、NETWORK部210に、生成したIPパケットの送信を要求する(ステップB15)。また、IKEタスク部250からSA確立失敗が通知されたならば(ステップB7:NO〜B17:YES)、保留バッファ310から、確立が失敗したSAの通信装置20を送信先とするIPパケットを削除する(ステップB19)。その後、ステップB1に戻り、以上の処理を繰り返し実行する。
If SA establishment is notified from the IKE task unit 250 (step B7: YES), an IP packet destined for the
図3に戻り、IKEタスク部250は、AH/ESPタスク部240からSA確立要求がなされると、該当する他の通信装置20とのネゴシエーションを行ってSAを確立するIKE処理を行う。そして、SAを確立すると、確立したSAについてのSAデータをIPsec−SAD320に、SP(Security Policy)データをIPsec−SPD330に、それぞれ格納する。それとともに、AH/ESPタスク部240にSA確立を通知する。一方、SA確立を失敗した場合には、AH/ESPタスク部240にSA確立失敗を通知する。
Returning to FIG. 3, when an SA establishment request is made from the AH /
図6は、IKEタスク部250が実行する処理の流れを説明するためのフローチャートである。同図によれば、IKEタスク部250は、AH/ESPタスク部240からSAの確立要求がなされたならば(ステップC1:YES)、要求された通信装置20とのIKE処理を行う(ステップC3)。その結果、SAの確立が成功したならば(ステップC5:YES)、確立したSAのIPsec−SAデータを、IPsec−SAD320に登録するとともに(ステップC7)、AH/ESPタスク部240に、SA確立を通知する(ステップC9)。一方、SAの確立が失敗したならば(ステップC5:NO)、AH/ESPタスク部240に、SA確立失敗を通知する(ステップC11)。その後、ステップC1に戻り、以上の処理を繰り返し実行する。
FIG. 6 is a flowchart for explaining the flow of processing executed by the
図3に戻り、IPsec−SAD320は、当該装置と他の通信装置20それぞれとのIPsec−SAデータを格納するデータベースであり、現時点において、当該装置とSAが確立されている通信装置20とのIPsec−SAデータが格納されている。
Returning to FIG. 3, the IPsec-
IPsec−SPD330は、当該装置と他の通信装置20それぞれとのIPsec−SPデータを格納したデータベースであり、IPsec−SAD320と同様に、現時点において、当該装置とSAが確立されている通信装置20とのIPsec−SPデータが格納されている。「SP」は、各パケットにIPsecを適用するか否かを定義したルールであり、具体的には、上位層のプロトコル、送信元及び宛先それぞれのIPアドレスやポート番号等によってIPsecを適用するパケットを指定する「セレクタ」や、IPsecを適用する際に利用するIPsecプロトコル(AH、ESP)やモード(トランスポート、トンネル)を含んでいる。
The IPsec-
ISAKMP−SAD340は、IKEタスク部250が、他の通信装置20とのIKE処理を行う際に使用する他の各通信装置20とのISAKMP−SAデータを保持するデータベースである。ISAKMP−SPD350は、IKEタスク部250が、他の通信装置20とのIKE処理を行う際に使用するISAKMP−SPデータを格納するデータベースである。
The ISAKMP-
保留バッファ310は、複数のIPパケットを格納可能なバッファである。図7(a)に、保留バッファ310の構成を示す。同図(a)に示すように、保留バッファ310には、保留パケットが時系列に格納される。同図(b)に、保留パケットの概略的なデータ構成を示す。同図(b)に示すように、保留パケットは、IPパケットデータに、当該IPパケットの送信元の通信装置のIPアドレス(送信元IPアドレス)や、送信先の通信装置のIPアドレス(宛先IPアドレス)、プロトコル番号といったヘッダ情報が付加されて構成されている。
The
[処理シーケンス]
図8は、IPsecパケットの送信時の処理シーケンスを示す図であり、送信先の通信装置20とのSAが確立されていない場合を示している。同図によれば、PC10から通信装置20に対してパケットの送信要求がなされると(1)、NETWORK部210が、AH/ESPモジュール部230にIPsecパケットの編集を要求する(2)。すると、AH/ESPモジュール部230が、IPsec−SAD320から、要求されたIPパケットに該当するIPsec−SAデータを検索して、送信先の通信装置20とのSAの確立有無を判定する(3)。その結果、該当するIPsec−SAデータが“無し”と判定すると、AH/ESPモジュール部230は、AH/ESPタスク部240に、要求されたIPパケットとともに当該IPパケットの送信先の通信装置20との間のSA確立を要求する(4)。
[Processing sequence]
FIG. 8 is a diagram showing a processing sequence at the time of transmitting an IPsec packet, and shows a case where an SA is not established with the
次いで、AH/ESPタスク部240は、要求されたIPパケットを保留バッファ310に格納するとともに(5)、IKEタスク部250に、要求された通信装置20とのSA確立を要求する(6)。そして、IKEタスク部250は、IKE処理を行って要求された通信装置20とのSAを確立し、確立したSAのIPsec−SAデータをIPsec−SAD320に登録するとともに(7)、AH/ESPタスク部240にSA確立を通知する(8)。
Next, the AH /
すると、AH/ESPタスク部240は、保留バッファ310から、SAが確立された通信装置20を送信先とするIPパケットを抜き出し(9)、当該確立されたSAのIPsec−SAデータに従ってIPsec化してIPsecパケットを生成する(10)。そして、NETWORK部210に、生成したIPsecパケットの送信を要求し(11)、NETWORK部210は、要求されたIPsecパケットを、該当する他の通信装置20に送信する(12)。
Then, the AH /
[作用・効果]
このように、本実施形態によれば、IPsec通信を行う通信装置20では、IPパケットを格納する保留バッファ310を備え、AH/ESPモジュール部230が、送信先の通信装置20との間でSAが確立されているIPパケットを、当該SAデータに従ってIPsec処理して送信する処理と、AH/ESPタスク部240が、送信先の通信装置20とのSAが確立されていないIPパケットを保留バッファ310に格納するとともに、IKEタスク部250に当該SAを確立させるためのIKE処理を行わせる処理と、AH/ESPタスク部240が、IKEタスク部250のIKE処理によって確立されたSAに該当するIPパケットを保留バッファ310から取り出し、当該SAデータに従ってIPsec処理して送信する処理とのそれぞれが独立して行われる。つまり、PC10から送信が要求されるIPパケットそれぞれに対して、IPsec処理するか或いは保留バッファ310に格納するかの何れかの処理が速やかに行われる。これにより、送信先の通信装置20とのSAが確立されていない場合であっても、当該SAの確立までの処理の「待ち」が生じない。
[Action / Effect]
As described above, according to the present embodiment, the
[変形例]
なお、本発明の適用は、上述の実施形態に限定されることなく、本発明の趣旨を逸脱しない範囲で適宜変更可能なのは勿論である。
[Modification]
The application of the present invention is not limited to the above-described embodiment, and it is needless to say that the application can be appropriately changed without departing from the spirit of the present invention.
例えば、上述の実施形態では、IKEタスク部250によるSAの確立が失敗した場合、AH/ESPタスク部240は、このSAの確立が失敗した通信装置20を送信先とするIPパケットを保留バッファ310から削除することにしたが、これを、AH/ESPタスク部240が、IKEタスク部250に当該通信装置20との間のSAの確立を再度行わせるようにしても良い。或いは、SAの確立失敗をPC10に通知し、PC10からの指示に従って、当該IPパケットを保留バッファ310から削除する、或いは当該通信装置20との間のSAを再確立することにしても良い。
For example, in the above-described embodiment, when the SA establishment by the
10 PC
20 通信装置(IPsec装置)
210 NETWORK部、220 認証・暗号化処理部
230 AH/ESPモジュール部、240 AH/ESPタスク部
250 IKEタスク部
310 保留バッファ
320 IPsec−SAD、330 IPsec−SPD
340 ISAKMP−SAD、350 ISAKMP−SPD
10 PC
20 Communication device (IPsec device)
210 NETWORK unit, 220 Authentication /
340 ISAKMP-SAD, 350 ISAKMP-SPD
Claims (4)
IPパケットを受け付け、当該IPパケットの送信先に指定された他の通信装置のSAデータが、確立済のSAに関するSAデータが登録されたSAデータベースに現時点において登録されているかを判定し、未登録の場合には当該IPパケットを保留バッファに格納し、登録済の場合には当該IPパケットを登録済のSAデータに従ってIPsec処理してIPsecパケットを生成し、送信先の他の通信装置に送信する第1の処理と、
前記保留バッファに格納されているIPパケットの送信先に指定された他の通信装置とのSAを確立するIKE処理を実行し、確立したSAのSAデータを前記SAデータベースに新たに登録する第2の処理と、
前記SAデータベースに新たに登録され、新たなSAの確立がなされた他の通信装置を送信先とするIPパケットを前記保留バッファから検索し、当該SAデータに従ってIPsec処理してIPsecパケットを生成し、当該送信先の他の通信装置に送信して、前記保留バッファから当該IPパケットを削除する第3の処理と、
をそれぞれ独立して実行する通信制御方法。 A communication control method when a communication device performs IPsec communication with another communication device,
Accepts an IP packet, determines whether SA data of another communication device designated as the destination of the IP packet is currently registered in the SA database in which SA data related to the established SA is registered, and is not registered In the case of, the IP packet is stored in the hold buffer, and in the case of registration, the IP packet is subjected to IPsec processing according to the registered SA data to generate an IPsec packet and transmitted to the other communication device of the transmission destination A first process;
A second IKE process is executed to establish an SA with another communication device designated as the destination of the IP packet stored in the hold buffer, and the SA data of the established SA is newly registered in the SA database. And processing
An IP packet that is newly registered in the SA database and has a new SA established as a transmission destination is searched from the holding buffer, and IPsec processing is performed according to the SA data to generate an IPsec packet. A third process of transmitting to the other communication device of the destination and deleting the IP packet from the hold buffer;
Is a communication control method that executes each independently.
請求項1に記載の通信制御方法。 In the second process, when the establishment of SA by the IKE process fails, an IP packet destined for the other communication device of the other party of the IKE process is deleted from the hold buffer.
The communication control method according to claim 1.
他の通信装置が指定されたSA確立依頼信号に従ってIKE処理を実行し、確立したSAのSAデータを生成するIKE処理部と、
前記IKE処理部により生成されたSAデータをSAデータベースに登録して管理するSAD管理部と、
新たなIPパケットを受け付け、当該IPパケットの送信先に指定された他の通信装置のSAデータが、前記SAデータベースに登録されているかを判定する判定部と、
前記判定部により登録済と判定された場合に、当該判定されたIPパケットを登録済のSAデータに従ってIPsec処理してIPsecパケットを生成し、送信先の他の通信装置に送信する第1のIPパケット処理部と、
前記判定部により未登録と判定された場合に、当該判定されたIPパケットを前記保留バッファに格納させる保留制御部と、
前記保留バッファに格納されているIPパケットの送信先に指定されている他の通信装置とのSAを前記IKE処理部に確立させ、確立されたSAの当該他の通信装置を送信先とするIPパケットを前記保留バッファから検索し、当該SAデータに従ってIPsec処理してIPsecパケットを生成し、当該送信先の他の通信装置に送信して、前記保留バッファから当該IPパケットを削除する第2のIPパケット処理部と、
を備えた通信装置。 A pending buffer for temporarily storing IP packets;
An IKE processing unit that executes IKE processing in accordance with a designated SA establishment request signal and generates SA data of the established SA;
An SAD management unit that registers and manages SA data generated by the IKE processing unit in an SA database;
A determination unit that receives a new IP packet and determines whether SA data of another communication device designated as a destination of the IP packet is registered in the SA database;
A first IP for generating an IPsec packet by performing IPsec processing on the determined IP packet in accordance with the registered SA data when the determination unit determines that it has been registered, and transmitting it to another communication device as a transmission destination A packet processing unit;
A hold control unit that stores the determined IP packet in the hold buffer when the determination unit determines that it is not registered;
The IKE processing unit establishes an SA with another communication device specified as the destination of the IP packet stored in the hold buffer, and the other communication device of the established SA is the destination. A second IP that retrieves the packet from the hold buffer, performs IPsec processing according to the SA data, generates an IPsec packet, transmits the packet to another communication device of the transmission destination, and deletes the IP packet from the hold buffer A packet processing unit;
A communication device comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007224274A JP2009060245A (en) | 2007-08-30 | 2007-08-30 | Communication control method, program and communication device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007224274A JP2009060245A (en) | 2007-08-30 | 2007-08-30 | Communication control method, program and communication device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009060245A true JP2009060245A (en) | 2009-03-19 |
Family
ID=40555605
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007224274A Pending JP2009060245A (en) | 2007-08-30 | 2007-08-30 | Communication control method, program and communication device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009060245A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102006294A (en) * | 2010-11-25 | 2011-04-06 | 中兴通讯股份有限公司 | IP multimedia subsystem (IMS) multimedia communication method and system as well as terminal and IMS core network |
CN102170434A (en) * | 2011-04-02 | 2011-08-31 | 京信通信***(中国)有限公司 | Multi-core-processor-based Internet protocol security (IPSEC) realization method and device |
JP2014168204A (en) * | 2013-02-28 | 2014-09-11 | Canon Inc | Communication device, communication method, and program |
-
2007
- 2007-08-30 JP JP2007224274A patent/JP2009060245A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102006294A (en) * | 2010-11-25 | 2011-04-06 | 中兴通讯股份有限公司 | IP multimedia subsystem (IMS) multimedia communication method and system as well as terminal and IMS core network |
CN102170434A (en) * | 2011-04-02 | 2011-08-31 | 京信通信***(中国)有限公司 | Multi-core-processor-based Internet protocol security (IPSEC) realization method and device |
JP2014168204A (en) * | 2013-02-28 | 2014-09-11 | Canon Inc | Communication device, communication method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11792169B2 (en) | Cloud storage using encryption gateway with certificate authority identification | |
JP4707992B2 (en) | Encrypted communication system | |
CN109150688B (en) | IPSec VPN data transmission method and device | |
JP4018701B2 (en) | Internet protocol tunneling using templates | |
WO2017173806A1 (en) | Method and system using cooperation of switch chip or np and cpu to perform ipsec encryption on packet | |
WO2019114703A1 (en) | Secure communication method, apparatus and device | |
US20050273595A1 (en) | Providing apparatus, communication device, method, and program | |
WO2019109852A1 (en) | Data transmission method and system | |
US20110271096A1 (en) | Loosely-Coupled Encryption Functionality for Operating Systems | |
WO2010124014A2 (en) | Methods, systems, and computer readable media for maintaining flow affinity to internet protocol security (ipsec) sessions in a load-sharing security gateway | |
JP6505710B2 (en) | TLS protocol extension | |
WO2020007308A1 (en) | Message processing method and receiving-end server | |
WO2015131609A1 (en) | Method for implementing l2tp over ipsec access | |
US20040088536A1 (en) | Method and apparatus for providing trusted channel among secure operating systems adopting mandatory access control policy | |
US9467471B2 (en) | Encrypted communication apparatus and control method therefor | |
WO2010091579A1 (en) | Method and client for packet tranmission based on the virtual private network tunnel | |
JP4358795B2 (en) | TLS session information takeover method and computer system | |
JP2009060245A (en) | Communication control method, program and communication device | |
US20110271097A1 (en) | Loosely-Coupled Encryption Functionality for Operating Systems | |
TWI828848B (en) | Data transmission methods, communication processing methods, communication devices and communication processing programs | |
JP2011054182A (en) | System and method for using digital batons, and firewall, device, and computer readable medium to authenticate message | |
JP2010081108A (en) | Communication relay device, information processor, program and communication system | |
JP2008199420A (en) | Gateway device and authentication processing method | |
JP2012160941A (en) | Information processing device, information processing method and program | |
JP6228370B2 (en) | COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM |