JP4137948B2 - Packet passage control apparatus and packet passage control method - Google Patents
Packet passage control apparatus and packet passage control method Download PDFInfo
- Publication number
- JP4137948B2 JP4137948B2 JP2006036773A JP2006036773A JP4137948B2 JP 4137948 B2 JP4137948 B2 JP 4137948B2 JP 2006036773 A JP2006036773 A JP 2006036773A JP 2006036773 A JP2006036773 A JP 2006036773A JP 4137948 B2 JP4137948 B2 JP 4137948B2
- Authority
- JP
- Japan
- Prior art keywords
- packet
- filtering
- information
- spi
- entry
- 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 - Lifetime
Links
Images
Landscapes
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Description
本発明は、ファイアーウォールやルータなどの機能であるSPI(Stateful Packet Inspection)の技術を用いたパケット通過制御装置及びパケット通過制御方法に関する。 The present invention relates to a packet passage control apparatus and a packet passage control method using an SPI (Stateful Packet Inspection) technique that is a function of a firewall, a router, or the like.
ファイヤーウォールを通過するパケットのデータを読み取り、内容を判断して動的にポートを開放・閉鎖する技術としてSPIが存在する。この技術は、通常ソフトウェアを用いてCPUなどの中央演算装置で処理されている。なお従来のSPIの技術として非特許文献1が公開されている。
しかしながらこのSPIの処理量は、パケットの通過、廃棄の可否を、設定されたフィルタリング情報に基づいて単に判定する処理と異なり、検出したパケットの返信パケットを判定しそのパケットについて動的にポートを開放するなどの処理が発生するため大きくなり、これにより中央演算装置に負荷をかけることとなる。従って、ファイアウォール等にパケットを大量に送りつけて処理負荷を増大させるDoS(Denial of Service)攻撃などの影響をさらに受けやすくなるという問題が発生していた。 However, the processing amount of this SPI is different from the process of simply determining whether packets can be passed or discarded based on the set filtering information, and determines the return packet of the detected packet and dynamically opens the port for that packet. This increases the amount of processing that occurs, causing a load on the central processing unit. Therefore, there has been a problem that it is more susceptible to a DoS (Denial of Service) attack that increases the processing load by sending a large amount of packets to a firewall or the like.
そこでこの発明は、中央演算装置におけるSPI処理を軽減することのできる、パケット通過制御装置及びパケット通過制御方法を提供することを目的としている。 Therefore, an object of the present invention is to provide a packet passage control device and a packet passage control method that can reduce the SPI processing in the central processing unit.
上記目的を達成するために、本発明は、中央演算処理部とパケット通過制御部とを備え、一方の通信ネットワーク経路から受信したパケットを他方の通信ネットワーク経路へ通過させるか否かを制御するパケット通過制御装置であって、前記パケットの通過許可、廃棄の何れかの制御種別と、前記パケットのフィルタ規則適合判定条件を示す通信種別と、を示す第1フィルタリング情報を保持するフィルタリングテーブルから、該第1フィルタリングを読み取って、当該第1フィルタリングが前記通過許可を示す場合には中央演算処理転送の情報に書き換えて、前記パケット通過制御部のフィルタリング記憶部へ登録する、前記中央演算処理部の第1フィルタリング登録手段と、パケットを受信した際に、当該パケットの通信種別と制御種別が、前記フィルタリング記憶部に登録されている前記第1フィルタリングに一致する場合に、その受信したパケットの少なくとも通信種別を前記中央演算処理部へ転送する、前記パケット通過制御部の中央演算処理部転送手段と、前記受信したパケットの、前記一方の通信ネットワーク経路から前記他方の通信ネットワーク経路への通過、および前記他方の通信ネットワーク経路から前記一方の通信ネットワーク経路への通過、の両方の通過許可を示す第2フィルタリング情報それぞれを、前記第1フィルタリング情報よりフィルタ規則の優先度の高い情報として優先的に前記フィルタリング記憶部に登録する、前記中央演算処理部の第2フィルタリング情報登録手段と、前記受信したパケットに関連する一連のパケット処理について、前記フィルタリング記憶部に登録された前記第2フィルタリング情報に一致するか否かを前記優先度順に判定し、一致している場合には前記中央演算処理部を介さずに通過処理を行なう、前記パケット通過制御部の通過処理手段と、を備えることを特徴とするパケット通過制御装置である。 In order to achieve the above object, the present invention comprises a central processing unit and a packet passage control unit, and controls whether or not to allow a packet received from one communication network path to pass through the other communication network path. A passage control device, comprising: a filtering table that holds first filtering information indicating a control type for permitting or discarding the packet and a communication type indicating a filter rule conformity determination condition for the packet; Read the first filtering, and if the first filtering indicates the passage permission, rewrite the information to the central processing transfer and register it in the filtering storage unit of the packet passage control unit. 1 filtering registration means, and when receiving a packet, the communication type and control type of the packet A central processing unit transfer means of the packet passage control unit for transferring at least the communication type of the received packet to the central processing unit when the first filtering registered in the filtering storage unit is matched. And the passage permission of both the passage of the received packet from the one communication network path to the other communication network path and the passage from the other communication network path to the one communication network path. Each of the second filtering information is preferentially registered in the filtering storage unit as information having a higher filter rule priority than the first filtering information, and the second filtering information registration unit of the central processing unit receives the second filtering information. For a series of packet processing related to packets, Whether to match the second filtering information registered in the filtering storage unit is determined in order of priority, and if it matches, the packet passing is performed without going through the central processing unit A packet passage control device comprising: passage processing means of a control unit.
また本発明は、前記中央演算処理部転送手段が、前記受信したパケットに関連する一連のパケット処理で受信した最終パケットを、前記中央演算処理部へ転送し、前記中央演算処理部が、前記最終パケットを受付けることにより、前記第2フィルタリング情報を前記フィルタリング記憶部より削除する第2フィルタリング削除手段を備えることを特徴とする。 In the present invention, the central processing unit transfer means transfers the final packet received in a series of packet processing related to the received packet to the central processing unit, and the central processing unit transfers the final packet. It is characterized by comprising second filtering deleting means for receiving the packet and deleting the second filtering information from the filtering storage unit.
また本発明は、前記フィルタリング記憶部に登録した第2フィルタリング情報に一致した最後のパケットの受信時刻からの経過時間を計測する時間計測手段と、前記経過時間が所定時間となった場合に、前記第2フィルタリング情報を前記フィルタリング記憶部より削除する第2フィルタリング削除手段と、を備えることを特徴とする。 Further, the present invention provides a time measuring means for measuring an elapsed time from the reception time of the last packet that matches the second filtering information registered in the filtering storage unit, and when the elapsed time becomes a predetermined time, Second filtering deletion means for deleting second filtering information from the filtering storage unit.
また本発明は、前記フィルタリング記憶部への前記第2フィルタリング情報の登録が増加することにより、当該第2フィルタリング情報と前記第1フィルタリング情報とからなる情報量が、前記フィルタリング記憶部で記憶できる情報量を超えた場合に、最も優先度の低いフィルタリング情報として、全ての通信種別のパケットについて中央演算処理転送の制御種別を示す第3フィルタリング情報を前記フィルタリング記憶部に登録する第3フィルタリング登録手段と、前記フィルタリング記憶部で記憶している前記第1のフィルタリング情報のうち優先度の低い情報から順に削除するフィルタリング調整手段と、を備えることを特徴とする。 In addition, according to the present invention, information that can be stored in the filtering storage unit by an increase in registration of the second filtering information in the filtering storage unit, so that the amount of information including the second filtering information and the first filtering information is stored in the filtering storage unit. Third filtering registration means for registering, in the filtering storage unit, third filtering information indicating a control type of central processing transfer for all communication type packets as filtering information having the lowest priority when exceeding the amount; And filtering adjusting means for deleting the first filtering information stored in the filtering storage unit in order from the lowest priority information.
また本発明は、前記フィルタリング調整手段が、前記フィルタリング記憶部への前記第2フィルタリング情報の登録が増加することにより、当該第2フィルタリング情報の情報量が、前記フィルタリング記憶部で記憶できる情報量を超えた場合に、前記フィルタリング記憶部で記憶している前記第2のフィルタリング情報のうち優先度の低い情報から順に削除することを特徴とする。 Further, according to the present invention, the amount of information of the second filtering information can be stored in the filtering storage unit by increasing the registration of the second filtering information in the filtering storage unit. When exceeding, it deletes in order from information with a low priority among the said 2nd filtering information memorize | stored in the said filtering memory | storage part, It is characterized by the above-mentioned.
また本発明は、中央演算処理部とパケット通過制御部とを備え、一方の通信ネットワーク経路から受信したパケットを他方の通信ネットワーク経路へ通過させるか否かを制御するパケット通過制御装置におけるパケット通過制御方法であって、前記中央演算処理部の第1フィルタリング登録手段が、前記パケットの通過許可、廃棄、中央演算処理転送の何れかの制御種別と、前記パケットの通信種別と、を示す第1フィルタリング情報を保持するフィルタリングテーブルから、該第1フィルタリングを読み取って、当該第1フィルタリングが前記通過許可を示す場合には中央演算処理転送の情報に書き換えて、前記パケット通過制御部のフィルタリング記憶部へ登録し、前記パケット通過制御部の中央演算処理部転送手段が、パケットを受信した際に、当該パケットの通信種別と制御種別が、前記フィルタリング記憶部に登録されている前記第1フィルタリングに一致する場合に、その受信したパケットの少なくとも通信種別を前記中央演算処理部へ転送し、前記中央演算処理部の第2フィルタリング情報登録手段が、前記受信したパケットの、前記一方の通信ネットワーク経路から前記他方の通信ネットワーク経路への通過、および前記他方の通信ネットワーク経路から前記一方の通信ネットワーク経路への通過、の両方の通過許可を示す第2フィルタリング情報それぞれを、前記第1フィルタリング情報より優先度の高い情報として優先的に前記フィルタリング記憶部に登録し、前記パケット通過制御部の通過処理手段が、前記受信したパケットに関連する一連のパケット処理について、前記フィルタリング記憶部に登録された前記第2フィルタリング情報に一致するか否かを前記優先度順に判定し、一致している場合には前記中央演算処理部を介さずに通過処理を行なうことを特徴とするパケット通過制御方法である。 The present invention also provides a packet passing control in a packet passing control device that includes a central processing unit and a packet passing control unit, and controls whether or not a packet received from one communication network path is passed to the other communication network path. A first filtering registration unit of the central processing unit, wherein the first filtering registration unit indicates a control type of any one of the packet pass permission, discard, and central processing transfer and a communication type of the packet. Read the first filtering from the filtering table holding the information, and if the first filtering indicates the passage permission, rewrite the information to the central processing transfer and register it in the filtering storage unit of the packet passage control unit The central processing unit transfer means of the packet passage control unit receives the packet. When the communication type and control type of the packet match the first filtering registered in the filtering storage unit, at least the communication type of the received packet is transferred to the central processing unit. The second filtering information registering means of the central processing unit passes the received packet from the one communication network path to the other communication network path, and the one communication from the other communication network path. Each of the second filtering information indicating permission to pass both through the network path is preferentially registered in the filtering storage unit as information having a higher priority than the first filtering information, and passes through the packet passage control unit. A processing means is a series of packet processing related to the received packet. Next, whether or not the second filtering information registered in the filtering storage unit matches is determined in order of priority, and if they match, the passing process is performed without going through the central processing unit. Is a packet passage control method characterized by the above.
また本発明は、前記パケット通過制御部の前記中央演算処理部転送手段が、前記受信したパケットに関連する一連のパケット処理で受信した最終パケットを、前記中央演算処理部へ転送し、前記中央演算処理部の第2フィルタリング削除手段が、前記最終パケットを受付けることにより、前記第2フィルタリング情報を前記フィルタリング記憶部より削除することを特徴とする。 In the present invention, the central processing unit transfer means of the packet passage control unit transfers the final packet received in a series of packet processing related to the received packet to the central processing unit, and The second filtering deleting means of the processing unit deletes the second filtering information from the filtering storage unit by receiving the final packet.
また本発明は、時間計測手段が、前記フィルタリング記憶部に登録した第2フィルタリング情報に一致した最後のパケットの受信時刻からの経過時間を計測し、前記中央演算処理部の第2フィルタリング削除手段が、前記経過時間が所定時間となった場合に、前記第2フィルタリング情報を前記フィルタリング記憶部より削除することを特徴とする。 In the present invention, the time measurement means measures the elapsed time from the reception time of the last packet that matches the second filtering information registered in the filtering storage section, and the second filtering deletion means of the central processing section The second filtering information is deleted from the filtering storage unit when the elapsed time reaches a predetermined time.
また本発明は、第3フィルタリング登録手段が、前記フィルタリング記憶部への前記第2フィルタリング情報の登録が増加することにより、当該第2フィルタリング情報と前記第1フィルタリング情報とからなる情報量が、前記フィルタリング記憶部で記憶できる情報量を超えた場合に、最も優先度の低いフィルタリング情報として、全ての通信種別のパケットについて中央演算処理転送の制御種別を示す第3フィルタリング情報を前記フィルタリング記憶部に登録し、フィルタリング調整手段が、前記フィルタリング記憶部で記憶している前記第1のフィルタリング情報のうち優先度の低い情報から順に削除することを特徴とする。 In the present invention, the third filtering registration unit increases the registration of the second filtering information in the filtering storage unit, so that an information amount including the second filtering information and the first filtering information is When the amount of information that can be stored in the filtering storage unit is exceeded, the third filtering information indicating the control type of central processing transfer is registered in the filtering storage unit as the lowest priority filtering information for all communication type packets. And a filtering adjustment means deletes in order from information with a low priority among said 1st filtering information memorize | stored in the said filtering memory | storage part.
また本発明は、前記フィルタリング調整手段が、前記フィルタリング記憶部への前記第2フィルタリング情報の登録が増加することにより、当該第2フィルタリング情報の情報量が、前記フィルタリング記憶部で記憶できる情報量を超えた場合に、前記フィルタリング記憶部で記憶している前記第2のフィルタリング情報のうち優先度の低い情報から順に削除することを特徴とする。 Further, according to the present invention, the amount of information of the second filtering information can be stored in the filtering storage unit by increasing the registration of the second filtering information in the filtering storage unit. When exceeding, it deletes in order from information with a low priority among the said 2nd filtering information memorize | stored in the said filtering memory | storage part, It is characterized by the above-mentioned.
従来パケットフィルタリングの処理全てをCPUなどの中央演算処理部で行なっていた為、中央演算処理部のパケットフィルタリング処理にかかる負荷が大きかったが、本発明によれば、通過処理手段、フィルタリング記憶部などを有するパケット通過制御部を、例えば1つのチップとしてまとめて回路構成し、通過処理手段、にパケットフィルタリングの処理を任せるので、CPUの処理軽減を行なうことができる。
また、パケット通過制御部を、1つのチップとしてまとめて回路構成した場合において、通過処理手段、にパケットフィルタリングの処理を行なわせた際に、フィルタリング記憶部の限られたデータ容量を、動的に生成された第2フィルタリング情報のデータ量が超えた場合の、中央演算処理部における処理との調整を行なうことができる。
Conventionally, all processing of packet filtering has been performed by a central processing unit such as a CPU, so the load on the packet filtering processing of the central processing unit is large. According to the present invention, the passage processing means, the filtering storage unit, etc. For example, the packet passing control unit having the above is collectively configured as one chip, and the packet filtering process is entrusted to the passing processing unit, so that the CPU processing can be reduced.
In addition, when the packet passage control unit is configured as a single chip, when the packet processing is performed by the passage processing unit, the limited data capacity of the filtering storage unit is dynamically increased. Adjustment with the process in the central processing unit when the data amount of the generated second filtering information exceeds can be performed.
以下、本発明の一実施形態によるパケット通過制御装置を図面を参照して説明する。図1は同実施形態によるパケット通過制御装置の構成を示すブロック図である。この図において、符号1はパケット通過制御装置であり、例えばファイアーウォールやルータなどに組み込まれるものである。そしてパケット通過制御装置1において、符号11はWAN側のI/F(interface)、12はLAN側のI/F(interface)である。また符号13はフィルタリング処理部(中央演算処理部転送手段、通過処理手段)であり、少なくともパケットの通過、廃棄、CPU転送の処理を行なう。またフィルタリング記憶部14はフィルタリング情報が記録される記憶部である。
Hereinafter, a packet passing control apparatus according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a packet passage control apparatus according to the embodiment. In this figure,
フィルタリング情報とは、パケットの通信種別<通信サービス(TCP、UDP、HTTP、FTPなどのサービス)、フラグ種別(SYN、FINなど)、宛先IPアドレス、宛先ポート番号、送信元IPアドレス、送信元ポート番号などのフィルタ規則適合判定条件>を示す情報や、通過、廃棄、CPU転送の制御種別の情報を保持したものであり、このフィルタイリング情報に基づいてフィルタリング処理部13がフィルタリングの処理を行う。また15は中央演算処理インタフェース(CPU/IF)であり、CPU(中央演算処理部)へ送信される情報を受付ける処理を行なう。そしてこれらI/F11、I/F12、フィルタリング処理部13、フィルタリング記憶部14、中央演算処理インタフェース15は、転送処理の高速化を図るため半導体素子で構成したパケット通過制御回路として、例えば1つのチップとしてまとめて回路構成されている。
Filtering information includes packet communication type <communication service (services such as TCP, UDP, HTTP, and FTP), flag type (SYN, FIN, etc.), destination IP address, destination port number, source IP address, source port Information indicating a filter rule conformity determination condition> such as a number and control type information of passing, discarding, and CPU transfer are held, and the
また符号16はCPU(第1フィルタリング登録手段、第2フィルタリング情報登録手段、時間計測手段、第2フィルタリング削除手段、第3フィルタリング登録手段、フィルタリング調整手段)である。このCPU16では、主にフィルタリング処理部13で行なうフィルタリング処理から外れた(つまりCPU転送された)パケットをパケット通過制御回路から受信し、受信したフレームに対する転送先を検出する等のSPI処理を予め内部で動作するソフトウェアに基づいて行う。また17はテーブル記憶部(フィルタリングテーブル)であり、ネットワーク管理者などのユーザによって登録されたフィルタリング情報を記憶している。そして、SPI処理を行なう際には、CPU16は、中央演算処理インタフェース15を介してフィルタリング処理部13から受付けたパケットの情報のみのフィルタリング処理を、テーブル記憶部17に記録されているフィルタリング情報に基づいて行なう。
次にフィルタリング記憶部の構成について説明する。
図2はフィルタリング記憶部の構成を示す図である。
この図が示すように、フィルタリング記憶部14では、CPU転送候補エントリ、SPIエントリ、フィルタエントリからなる、3種類のフィルタリング情報が記録される。CPU転送候補エントリは、CPU16へ転送すると予め決められた特定のパケットについてのフィルタリング情報であり、例えばARPのパケットなどの、他の装置へ転送せずに、自装置で処理するパケットに関するフィルタリング情報である。またSPIエントリはCPU16が動的に生成したフィルタリング情報であり、例えば、内部ネットワークのA装置から外部ネットワークのB装置へのHTTP接続を許可している場合において、当該パケットを受信した際に、B装置からA装置に対する返答のパケットが通過できるように、動的に生成した、B装置→A装置の通信方向のHTTP接続の通過を示すフィルタリング情報などである。またフィルタエントリはユーザ登録作業によって予めテーブル記憶部17に記録されたものであり、パケット通過制御装置1の起動時などにCPU16によって自動的に書込まれる。またこのフィルタエントリにより1つセッションの最初に送信されたパケット(SYN)などを検出する。なお、図においてはCPU転送候補エントリ、SPIエントリ、フィルタエントリの順に優先度が与えられている。優先度とはSPI処理として受信したパケット一致するか否かを判定するための優先順位である。
Next, the configuration of the filtering storage unit will be described.
FIG. 2 is a diagram illustrating the configuration of the filtering storage unit.
As shown in this figure, the
図3はフィルタリング情報登録状況テーブルとフィルタリング記憶部の構成を示す図である。
次にフィルタリング情報の第1の登録処理について説明する。
パケット通過制御装置1が起動する際やCPU16の保持するフィルタリング情報登録状況テーブルの初期化の指示が合った場合には、まず、CPU16はテーブル記憶部17からフィルタリング情報を読み込む。このフィルタリング情報は、図2で示したCPU転送候補エントリ及びフィルタエントリの各フィルタリング情報である。またフィルタリング情報登録状況テーブルとはCPU16がフィルタリング記憶部14に登録したフィルタリング情報を記憶するためのテーブルである。そして、前記起動や初期化の際に、CPU16は、テーブル記憶部17から読み込んだフィルタリング情報(CPU転送候補エントリ、フィルタエントリ)をフィルタリング記憶部14に登録する。そして、この登録において、フィルタエントリのうち制御種別が“通過”となっている情報については、“CPU転送”と書き換えて登録する。
FIG. 3 is a diagram showing the configuration of the filtering information registration status table and the filtering storage unit.
Next, the first registration process of filtering information will be described.
When the packet passing
CPU16はSPIエントリとなるフィルタリング情報についても登録処理を行なう。このSPIエントリは、上記したように、パケット通過制御装置1がフィルタリングの処理を開始して動作している際に、セッションの初回に受信したパケットに基づいてCPU16が動的に生成したフィルタリング情報であり、CPU16はこの生成を行なうと、CPU転送候補エントリとフィルタエントリとの間にSPIエントリを登録していく。つまり、フィルタリング情報の中でCPU転送候補エントリを最も優先度を高く登録し、またSPIエントリを次に優先度を高く登録し、また最も優先度の低いフィルタリング情報としてフィルタエントリを登録する。CPU16はフィルタリング記憶部14に登録したフィルタリング情報については、登録したか否かを示すフラグなどをフィルタリング情報登録状況テーブルに書込んで記憶する。また優先度の順番などについてもフィルタリング情報登録状況テーブルに書込んで記憶する。
The
図4はパケット通過制御装置の処理フローの概要を示す図である。
図5はパケット通過制御装置が受信するパケットとそのパケットの受信に基づいて動的に生成したSPIエントリとを示すテーブルである。
次に図4、5を用いてパケット通過制御装置の処理フローについて説明する。
まずCPU16は初期化の指示を受付けた場合や起動時において、パケット通過制御装置テーブル記憶部17からCPU転送候補エントリとフィルタエントリの各フィルタリング情報を読み取って、フィルタリング記憶部14にCPU/IF15を介して登録する。この時CPU転送候補エントリを優先度を高く、またフィルタエントリをCPU転送候補エントリよりもフィルタ規則適用の優先度を低く登録する。そしてCPU16はその優先度の順番をフィルタリング情報登録状況テーブルに記録する。またフィルタエントリについては制御種別が通過である場合にはCPU転送と書き換えて登録する。
FIG. 4 is a diagram showing an outline of the processing flow of the packet passage control device.
FIG. 5 is a table showing packets received by the packet passage control apparatus and SPI entries dynamically generated based on the reception of the packets.
Next, the processing flow of the packet passing control device will be described with reference to FIGS.
First, the
そして最初のフィルタリング情報の登録が完了すると、SPIの処理を伴うパケットフィルタリングの処理を開始する。このような状況において、パケットAをLAN側のI/F12により受付けるとする(ステップS1)。パケットAは図5に示すように、受信論理I/FがI/F(LAN)12、送信論理I/FがI/F(WAN)11、送信元IPアドレス(S−IP)がIP−x、宛先IPアドレス(D−IP)がIP−y、送信元ポート番号(S−Port)がPort−x、宛先ポート番号(D−Port)がPort−y、またTCPフラグがSYNのパケットである。 When the registration of the first filtering information is completed, packet filtering processing accompanied by SPI processing is started. In this situation, it is assumed that the packet A is received by the LAN side I / F 12 (step S1). As shown in FIG. 5, in the packet A, the reception logic I / F is I / F (LAN) 12, the transmission logic I / F is I / F (WAN) 11, and the source IP address (S-IP) is IP- x, the destination IP address (D-IP) is IP-y, the source port number (S-Port) is Port-x, the destination port number (D-Port) is Port-y, and the TCP flag is SYN. is there.
フィルタリング処理部13はパケットAを受付けると、次に、フィルタリング記憶部14に記録されているフィルタリング情報を優先度の高い順に順じ参照し、受信したパケットAの通信種別(通信サービス、フラグ種別、宛先IPアドレス、宛先ポート番号、送信元IPアドレス、送信元ポート番号など)と比較して、パケットAと一致するフィルタリング情報があるか否かを判定する。ここで、フィルタリング記憶部14に記録されているフィルタエントリにパケットAの通信種別と一致するエントリがあると判断された場合、その制御種別はCPU転送(フィルタエントリの制御種別が通過である場合には、登録時に書き換えられて全てCPU転送となっている)であるので、パケットAをCPU16に転送する(ステップS2)。
When receiving the packet A, the
CPU16はパケットAを受信すると、そのパケットAに関するSPIエントリを生成する処理を開始する。この時CPU16は図5で示すようなSPIエントリ(1)とSPIエントリ(2)を生成する。SPIエントリ(1)は、受信論理I/FがI/F(WAN)11、送信論理I/FがI/F(LAN)12、送信元IPアドレス(S−IP)がIP−y、宛先IPアドレス(D−IP)がIP−x、送信元ポート番号(S−Port)がPort−y、宛先ポート番号(D−Port)がPort−xであるパケットを通過させ、またTCPフラグの全てについて通過させるフィルタリング情報である。つまりSPIエントリ(1)は、パケットAを初回(SYN)のセッションとする当該セッションにおける他のパケットのうちI/F11からI/F12へ通過するパケットのためのフィルタリング情報である。
When receiving the packet A, the
またSPIエントリ(2)は、受信論理I/FがI/F(LAN)12、送信論理I/FがI/F(WAN)11、送信元IPアドレス(S−IP)がIP−x、宛先IPアドレス(D−IP)がIP−y、送信元ポート番号(S−Port)がPort−x、宛先ポート番号(D−Port)がPort−y、またプロトコルがTCPであり、TCPフラグがSYN/ACK/PSH/URGであるか、またはFIN、RST=0のパケットである。つまり、パケットAを初回のセッションとした当該セッションのパケットのうちI/F12からI/F11へ通過するパケット(FIN、RST=0)のためのフィルタリング情報である。
The SPI entry (2) has a reception logic I / F of I / F (LAN) 12, a transmission logic I / F of I / F (WAN) 11, a transmission source IP address (S-IP) of IP-x, The destination IP address (D-IP) is IP-y, the source port number (S-Port) is Port-x, the destination port number (D-Port) is Port-y, the protocol is TCP, and the TCP flag is SYN / ACK / PSH / URG or FIN, RST = 0 packet. That is, it is filtering information for a packet (FIN, RST = 0) that passes from the I /
そしてCPU16は生成したSPIエントリ(1)と(2)をフィルタリング記憶部14に登録する(ステップS3)。この時CPU16は、フィルタエントリより優先度が高く、またCPU転送候補エントリよりも優先度が低い位置(アドレス:番地)に登録する。またCPU16は登録したSPIエントリ(1)(2)の優先度の情報をフィルタリング情報登録状況テーブルにより記憶しておく。そしてSPIエントリ(1)と(2)とを登録すると、パケットAについて、フィルタリング情報登録状況テーブルで記憶しているフィルタリング情報に基づいてフィルタリング処理を行なう。フィルタリング情報登録状況テーブルで記憶しているフィルタリング情報には、パケットAの通信種別と一致するフィルタエントリ(制御種別=通過)が記録されているので、CPU16はパケットAをCPU/IF15を介してI/F(WAN)11に転送し、WAN側の通信ネットワークに送信する(ステップS4)。
Then, the
次にパケットAを初回(SYN)のセッションとした場合の当該セッションの他のパケットがI/F(WAN)11やI/F(LAN)12で受信する。フィルタリング処理部13はそれらの一連のパケットについてフィルタリング処理を行なう。このフィルタリング処理は上記同様にフィルタリング記憶部14に登録されているフィルタリング情報と比較して行なう。ここで、パケットAを初回(SYN)のセッションとした場合の当該セッションの他のパケットはSPIエントリ(1)またはSPIエントリ(2)と一致する。またこのSPIエントリ(1)(2)は制御種別が“通過”となっている。従って、フィルタリング処理部13は、パケットAを初回(SYN)のセッションとした場合の当該セッションの他のパケットを受信した場合には、CPU16に転送せず、I/F(WAN)11で受信したパケットについてはダイレクトにI/F(LAN)12から出力し、またI/F(LAN)12で受信したパケットについてはダイレクトにI/F(WAN)11から出力する。つまりパケットAをセッションの初回に受信したパケットとして、それ以降の同一セッションのパケットについてはパケット通過制御回路でSPIの処理(双方向のハードウェア転送の処理)を行なう(ステップS5)。
Next, when the packet A is the first (SYN) session, another packet of the session is received by the I / F (WAN) 11 or the I / F (LAN) 12. The
次にパケットAを初回(SYN)のセッションとした場合の当該セッションの最後(FIN)のパケットBをI/F(LAN)12で受信したとする(ステップS6)。するとフィルタリング処理部13はフィルタリング記憶部14に登録されているフィルタリング情報と比較する。ここでSPIエントリ(1)はFIN=1となっているパケットについてはフィルタの対象外であるので、フィルタリング処理部13は優先度に従って順次フィルタエントリまで確認する。そして、フィルタエントリにおいて通信種別の一致するエントリ(パケットAを処理したフィルタエントリと同一のエントリ)が存在し、その制御種別がCPU転送であるので、パケットBをCPU/IF15を介してCPU16へ転送する(ステップS7)。CPU16はパケットBについての制御種別がフィルタリング情報登録状況テーブルにおいて“通過”となっているので、I/F(WAN)11へ出力する(ステップS8)。またCPU16は、パケットBのTCPフラグがFINである為、そのパケットに関するセッションのSPIエントリ(1)及び(2)を、パケットBのI/F(WAN)11への送出後、所定の時間経過した際にフィルタリング記憶部14から削除する処理を行なう(ステップS9)。
Next, it is assumed that the last (FIN) packet B of the session when the packet A is the first (SYN) session is received by the I / F (LAN) 12 (step S6). Then, the
以上の処理により、従来であればSPIの処理全てをCPU16で行なっていた為、CPU16のSPI処理にかかる負荷が大きかったが、フィルタリング処理部13、フィルタリング記憶部14などを有するパケット通過制御回路を、例えば1つのチップとしてまとめて回路構成し、フィルタリング処理部13にSPIの処理を任せるので、CPUの処理軽減を行なうことができる。
With the above processing, since all of the SPI processing was conventionally performed by the
なお、上述の処理においては、SPIエントリ(1)、(2)の削除をパケットBのI/F(LAN)12での受信に基づいてCPU16で行なっているが、I/F(WAN)11側で受信したFINパケットの受信に基づいてCPU16でSPIエントリを削除するようにしても良い。そのような場合には、SPIエントリ(1)が全てのTCPフラグについて通過を許可するフィルタリング情報であるため、別途、I/F(WAN)11側で受信したFIN=1のパケットのCPU転送を示すSPIエントリ(3)を生成して、フィルタリング記憶部14に登録するようにする。
In the above processing, the SPI entries (1) and (2) are deleted by the
またフィルタリング記憶部14はメモリなどにより構成されるため、登録できるフィルタリング情報のデータ量が限られる。従って、SPIエントリが少ないほどメモリの容量を効率的に使用することができる。従って、SPIエントリ(1)、(2)を1つのエントリとしてまとめた双方向エントリとして生成し、1つのエントリで双方向のフィルタリング処理をするようにしても良い。
Further, since the
次に、SPIエントリのデータ量が増大してSPIエントリとフィルタエントリのフィルタリング情報がフィルタリング記憶部14に格納できなくなった場合の処理について説明する。
図6は登録したフィルタリング情報の調整の概要を示す第1の図である。
図6においてはSPIエントリの生成および登録が増大することにより、SPIエントリよりも優先度の低いフィルタエントリが全て登録できなくなった場合の処理の概要を示している。このような場合には、CPU16は優先度の低い順にフィルタリング記憶部14からフィルタエントリを削除していく。またCPU16は削除したフィルタエントリの情報をフィルタリング情報登録状況テーブルで管理する。そしてCPU16はフィルタリング記憶部14の最も優先度の低い情報として、全パケットをCPU転送する旨を示すフィルタエントリを登録する。これにより、フィルタリング処理部13におけるSPI処理において、フィルタリング記憶部14に登録されているフィルタリング情報と一致しなかったパケットについては、全てCPU16に転送されて、CPU16においてSPI処理が行なわれる。
Next, processing when the data amount of the SPI entry increases and filtering information of the SPI entry and the filter entry cannot be stored in the
FIG. 6 is a first diagram showing an outline of adjustment of registered filtering information.
FIG. 6 shows an overview of processing when the generation and registration of SPI entries increase, and all filter entries having a lower priority than the SPI entry cannot be registered. In such a case, the
また図7は登録したフィルタリング情報の調整の概要を示す第2の図である。
図7においてはSPIエントリの生成および登録が増大することにより、SPIエントリさえも全て登録ができなくなった場合の処理の概要を示している。このような場合には、CPU16はSPI処理におけるSPIエントリの最近一定時間内における利用回数をカウントして、その利用回数が多い順に優先度を決定し、優先度の高い順にSPIエントリをフィルタリング記憶部14に登録し、その他のSPIエントリとフィルタエントリについてはフィルタリング情報登録状況テーブルで記憶しておく。そしてCPU16はフィルタリング記憶部14の最も優先度の低い情報として、全パケットをCPU転送する旨を示すフィルタエントリを登録する。
FIG. 7 is a second diagram showing an outline of adjustment of registered filtering information.
FIG. 7 shows an overview of processing when all the SPI entries cannot be registered due to the increase in the generation and registration of SPI entries. In such a case, the
以上の処理により、フィルタリング記憶部14などを有するパケット通過制御回路を、例えば1つのチップとしてまとめて回路構成した場合において、フィルタリング処理部13にSPIの処理を行なわせた際に、フィルタリング記憶部14の限られたデータ容量を、動的に生成されたSPIエントリのデータ量が超えた場合の、CPUにおける処理との調整を行なうことができる。
When the packet passage control circuit having the
次に、上述のパケット通過制御装置の処理を、より詳細に説明する。
上述の処理においてはフィルタリング処理において、受信パケットがTCPの場合を示したが、実際には、TCP、UDP、ICMPなどのサービスに応じた処理が行なわれる。
図8はCPUによるパケット処理のフローを示図である。
まず、電源投入時などにおいて、CPU16はフィルタリング記憶部14で記憶するSPIエントリを初期化する(ステップS81)。そしてパケットの受信があるか否かを判断して(ステップS82)待機する。ここで受信パケットがあった場合には、フィルタ・SPI検索前処理<受信論理I/F検索(ステップS83)、NAT/NAPT検索(ステップS84)、経路検索(ステップS85)>が行なわれる。受信論理I/F検索とは、受信パケット毎に受信した論理I/Fを決定する処理であり、またNAT/NAPT検索とは、グローバルIPアドレス・ポート番号をローカルIPアドレス・ポート番号に変換する処理であり、また経路検索とは、転送先の論理I/Fを決定する(さらに宛先MACアドレスやMTUなどもあわせて決定する)処理である。なお、IPフラグメントによって分割されたパケットを受信した場合には、再構成(分割前のパケットに戻す)することによって、IPフラグメントによって分割されたパケットに対してNAPTを実施することも可能である。
Next, the processing of the above-described packet passage control device will be described in more detail.
In the above-described processing, the case where the received packet is TCP has been shown in the filtering processing, but actually, processing according to services such as TCP, UDP, and ICMP is performed.
FIG. 8 shows a flow of packet processing by the CPU.
First, when the power is turned on, the
そして次にCPU16は、フィルタ・SPI検索を行なう(ステップS86)。この処理は、受信したパケットの通過・廃棄の判定である。なお、IPフラグメントによって分割されたパケットについては、フラグメント追跡もしくは再構成を実施することによって、IPフラグメントによって分割されたパケットに対しても、IPヘッダのみならずレイヤ4ヘッダに含まれる情報に基づいて判定してもよい。また、フィルタ・SPI検索と同時にパケットの品質クラスを決定する分類検索を実施してもよい。
Next, the
次に、CPU16は、SPIエントリ管理を行う(ステップS87)。このSPIエントリ管理は受信パケットに対するSPIエントリを登録するか否かを判定する処理である。そして、分類検索(ステップS88)、NAT/NAPT検索(ステップS89)などのフィルタ・SPI検索後に必要な処理を行なう。分類検索とは、パケットの品質クラスを決定する処理、NAT/NAPT検索は、上述したようにグローバルIPアドレス・ポート番号をローカルIPアドレス・ポート番号に変換する処理である。なお、IPフラグメントによって分割されたパケットを受信した場合には、再構成(分割前のパケットに戻す)することによって、IPフラグメントによって分割されたパケットに対してNAPTを実施することも可能である。
Next, the
図9はSPIエントリ管理の処理フローである。
図9より、CPU16は、ステップS87のSPIエントリ管理の処理において、受信パケットが、SPIエントリとしてフィルタリング情報を登録する対象のパケットか否かを判定する(ステップS90)。そして、SPIエントリ登録対象のパケットでない場合には、SPIエントリ削除パケットか否かを判定し(ステップS91)、そうであれば、SPIエントリ削除処理を行なう(ステップS92)。ステップS91でNoの場合には、処理を終了する。
FIG. 9 is a processing flow of SPI entry management.
9, the
また、SPIエントリ登録対象のパケットである場合には、TCPのパケットか(ステップS93)、UDPのパケットか(ステップS94)、ICMPのパケットか(ステップS95)を順次判定する。そして、TCPのパケットである場合には、TCPのSPIエントリ登録処理(ステップ96)を行い、UDPのパケットであればUDPのSPIエントリ登録処理を行い(ステップS97)、またICMPのパケットである場合には、ICMPのSPIエントリ登録処理を行なう(ステップS98)。またTCP、UDP、ICMPのいずれのパケットでもない場合には汎用SPIエントリ登録処理を行なう(ステップS99)。 If the packet is a SPI entry registration target packet, it is sequentially determined whether it is a TCP packet (step S93), a UDP packet (step S94), or an ICMP packet (step S95). If the packet is a TCP packet, a TCP SPI entry registration process (step 96) is performed. If the packet is a UDP packet, a UDP SPI entry registration process is performed (step S97). In step S98, ICMP SPI entry registration processing is performed. If it is not a TCP, UDP or ICMP packet, a general-purpose SPI entry registration process is performed (step S99).
図10はSPI登録パケット判定処理のフローを示す図である。
上述のステップS90のSPI登録パケットか否かの判定においては、まず、CPU16は、SPIありか否かを判定する(ステップS901)。このSPIありか否かの情報は予め外部から設定されることにより記憶している。次に、SPIエントリに不適合かつフィルタエントリに適合か否かの判定(ステップS902)、フィルタエントリの結果が通過か否かの判定(ステップS903)、TCP以外またはTCPのSYNパケットか否かの判定(ステップS904)が行なわれ、全ての判定においてYesである場合には、SPIフィルタを登録するパケットであると判定される(つまり、SPI登録パケット判定がYes)。またそれ以外はSPIフィルタを登録しないパケットであると判定される(つまり、SPI登録パケット判定がNo)。
FIG. 10 is a diagram showing the flow of the SPI registration packet determination process.
In determining whether the packet is an SPI registration packet in step S90 described above, first, the
図11はSPIエントリ削除パケットの判定処理のフローを示す第1の図である。
上述のステップS91のSPIエントリ削除対象のパケットであるか否かの判定においては、まず、CPU16は、受信した当該パケットがTCPのFINパケットかまたはRSTパケットかを当該パケットのフラグにより判定する(ステップS911a)。そしてYesの場合には、次にフィルタ・SPI検索のテーブルに適合エントリがあり、かつ、結果が通過か否かを判定する(ステップS912a)。この判定においてYesの場合には、受信パケットで特定されるSPIエントリが削除対象のSPIエントリであると決定する(ステップS913a)。そして、削除対象SPIエントリについてのFIN/RSTパケットの受信側と送信側の双方向転送が完了したか否かを判定し(ステップS914a)、Noであれば、FIN/RSTパケット転送履歴の記録を行なう(ステップS915a)。そしてステップS914aにおいてYesであればSPIエントリの削除処理(Yes)に移行し、またステップS911a、912aにおいてNoの場合や、ステップS915aの後に、SPIエントリの削除処理をせずに終了する。
FIG. 11 is a first diagram illustrating a flow of determination processing for an SPI entry deletion packet.
In determining whether or not the packet is the SPI entry deletion target in step S91 described above, first, the
図12はSPIエントリ削除パケットの判定処理のフローを示す第2の図である。
上述のSPIエントリ削除パケットの判定処理でなく、次の方法の処理により行なってもよい。
上述のステップS91のSPIエントリを削除する対象のパケットであるか否かの判定において、まず、CPU16は、受信した当該パケットがTCPのFINパケットかまたはRSTパケットかをフラグにより判定する(ステップS911b)。そしてYesの場合には、次にフィルタ・SPI検索のテーブルに適合エントリがあり、かつ、結果が通過か否かを判定する(ステップS912b)。この判定においてYesの場合には、受信パケットで特定されるSPIエントリが削除対象のSPIエントリであると決定する(ステップS913a)。そしてTCPのSPIエントリ削除パケットの転送保護タイマの起動を行なう(ステップS914b)。そしてステップS914bの後、SPIエントリの削除処理(Yes)に移行する。なお、ステップS911b、912bにおいてNoの場合には、SPIエントリの削除処理をせずに終了する。
FIG. 12 is a second diagram illustrating the flow of the SPI entry deletion packet determination process.
Instead of the SPI entry deletion packet determination process described above, the following method may be used.
In determining whether or not the SPI entry is a packet to be deleted in step S91, first, the
図13はSPIエントリ削除パケットの判定処理のフローを示す第3の図である。
受信パケットがICMPの場合には、次の処理によりSPIエントリ削除パケットの判定処理が行なわれる。
CPU16は、上記ステップS911a(またはステップS911b)の判定においてNoの場合には、受信パケットがICMPのパケットか否かを判定する(ステップS912c)。そして、ICMPパケットである場合には、フィルタ・SPI検索のテーブルに適合エントリがありかつ結果が通過か否かを判定する(ステップS913c)。この判定においてYesの場合には、受信パケットで特定されるSPIエントリが削除対象のSPIエントリであると決定し(ステップS914c)、SPIエントリの削除処理(Yes)に移行する。なおステップS912c、913cにおいてNoの場合には、SPIエントリの削除処理をせずに終了する。
FIG. 13 is a third diagram showing the flow of the SPI entry deletion packet determination process.
When the received packet is ICMP, the SPI entry deletion packet determination process is performed by the following process.
If the determination in step S911a (or step S911b) is No, the
図14はTCPのSPIエントリ登録処理のフローを示す第1の図である。
SPIエントリ登録の対象となる受信したパケットPは、送信元IPアドレス(S−IP)、あて先IPアドレス(D−IP)、プロトコル(TCP)、送信元ポート番号(S−Port)、あて先ポート番号(D−Port)、のTCPのSYNパケットであるとする。この場合、まず、CPU16は、受信パケットのSPIエントリの登録を行なう(ステップS931a)。この登録は、受信パケットPのTCPセッションの双方向(パケット転送の流れが互いに逆向きで同一セッションに属するパケットの組)のパケットを通過させるためのエントリであり、当該エントリをCPU16で保持するフィルタ・SPI検索テーブルに登録する。図15はCPUで保持するフィルタ・SPI検索テーブルを示す図第1のである。
FIG. 14 is a first diagram showing a flow of TCP SPI entry registration processing.
The received packet P to be registered for SPI entry includes a source IP address (S-IP), a destination IP address (D-IP), a protocol (TCP), a source port number (S-Port), and a destination port number. (D-Port), a TCP SYN packet. In this case, first, the
次に、CPU16は、パケット通過制御回路へのSPIエントリの登録を行なう(ステップS932a)。この処理は受信パケットPが属するTCPセッションについて、双方向(パケット転送の流れが互いに逆向きで同一セッションに属するパケットの組)のパケット(ただしFIN/RSTパケットを除く)を通過させるためのエントリと、受信パケットPの転送方向と逆向きで、同一TCPセッションに属するFIN/RSTパケットをCPU16に転送する為のエントリとを、パケット通過制御回路のフィルタ・SPI検索テーブルに登録する処理である。図16はパケット通過制御回路で保持するフィルタ・SPI検索テーブルを示す第1の図である。なお、CPU16で保持するフィルタ・SPI検索テーブルに登録したSPIエントリのエントリ番号と、パケット通過制御回路のフィルタ・SPI検索テーブルに登録したパケット通過制御回路用SPIエントリのエントリ番号の対応を記憶しておく。またUsedカウンタをクリアする。このUsedカウンタについては後述する。そして、CPU16は登録したSPIエントリの有効期間を計測するタイマ(SPIエントリ有効タイマ)を起動する(ステップS933a)。このタイマの動作については後述する。
Next, the
図17はTCPのSPIエントリ登録処理のフローを示す第2の図である。
ステップS931a〜S933aで示した処理を、次の処理で行うようにしてもよい。
まず、CPU16は、受信パケットのSPIエントリの登録を行なう(ステップS931b)。この登録は、受信パケットPの属するTCPセッションの受信側と送信側の双方向(パケット転送の流れが互いに逆向きで同一セッションに属するパケットの組)のパケットを通過させるためのエントリをCPU16で保持するフィルタ・SPI検索テーブル(図15)に登録する処理である。
FIG. 17 is a second diagram showing the flow of the TCP SPI entry registration process.
The processing shown in steps S931a to S933a may be performed by the following processing.
First, the
次にCPU16はパケット通過制御回路用SPIエントリの登録を行なう(ステップS932b)この登録は、受信パケットPの属するTCPセッションの受信側と送信側の双方向(パケット転送の流れが互いに逆向きで同一セッションに属するパケットの組)のパケット(ただし受信パケットと同一方向のFIN/RSTパケットを除く)を通過させるためのエントリを、パケット通過制御回路のフィルタ・SPI検索テーブル(図18)に登録する処理である。図18はパケット通過制御回路で保持するフィルタ・SPI検索テーブルを示す第2の図である。
Next, the
なお、パケット通過制御回路のフィルタ・SPI検索テーブルのエントリが全て登録済みの場合の処理については後述する。次にCPU16のフィルタ・SPI検索テーブルに登録したSPIエントリのエントリ番号と、パケット通過制御回路のフィルタ・SPI検索テーブルに登録したパケット通過制御回用SPIエントリのエントリ番号の対応表を記憶しておく。またUsedカウンタをクリアする。このUsedカウンタについては後述する。そして、CPU16は登録したSPIエントリの有効期間を計測するタイマ(SPIエントリ有効タイマ)を起動する(ステップS933b)。このタイマの動作については後述する。
The processing when all entries in the filter / SPI search table of the packet passage control circuit have been registered will be described later. Next, the correspondence table of the entry number of the SPI entry registered in the filter / SPI search table of the
図19はUDPのSPIエントリ登録処理のフローを示す図である。
SPIエントリ登録の対象となる受信したパケットPは、送信元IPアドレス(S−IP)、あて先IPアドレス(D−IP)、プロトコル(UDP)、送信元ポート番号(S−Port)、あて先ポート番号(D−Port)、のパケットであるとする。この場合、まず、CPU16は、受信パケットのSPIエントリの登録を行なう(ステップS941)。この登録は、受信パケットPが属するUDPセッションの双方向(パケット転送の流れが互いに逆向きで同一セッションに属するパケットの組)のパケットを通過させるためのエントリであり、当該エントリをCPU16で保持するフィルタ・SPI検索テーブルに登録する。図20はCPUで保持するフィルタ・SPI検索テーブルを示す第2の図である。
FIG. 19 is a flowchart showing the UDP SPI entry registration process.
The received packet P to be registered for SPI entry includes a source IP address (S-IP), a destination IP address (D-IP), a protocol (UDP), a source port number (S-Port), and a destination port number. It is assumed that the packet is (D-Port). In this case, first, the
次に、CPU16は、パケット通過制御回路へのSPIエントリの登録を行なう(ステップS942)。この処理は受信パケットPが属するUDPセッションについて、双方向(パケット転送の流れが互いに逆向きで同一セッションに属するパケットの組)のパケットを通過させるためのエントリを、パケット通過制御回路のフィルタ・SPI検索テーブルに登録する。図21はパケット通過制御回路で保持するフィルタ・SPI検索テーブルを示す第3の図である。なお、パケット通過制御回路のフィルタ・SPI検索テーブルのエントリが全て登録済みの場合の処理については後述する。そしてCPU16は、CPUのフィルタ・SPI検索テーブルに登録したSPIエントリのエントリ番号と、パケット通過制御回路のフィルタ・SPI検索テーブルに登録したパケット通過制御回路用SPIエントリのエントリ番号の対応を記憶しておく。またUsedカウンタをクリアする。このUsedカウンタについては後述する。そして、CPU16は登録したSPIエントリの有効期間を計測するタイマ(SPIエントリ有効タイマ)を起動する(ステップS943)。このタイマの動作については後述する。
Next, the
図22はICMPのSPIエントリ登録処理のフローを示す図である。
SPIエントリ登録対象の受信パケットPが、送信元IPアドレス(S−IP)、あて先IPアドレス(D−IP)、プロトコル(ICMP)、ICMPタイプ=8、ICMPコード=0、のICMPのパケットであるとする。まず、CPU16は、受信パケットのSPIエントリの登録を行なう(ステップS951)。この登録は、受信パケットPのエコー要求メッセージに対する、エコー応答メッセージをCPU16に転送させる為のエントリであり、当該エントリを、CPU16のフィルタ・SPI検索テーブル(図23)に登録する。図23はCPUで保持するフィルタ・SPI検索テーブルを示す第3の図である。
FIG. 22 is a diagram showing the flow of the ICMP SPI entry registration process.
The received packet P subject to SPI entry registration is an ICMP packet having a source IP address (S-IP), a destination IP address (D-IP), a protocol (ICMP), an ICMP type = 8, and an ICMP code = 0. And First, the
次に、CPU16は、パケット通過制御回路へのSPIエントリの登録を行なう(ステップS952)。この処理は受信パケットPのエコー要求メッセージに対する、エコー応答メッセージをCPUに転送させる為のエントリを、パケット通過制御回路のフィルタ・SPI検索テーブル(図24)に登録する処理である。図24はパケット通過制御回路で保持するフィルタ・SPI検索テーブルを示す第4の図である。なお、パケット通過制御回路のフィルタ・SPI検索テーブルのエントリが全て登録済みの場合の処理については後述する。そしてCPU16は、CPUのフィルタ・SPI検索テーブルに登録したSPIエントリのエントリ番号と、パケット通過制御回路のフィルタ・SPI検索テーブルに登録したパケット通過制御回路用SPIエントリのエントリ番号の対応を記憶しておく。またUsedカウンタをクリアする。このUsedカウンタについては後述する。そして、CPU16は登録したSPIエントリの有効期間を計測するタイマ(SPIエントリ有効タイマ)を起動する(ステップS953)。このタイマの動作については後述する。
Next, the
図25は汎用パケットのSPIエントリ登録処理のフローを示す図である。
SPIエントリ登録対象の受信パケットPが、送信元IPアドレス(S−IP)、あて先IPアドレス(D−IP)、プロトコル(PROT)のパケットであるとする。まず、CPU16は、受信パケットのSPIエントリの登録を行なう(ステップS991)。この登録は、受信パケットPの双方向(パケット転送の流れが互いに逆向きのパケットの組)のパケットを通過させるためのエントリをCPU16で保持するフィルタ・SPI検索テーブル(図26)に登録する処理である。図26はCPUで保持するフィルタ・SPI検索テーブルを示す第4の図である。
FIG. 25 is a diagram showing a flow of SPI entry registration processing for a general-purpose packet.
It is assumed that the received packet P subject to SPI entry registration is a packet of a source IP address (S-IP), a destination IP address (D-IP), and a protocol (PROT). First, the
次に、CPU16は、パケット通過制御回路へのSPIエントリの登録を行なう(ステップS992)。この処理は受信パケットPの双方向(パケット転送の流れが互いに逆向きのパケットの組)のパケットを通過させるためのエントリを、パケット通過制御回路のフィルタ・SPI検索テーブル(図27)に登録する処理である。図27はパケット通過制御回路で保持するフィルタ・SPI検索テーブルを示す第5の図である。なお、パケット通過制御回路のフィルタ・SPI検索テーブルのエントリが全て登録済みの場合の処理については後述する。そしてCPU16は、CPUのフィルタ・SPI検索テーブルに登録したSPIエントリのエントリ番号と、パケット通過制御回路のフィルタ・SPI検索テーブルに登録したパケット通過制御回路用SPIエントリのエントリ番号の対応を記憶しておく。またUsedカウンタをクリアする。このUsedカウンタについては後述する。そして、CPU16は登録したSPIエントリの有効期間を計測するタイマ(SPIエントリ有効タイマ)を起動する(ステップS993)。このタイマの動作については後述する。
Next, the
図28はエントリ番号対応管理テーブルを示す図である。
上述した各SPIエントリ登録処理において、CPUのフィルタ・SPI検索テーブルに登録したSPIエントリのエントリ番号と、パケット通過制御回路のフィルタ・SPI検索テーブルに登録したパケット通過制御回路用SPIエントリのエントリ番号の対応付けを、このエントリ番号対応管理テーブルにより行なう。そして、対応するエントリには、SPIエントリ有効タイマが対応付けられて登録される。このタイマはSPIエントリの有効期間を計測したタイマ値である。
FIG. 28 shows an entry number correspondence management table.
In each of the above SPI entry registration processes, the entry number of the SPI entry registered in the filter / SPI search table of the CPU and the entry number of the SPI entry for the packet passage control circuit registered in the filter / SPI search table of the packet passage control circuit Correlation is performed using this entry number correspondence management table. The corresponding entry is registered in association with the SPI entry valid timer. This timer is a timer value obtained by measuring the valid period of the SPI entry.
また上述のUsedカウンタについて説明する。
Usedカウンタとは各SPIエントリおよび各パケット通過制御回路用のSPIエントリについて、エントリが通過させたパケットの個数を計測した値である。CPU16とパケット通過制御回路のフィルタ・SPI検索テーブルのエントリごとにカウンタを設けておくか、あるいは、SPI管理テーブルのエントリ別に設ける。
The above-mentioned Used counter will be described.
The Used counter is a value obtained by measuring the number of packets passed through each SPI entry and SPI entry for each packet passage control circuit. A counter is provided for each entry in the filter / SPI search table of the
次に、SPIエントリ有効タイマの処理について説明する。
図29はSPIエントリ有効タイマの処理フローを示す図である。
まず、CPU16は、全SPIエントリ群[m]についてのSPIエントリ有効タイマの処理を実行完了すると(ステップS2901)、Usedカウンタ値を読み出す(ステップS2902)。これにより、SPIエントリ群[m]に属するSPIエントリが通過させたパケットの個数C[m]を取得する。次に、SPIエントリが使用されたか否かを判定する(ステップS2903)。つまり、SPIエントリ群[m]に属するSPIエントリが通過させたパケットの個数C[m]の値が前回読み出し時から変化していない場合は、SPIエントリ未使用と判定する。これ以外はSPIエントリが使用されたと判定する。
Next, processing of the SPI entry valid timer will be described.
FIG. 29 is a diagram showing a processing flow of the SPI entry valid timer.
First, when the
ここで、SPIエントリが未使用の場合には、SPIエントリ有効タイマを進める(ステップS2904)。つまりSPIエントリ有効タイマT[m]を−1する(ダウンカウンタの実装の場合)。そしてSPIエントリ有効タイマT[m]が満了か否かを判定し(ステップS2905)、満了である、つまり0となった場合、満了と判定する。(ダウンカウンタによる実装時であり、アップカウンタによる実装時は、Tmaxになった時満了とする)。そしてSPIエントリを削除する。つまりSPIエントリ群[m]に属するSPIエントリを、CPU16のフィルタ・SPI検索テーブルとパケット通過制御回路のフィルタ・SPI検索テーブルからそれぞれ削除する(ステップS2906)。
If the SPI entry is unused, the SPI entry valid timer is advanced (step S2904). That is, the SPI entry valid timer T [m] is decremented by 1 (in the case of down counter implementation). Then, it is determined whether or not the SPI entry valid timer T [m] has expired (step S2905). (It is a time of mounting with a down counter, and when it is mounted with an up counter, it expires when Tmax is reached). Then, the SPI entry is deleted. That is, the SPI entries belonging to the SPI entry group [m] are respectively deleted from the filter / SPI search table of the
またステップS2903においてSPIエントリが使用された場合には、SPIエントリ有効タイマを初期化する(ステップS2907)。つまりSPIエントリ有効タイマT[m]をTmaxに初期化する(ダウンカウンタによる実装時であり、アップカウンタ実装時は0に初期化する)。TmaxはSPIエントリ有効最大時間であり、この時間中にSPIエントリ群[m]に属するSPIエントリが通過させたパケットが無かった場合は、SPIエントリ群[m]が削除対象となる。そして一定時間twの経過を待ち(ステップS2908)、ステップS2901から処理を繰り返す。 If an SPI entry is used in step S2903, an SPI entry valid timer is initialized (step S2907). That is, the SPI entry valid timer T [m] is initialized to Tmax (when mounted by a down counter, it is initialized to 0 when an up counter is mounted). Tmax is the SPI entry effective maximum time, and if there is no packet passed by the SPI entry belonging to the SPI entry group [m] during this time, the SPI entry group [m] is targeted for deletion. Then, the process waits for the elapse of a fixed time tw (step S2908) and repeats the processing from step S2901.
次に、上述のパケット通過制御回路用のSPIエントリ登録の処理について説明する。
図30はパケット通過制御回路用のSPIエントリ登録の処理フローを示す図である。
まず、CPU16はパケット通過制御回路用のSPIエントリ登録の最初に、パケット通過制御回路のフィルタリング記憶部14のデータ容量に空きがあり、パケット通過制御回路用のSPIエントリを登録できるか否かを判定する(ステップS3001)。そしてステップS3001においてNo(つまり空きがない場合には)、パケット通過制御回路用のSPIエントリが、パケット通過制御回路のフィルタ・SPI検索テーブルに登録されているか否かを確認する(ステップS3002)。そしてステップS3002でNoの場合には、削除可能SPIエントリの検索を行ない(ステップS3003)。そして削除可能SPIエントリがあるか否かを判定する(ステップS3004)。削除可能SPIエントリがなければ処理を終了、削除可能SPIエントリがあれば、削除可能SPIエントリを削除して(ステップS3005)、空きエントリに未登録のパケット通過制御回路用のSPIエントリを登録する(ステップS3006)。次に、パケット通過制御回路用のSPIエントリ全てを登録完了したか否かを判定し(ステップS3007)、登録完了していれば処理を終了、全てを登録していない場合には、ステップS3001からの処理を繰り返す。
Next, an SPI entry registration process for the above-described packet passage control circuit will be described.
FIG. 30 is a diagram showing a processing flow of SPI entry registration for the packet passage control circuit.
First, the
なお、ステップS3003の処理では、全てのSPIエントリ群[m]について、SPIエントリ有効タイマ[m]の値を読み出し、SPIエントリ未使用期間が最も長いSPIエントリ群(タイマをダウンカウンタで実装する場合はタイマ値が最も小さいSPIエントリ群、タイマをアップカウンタで実装する場合はタイマ値が最も大きいSPIエントリ群)を見つけ、削除可能SPIエントリとする。但し、未使用期間が閾値以下の場合は、削除可能SPIエントリとしないこととする。 In the process of step S3003, the value of the SPI entry valid timer [m] is read for all SPI entry groups [m], and the SPI entry group with the longest SPI entry unused period (when the timer is implemented by a down counter) Finds the SPI entry group having the smallest timer value, or the SPI entry group having the largest timer value when the timer is implemented by an up-counter, and sets it as a deleteable SPI entry. However, if the unused period is less than or equal to the threshold, it is not considered as a deleteable SPI entry.
またステップS3001で登録可能であるならば、ステップS3006とステップS3007の処理を行なう。また、ステップS3002において、パケット通過制御回路用のSPIエントリが、パケット通過制御回路のフィルタ・SPI検索テーブルに登録されている場合には、最低優先度として全パケットをCPU転送するCPU処理用エントリが登録されているか否かを判定し(ステップS3008)、なければCPU処理用エントリを登録して(ステップS3009)、CPU処理用エントリ以外の、最低優先度のフィルタエントリを削除して(ステップS3010)、ステップS3006、ステップS3007の処理を行なう。 If registration is possible in step S3001, processing in steps S3006 and S3007 is performed. In step S3002, if the SPI entry for the packet passage control circuit is registered in the filter / SPI search table of the packet passage control circuit, the CPU processing entry for transferring all packets to the CPU as the lowest priority is displayed. It is determined whether it is registered (step S3008). If not, a CPU processing entry is registered (step S3009), and the lowest priority filter entry other than the CPU processing entry is deleted (step S3010). Steps S3006 and S3007 are performed.
次にパケット通過制御装置における処理部全体にわたる一連の処理について説明する。
図31はパケット通過制御装置における処理フローを示す第1の図である。
この図では受信パケットがTCPである場合の第1の例についての処理フローを示している。
まず、LAN側のI/F12でTCPセッション開始パケット(TCPのSYNパケット)を受信すると(ステップS3101)、TCPセッション開始パケットがパケット通過制御回路に転送される。パケット通過制御回路では、フィルタリング処理部13がフィルタリング記憶部14に格納されているフィルタ・SPI検索テーブルのエントリに適合すると判定し、またCPU転送すると判定する(ステップS3102)。そして、TCPセッション開始パケットをCPU16に転送する。CPU16では受信パケットの転送先がWAN側のI/F11であると判定し、またフィルタエントリにより通過と判定し、またこれによりSPIエントリ登録パケットであると判定する(ステップS3103)。そしてCPU16は、回路用SPIエントリをフィルタリング記憶部14の回路用のフィルタ・SPI検索テーブルに登録し(ステップS3104)、またWAN側のI/F11への転送の指示し、パケット通過制御回路にTCPセッション開始パケットを転送する(ステップS3105)。パケット通過制御回路においてはフィルタリング処理部13が、CPU16の指示に従い、WAN側のI/F11にパケットを転送し(ステップS3106)、パケットの宛先アドレスに送信する。
Next, a series of processes over the entire processing unit in the packet passing control device will be described.
FIG. 31 is a first diagram illustrating a processing flow in the packet passage control apparatus.
This figure shows the processing flow for the first example when the received packet is TCP.
First, when the TCP session start packet (TCP SYN packet) is received by the I /
次に、パケットで示されるあて先と送信元との間において、TCPセッションのパケット(FIN/RST以外のパケット)が送受信される。その間に接続されているパケット通過制御装置においては、WAN側I/F11から受信したパケットをパケット通過制御回路のフィルタリング処理部13がLAN側I/F12へ転送して送信元へ送出し(ステップS3107)、またLAN側I/F12で送信元から受信したパケットをフィルタリング処理部13がWAN側I/F11へ転送して送信先へ宛先へ送出する(ステップS3108)。
Next, a TCP session packet (a packet other than FIN / RST) is transmitted and received between the destination indicated by the packet and the transmission source. In the packet passing control device connected in the meantime, the
そして、LAN側I/F12においてTCPセッション終了パケット(TCPのFIN/RSTパケット)を受信すると(ステップS3109)、パケット通過制御回路のフィルタリング処理部13は回路用フィルタエントリに適合しておりまた、CPU転送であると判定する(ステップS3110)。そして、TCPセッション終了パケットがCPU16に転送され、CPU16が、転送先がWAN側I/Fであるという判定と、フィルタエントリが通過であるという判定と、SPIエントリの削除パケットであるという判定を行なう(ステップS3111)。そして、SPIエントリ削除パケットの片方向転送済み(LAN側→WAN側へのパケット)を記録(SPIエントリ番号と転送済み方向を記録)し、TCPセッション終了パケットをWAN側I/F11へ指示する(ステップS3112)。するとパケット通過制御回路のフィルタリング処理部13は、CPUの指示に従い、WAN側I/F11にTCPセッション終了パケットを転送し(ステップS3113)、WAN側I/F11があて先へ送出する。
When the TCP session end packet (TCP FIN / RST packet) is received at the LAN side I / F 12 (step S3109), the
また、あて先からのTCPセッション終了パケット(TCPのFIN/RSTパケット)をWAN側I/F11で受信すると(ステップS3114)、パケット通過制御回路のフィルタリング処理部13は、そのパケットが回路用SPIエントリに適合しておりCPU転送するパケットであると判定する(ステップS3115)。そして、TCPセッション終了のパケットをCPU16に転送する。するとCPU16は、転送先がLAN側I/F12であるという判定と、フィルタエントリにおいて通過を示しているという判定と、SPIエントリ削除パケットであるという判定とを行い(ステップS3116)、SPIエントリ削除パケットのWAN側→LAN側、LAN側→WAN側の双方のパケットが転送されたと判定する(ステップS3117)。そしてCPU16は回路用のSPIエントリを削除し(ステップS3118)、パケット通過制御回路のフィルタリング処理部13に、TCPセッション終了パケットをLAN側I/F12へ転送するよう指示する(ステップS3119)。そして、パケット通過制御回路のフィルタリング処理部13は、CPU16の指示に従い、LAN側I/F12にTCPセッション終了パケットを転送し(ステップS3120)、LAN側I/F12が送信元へ送出する。以上によりパケット通過制御装置におけるTCPパケットの転送処理が終了する。
When the WAN session I / F 11 receives a TCP session end packet (TCP FIN / RST packet) from the destination (step S3114), the
図32はパケット通過制御装置における処理フローを示す第2の図である。
この図では受信パケットがTCPである場合の第2の例についての処理フローを示している。この第2の例は、タイマによりSPIエントリを削除する方法である。
まず、LAN側のI/F12でTCPセッション開始パケット(TCPのSYNパケット)を受信すると(ステップS3201)、TCPセッション開始パケットがパケット通過制御回路に転送される。パケット通過制御回路では、フィルタリング処理部13がフィルタリング記憶部14に格納されているフィルタ・SPI検索テーブルのエントリに適合するという判定と、CPU転送すると判定する(ステップS3202)。そして、TCPセッション開始パケットをCPU16に転送する。CPU16では受信パケットの転送先がWAN側のI/F11であると判定し、またフィルタエントリにより通過と判定し、またこれによりSPIエントリ登録パケットであると判定する(ステップS3203)。そしてCPU16は、回路用SPIエントリをフィルタリング記憶部14の回路用のフィルタ・SPI検索テーブルに登録し(ステップS3204)、またWAN側のI/F11への転送の指示し、パケット通過制御回路にTCPセッション開始パケットを転送する(ステップS3205)。パケット通過制御回路においてはフィルタリング処理部13が、CPU16の指示に従い、WAN側のI/F11にパケットを転送し(ステップS3206)、パケットの宛先アドレスに送信する。
FIG. 32 is a second diagram showing a processing flow in the packet passage control apparatus.
This figure shows the processing flow for the second example when the received packet is TCP. This second example is a method of deleting an SPI entry by a timer.
First, when a TCP session start packet (TCP SYN packet) is received by the LAN-side I / F 12 (step S3201), the TCP session start packet is transferred to the packet passage control circuit. In the packet passage control circuit, it is determined that the
次に、パケットのあて先とパケットの送信元との間において、TCPセッションのパケット(FIN/RST以外のパケット)が送受信される。その間に接続されているパケット通過制御装置においては、WAN側I/F11から受信したパケットをパケット通過制御回路のフィルタリング処理部13がLAN側I/F12へ転送して送信元へ送出し(ステップS3207)、またLAN側I/F12で送信元から受信したTCPセッションのパケット(FIN/RST以外のパケット)をフィルタリング処理部13がWAN側I/F11へ転送して送信先へ宛先へ送出する(ステップS3208)。
Next, a TCP session packet (a packet other than FIN / RST) is transmitted and received between the packet destination and the packet transmission source. In the packet passing control apparatus connected in the meantime, the
そして、LAN側I/F12においてTCPセッション終了パケット(TCPのFIN/RSTパケット)を受信すると(ステップS3209)、パケット通過制御回路のフィルタリング処理部13は回路用フィルタエントリに適合しておりまた、CPU転送であると判定する(ステップS3210)。そして、TCPセッション終了パケットをCPU16に転送し、CPU16が転送先がWAN側I/Fであるという判定と、フィルタエントリが通過であるという判定と、SPIエントリの削除パケットであると判定を行なう(ステップS3211)。そしてCPU16はTCPのSPIエントリ削除パケットの転送保護タイマを起動する(ステップS3212)。そして、WAN側I/F11への転送をパケット通過制御回路へ指示する(ステップS3213)。するとパケット通過制御回路のフィルタリング処理部13は、CPUの指示に従い、WAN側I/F11にTCPセッション終了パケットを転送し(ステップS3214)、WAN側I/F11があて先へ送出する。
When the LAN side I /
また、あて先からのTCPセッション終了パケット(TCPのFIN/RSTパケット)をWAN側I/F11で受信すると(ステップS3215)、パケット通過制御回路のフィルタリング処理部13は、そのパケットについて、回路用SPIエントリに適合していると判定しLAN側I/F12へ転送する(ステップS3216)。そして、CPU16ではステップS3212で起動したタイマの満了を検出し(ステップS3217)により、SPIエントリ削除をする(ステップS3218)。
When the WAN session I / F 11 receives a TCP session end packet (TCP FIN / RST packet) from the destination (step S3215), the
図33はパケット通過制御装置における処理フローを示す第3の図である。
この図では受信パケットがUDPである場合の例についての処理フローを示している。
まず、LAN側のI/F12でUDPのパケットPを受信すると(ステップS3301)、当該パケットPがパケット通過制御回路に転送される。パケット通過制御回路では、フィルタリング処理部13がフィルタリング記憶部14に格納されているフィルタ・SPI検索テーブルのエントリに適合するという判定と、CPU転送すると判定する(ステップS3302)。そして、パケットPをCPU16に転送する。CPU16では受信パケットPの転送先がWAN側のI/F11であると判定し、またフィルタエントリにより通過と判定し、またこれによりSPIエントリ登録パケットであると判定する(ステップS3303)。そしてCPU16は、回路用SPIエントリをフィルタリング記憶部14の回路用のフィルタ・SPI検索テーブルに登録し(ステップS3304)、またWAN側のI/F11への転送の指示し、パケット通過制御回路にパケットPを転送する(ステップS3305)。またこの時CPU16は、SIエントリ有効タイマの初期化を行なう(ステップS3306)。パケット通過制御回路においてはフィルタリング処理部13が、CPU16の指示に従い、WAN側のI/F11にパケットPを転送し(ステップS3307)、パケットのあて先へ送出する。
FIG. 33 is a third diagram showing a processing flow in the packet passage control apparatus.
This figure shows the processing flow for an example in which the received packet is UDP.
First, when a UDP packet P is received by the I /
次に、パケットのあて先とパケットの送信元との間において、パケットx〜zが送受信される。その間に接続されているパケット通過制御装置においては、WAN側I/F11から受信したパケットxをパケット通過制御回路のフィルタリング処理部13がLAN側I/F12へ転送して送信元へ送出し(ステップS3308)、またLAN側I/F12で送信元から受信したパケットyをフィルタリング処理部13がWAN側I/F11へ転送して送信先へ宛先へ送出し(ステップS3309)、またWAN側I/F11から受信したパケットzをパケット通過制御回路のフィルタリング処理部13がLAN側I/F12へ転送して送信元へ送出する(ステップS3310)。このステップS3308〜S3310間に、フィルタリング処理部13は、SPIエントリの利用をCPU16に通知する。CPU16ではSPIエントリ有効タイマ処理に基づき、Usedカウンタ値を読み出し、SPIエントリが使用中であるのでタイマを初期化する処理を行なう(ステップS3311)。またSPIエントリ有効タイマ処理に基づき、Usedカウンタ値を読み出し、SPIエントリが未使用である場合にはタイマを更新する(ステップS3312)。そしてSPIエントリ有効タイマ満了を検出すると(ステップS3313)、SPIエントリを削除する(ステップS3314)。
Next, packets x to z are transmitted and received between the packet destination and the packet transmission source. In the packet passing control apparatus connected in the meantime, the packet
図34はパケット通過制御装置における処理フローを示す第4の図である。
この図では受信パケットがICMPである場合の例についての処理フローを示している。
まず、LAN側のI/F12でICMPのパケット(エコー要求メッセージ、タイプ=8、コード=0)を受信すると(ステップS3401)、当該パケットのエコー要求メッセージがパケット通過制御回路に転送される。パケット通過制御回路では、フィルタリング処理部13がフィルタリング記憶部14に格納されているフィルタ・SPI検索テーブルのエントリに適合するという判定を行い、CPU転送すると判定する(ステップS3402)。そして、エコー要求メッセージをCPU16に転送する。CPU16ではエコー要求メッセージの転送先がWAN側のI/F11であると判定し、またフィルタエントリにより通過と判定し、またこれによりSPIエントリ登録パケットであると判定する(ステップS3403)。そしてCPU16は、回路用SPIエントリをフィルタリング記憶部14の回路用のフィルタ・SPI検索テーブルに登録し(ステップS3404)、またWAN側のI/F11への転送の指示し、パケット通過制御回路にエコー要求メッセージを転送する(ステップS3405)。パケット通過制御回路においてはフィルタリング処理部13が、CPU16の指示に従い、WAN側のI/F11にエコー要求メッセージを転送し(ステップS3406)、パケットのあて先へ送出する。
FIG. 34 is a fourth diagram showing a processing flow in the packet passage control apparatus.
This figure shows a processing flow for an example in which the received packet is ICMP.
First, when an ICMP packet (echo request message, type = 8, code = 0) is received by the I /
次に、逆方向のICMPパケット(TCPのFIN/RSTパケット)をWAN側I/F11で受信すると、エコー応答メッセージがパケット通過制御回路に転送され、フィルタリング処理部13は、そのパケットについて、回路用SPIエントリに適合していると判定し、また当該パケットがCPU転送であると判定する(ステップS3407)。そしてエコー応答メッセージをCPU16に転送する。CPU16ではLAN側I/F12へ転送するという判定と、フィルタエントリにより通過させるという判定と、SPIエントリ削除パケットであるという判定を行い(ステップS3408)、SPIエントリを削除する(ステップS3409)。そして、WAN側I/F11への転送をパケット通過制御回路に指示し、エコー応答メッセージを転送する(ステップS3410)。するとパケット通過制御回路のフィルタリング処理部13は、CPU16の指示に従いLAN側I/Fにエコー応答メッセージを転送し(ステップS3411)、送信元に送出する。
Next, when the backward ICMP packet (TCP FIN / RST packet) is received by the WAN-side I / F 11, an echo response message is transferred to the packet passing control circuit, and the
以上、本発明の実施形態について説明したが、なお上述の上述したCPUにおける処理の過程は、プログラムの形式でコンピュータ読み取り可能な記録媒体に記憶されており、このプログラムをコンピュータが読み出して実行することによって、行われる。ここでコンピュータ読み取り可能な記録媒体とは、磁気ディスク、光磁気ディスク、CD−ROM、DVD−ROM、半導体メモリ等をいう。また、このコンピュータプログラムを通信回線によってコンピュータに配信し、この配信を受けたコンピュータが当該プログラムを実行するようにしても良い。 Although the embodiment of the present invention has been described above, the process of the above-described CPU is stored in a computer-readable recording medium in the form of a program, and the computer reads and executes this program. Is done by. Here, the computer-readable recording medium means a magnetic disk, a magneto-optical disk, a CD-ROM, a DVD-ROM, a semiconductor memory, or the like. Alternatively, the computer program may be distributed to the computer via a communication line, and the computer that has received the distribution may execute the program.
1・・・パケット通過制御装置
11・・・I/F(WAN)
12・・・I/F(LAN)
13・・・フィルタリング処理部
14・・・フィルタリング記憶部
15・・・CPU/IF
16・・・CPU
17・・・テーブル記憶部
DESCRIPTION OF
12 ... I / F (LAN)
13 ...
16 ... CPU
17 ... Table storage section
Claims (10)
前記パケットの通過許可、廃棄の何れかの制御種別と、前記パケットのフィルタ規則適合判定条件を示す通信種別と、を示す第1フィルタリング情報を保持するフィルタリングテーブルから、該第1フィルタリングを読み取って、当該第1フィルタリングが前記通過許可を示す場合には中央演算処理転送の情報に書き換えて、前記パケット通過制御部のフィルタリング記憶部へ登録する、前記中央演算処理部の第1フィルタリング登録手段と、
パケットを受信した際に、当該パケットの通信種別と制御種別が、前記フィルタリング記憶部に登録されている前記第1フィルタリングに一致する場合に、その受信したパケットの少なくとも通信種別を前記中央演算処理部へ転送する、前記パケット通過制御部の中央演算処理部転送手段と、
前記受信したパケットの、前記一方の通信ネットワーク経路から前記他方の通信ネットワーク経路への通過、および前記他方の通信ネットワーク経路から前記一方の通信ネットワーク経路への通過、の両方の通過許可を示す第2フィルタリング情報それぞれを、前記第1フィルタリング情報よりフィルタ規則の優先度の高い情報として優先的に前記フィルタリング記憶部に登録する、前記中央演算処理部の第2フィルタリング情報登録手段と、
前記受信したパケットに関連する一連のパケット処理について、前記フィルタリング記憶部に登録された前記第2フィルタリング情報に一致するか否かを前記優先度順に判定し、一致している場合には前記中央演算処理部を介さずに通過処理を行なう、前記パケット通過制御部の通過処理手段と、
を備えることを特徴とするパケット通過制御装置。 A packet passage control device comprising a central processing unit and a packet passage control unit, for controlling whether or not a packet received from one communication network path is passed to the other communication network path,
Reading the first filtering from a filtering table that holds first filtering information indicating a control type of either permission or discard of the packet and a communication type indicating a filter rule conformity determination condition of the packet; When the first filtering indicates the passage permission, the first filtering registration unit of the central processing unit rewrites the information of central processing transfer and registers it in the filtering storage unit of the packet passage control unit;
When a packet is received, if the communication type and control type of the packet match the first filtering registered in the filtering storage unit, at least the communication type of the received packet is set to the central processing unit. A central processing unit transfer means of the packet passage control unit,
A second indicating permission to pass both the passage of the received packet from the one communication network path to the other communication network path and the passage from the other communication network path to the one communication network path; A second filtering information registration unit of the central processing unit that preferentially registers each filtering information in the filtering storage unit as information having a higher priority of a filter rule than the first filtering information;
For a series of packet processing related to the received packet, it is determined in order of priority whether or not the second filtering information registered in the filtering storage unit is matched. Passing processing means of the packet passing control unit, which performs passing processing without going through the processing unit;
A packet passage control device comprising:
前記受信したパケットに関連する一連のパケット処理で受信した最終パケットを、前記中央演算処理部へ転送し、
前記中央演算処理部が、
前記最終パケットを受付けることにより、前記第2フィルタリング情報を前記フィルタリング記憶部より削除する第2フィルタリング削除手段を備える
ことを特徴とする請求項1に記載のパケット通過制御装置。 The central processing unit transfer means,
The final packet received in a series of packet processing related to the received packet is transferred to the central processing unit,
The central processing unit is
The packet passing control device according to claim 1, further comprising: a second filtering deleting unit that deletes the second filtering information from the filtering storage unit by receiving the final packet.
前記経過時間が所定時間となった場合に、前記第2フィルタリング情報を前記フィルタリング記憶部より削除する第2フィルタリング削除手段と、
を備えることを特徴とする請求項1に記載のパケット通過制御装置。 Time measuring means for measuring an elapsed time from the reception time of the last packet that matches the second filtering information registered in the filtering storage unit;
A second filtering deleting means for deleting the second filtering information from the filtering storage unit when the elapsed time becomes a predetermined time;
The packet passage control device according to claim 1, further comprising:
前記フィルタリング記憶部で記憶している前記第1のフィルタリング情報のうち優先度の低い情報から順に削除するフィルタリング調整手段と、
を備えることを特徴とする請求項1から請求項3の何れかに記載のパケット通過制御装置。 When the amount of information composed of the second filtering information and the first filtering information exceeds the amount of information that can be stored in the filtering storage unit due to an increase in registration of the second filtering information in the filtering storage unit In addition, as the filtering information with the lowest priority, third filtering registration means for registering, in the filtering storage unit, third filtering information indicating a control type of central processing transfer for all communication types of packets,
Filtering adjustment means for deleting in order from low priority information among the first filtering information stored in the filtering storage unit;
The packet passage control device according to claim 1, further comprising:
前記フィルタリング記憶部への前記第2フィルタリング情報の登録が増加することにより、当該第2フィルタリング情報の情報量が、前記フィルタリング記憶部で記憶できる情報量を超えた場合に、前記フィルタリング記憶部で記憶している前記第2のフィルタリング情報のうち優先度の低い情報から順に削除する
ことを特徴とする請求項4に記載のパケット通過制御装置。 The filtering adjustment means is
When the information amount of the second filtering information exceeds the information amount that can be stored in the filtering storage unit due to an increase in registration of the second filtering information in the filtering storage unit, the filtering storage unit stores the information. The packet passing control device according to claim 4, wherein the second filtering information is deleted in order from low priority information.
前記中央演算処理部の第1フィルタリング登録手段が、前記パケットの通過許可、廃棄、中央演算処理転送の何れかの制御種別と、前記パケットの通信種別と、を示す第1フィルタリング情報を保持するフィルタリングテーブルから、該第1フィルタリングを読み取って、当該第1フィルタリングが前記通過許可を示す場合には中央演算処理転送の情報に書き換えて、前記パケット通過制御部のフィルタリング記憶部へ登録し、
前記パケット通過制御部の中央演算処理部転送手段が、パケットを受信した際に、当該パケットの通信種別と制御種別が、前記フィルタリング記憶部に登録されている前記第1フィルタリングに一致する場合に、その受信したパケットの少なくとも通信種別を前記中央演算処理部へ転送し、
前記中央演算処理部の第2フィルタリング情報登録手段が、前記受信したパケットの、前記一方の通信ネットワーク経路から前記他方の通信ネットワーク経路への通過、および前記他方の通信ネットワーク経路から前記一方の通信ネットワーク経路への通過、の両方の通過許可を示す第2フィルタリング情報それぞれを、前記第1フィルタリング情報より優先度の高い情報として優先的に前記フィルタリング記憶部に登録し、
前記パケット通過制御部の通過処理手段が、前記受信したパケットに関連する一連のパケット処理について、前記フィルタリング記憶部に登録された前記第2フィルタリング情報に一致するか否かを前記優先度順に判定し、一致している場合には前記中央演算処理部を介さずに通過処理を行なう
ことを特徴とするパケット通過制御方法。 A packet passage control method in a packet passage control apparatus, comprising a central processing unit and a packet passage control unit, for controlling whether or not a packet received from one communication network path is passed to the other communication network path,
Filtering in which the first filtering registration unit of the central processing unit holds first filtering information indicating a control type of any one of the packet permission, discard, and central processing transfer and the communication type of the packet Read the first filtering from the table, if the first filtering indicates the passage permission, rewrite the information in the central processing transfer, register in the filtering storage unit of the packet passage control unit,
When the central processing unit transfer means of the packet passage control unit receives a packet, when the communication type and control type of the packet match the first filtering registered in the filtering storage unit, Transfer at least the communication type of the received packet to the central processing unit,
The second filtering information registering means of the central processing unit passes the received packet from the one communication network path to the other communication network path, and from the other communication network path to the one communication network. Each of the second filtering information indicating both passage permission to the route, and preferentially registered in the filtering storage unit as information having a higher priority than the first filtering information,
The passage processing means of the packet passage control unit determines, in order of priority, whether or not the series of packet processing related to the received packet matches the second filtering information registered in the filtering storage unit. If they match, the packet passing control method performs the passing process without going through the central processing unit.
前記受信したパケットに関連する一連のパケット処理で受信した最終パケットを、前記中央演算処理部へ転送し、
前記中央演算処理部の第2フィルタリング削除手段が、
前記最終パケットを受付けることにより、前記第2フィルタリング情報を前記フィルタリング記憶部より削除する
ことを特徴とする請求項6に記載のパケット通過制御方法。 The central processing unit transfer means of the packet passage control unit,
The final packet received in a series of packet processing related to the received packet is transferred to the central processing unit,
The second filtering deletion means of the central processing unit is
The packet passing control method according to claim 6, wherein the second filtering information is deleted from the filtering storage unit by receiving the final packet.
前記中央演算処理部の第2フィルタリング削除手段が、前記経過時間が所定時間となった場合に、前記第2フィルタリング情報を前記フィルタリング記憶部より削除する
ことを特徴とする請求項6に記載のパケット通過制御方法。 The time measuring means measures an elapsed time from the reception time of the last packet that matches the second filtering information registered in the filtering storage unit,
The packet according to claim 6, wherein the second filtering deletion unit of the central processing unit deletes the second filtering information from the filtering storage unit when the elapsed time reaches a predetermined time. Passing control method.
フィルタリング調整手段が、前記フィルタリング記憶部で記憶している前記第1のフィルタリング情報のうち優先度の低い情報から順に削除する
ことを特徴とする請求項6から請求項8の何れかに記載のパケット通過制御方法。 The third filtering registration unit stores the amount of information including the second filtering information and the first filtering information in the filtering storage unit by increasing the registration of the second filtering information in the filtering storage unit. When the amount of information that can be exceeded, the third filtering information indicating the control type of the central processing transfer is registered in the filtering storage unit as the filtering information with the lowest priority for all communication type packets,
The packet according to any one of claims 6 to 8, wherein the filtering adjustment unit deletes the first filtering information stored in the filtering storage unit in order from information having a lower priority. Passing control method.
前記フィルタリング記憶部への前記第2フィルタリング情報の登録が増加することにより、当該第2フィルタリング情報の情報量が、前記フィルタリング記憶部で記憶できる情報量を超えた場合に、前記フィルタリング記憶部で記憶している前記第2のフィルタリング情報のうち優先度の低い情報から順に削除する
ことを特徴とする請求項9に記載のパケット通過制御方法。
The filtering adjustment means is
When the information amount of the second filtering information exceeds the information amount that can be stored in the filtering storage unit due to an increase in registration of the second filtering information in the filtering storage unit, the filtering storage unit stores the information. The packet passing control method according to claim 9, wherein the second filtering information is deleted in order from low priority information.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006036773A JP4137948B2 (en) | 2006-02-14 | 2006-02-14 | Packet passage control apparatus and packet passage control method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006036773A JP4137948B2 (en) | 2006-02-14 | 2006-02-14 | Packet passage control apparatus and packet passage control method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2007221240A JP2007221240A (en) | 2007-08-30 |
| JP4137948B2 true JP4137948B2 (en) | 2008-08-20 |
Family
ID=38498076
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2006036773A Expired - Lifetime JP4137948B2 (en) | 2006-02-14 | 2006-02-14 | Packet passage control apparatus and packet passage control method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4137948B2 (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5153480B2 (en) * | 2008-06-27 | 2013-02-27 | 三菱電機株式会社 | Gateway device and packet filtering method |
| JP5088830B2 (en) * | 2008-10-30 | 2012-12-05 | 岩崎通信機株式会社 | Packet passing control method |
| JP5389193B2 (en) * | 2010-02-04 | 2014-01-15 | 日本電信電話株式会社 | Packet transfer processing apparatus, method and program |
| CN103220225B (en) * | 2012-05-21 | 2015-07-08 | 华为技术有限公司 | Message processing method, device and system |
| US20150261721A1 (en) * | 2014-03-13 | 2015-09-17 | Lantiq Deutschland Gmbh | Flow control between processing devices |
| US11575652B2 (en) * | 2020-12-18 | 2023-02-07 | BlackBear (Taiwan) Industrial Networking Security Ltd. | Communication system and communication method for one-way transmission |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3593762B2 (en) * | 1995-11-08 | 2004-11-24 | 富士通株式会社 | Relay device |
| JP2001045061A (en) * | 1999-08-02 | 2001-02-16 | Hitachi Ltd | Communication node device |
| US6816455B2 (en) * | 2001-05-09 | 2004-11-09 | Telecom Italia S.P.A. | Dynamic packet filter utilizing session tracking |
| JP2003333084A (en) * | 2002-05-09 | 2003-11-21 | Matsushita Electric Ind Co Ltd | Packet filtering rule setting method |
| JP2004297775A (en) * | 2003-03-12 | 2004-10-21 | Matsushita Electric Ind Co Ltd | Packet relay device |
| JP4099124B2 (en) * | 2003-08-28 | 2008-06-11 | 松下電器産業株式会社 | Packet transfer apparatus and packet transfer method |
| US7443856B2 (en) * | 2004-01-14 | 2008-10-28 | Lucent Technologies Inc. | Managing processing utilization in a network node |
-
2006
- 2006-02-14 JP JP2006036773A patent/JP4137948B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2007221240A (en) | 2007-08-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8601567B2 (en) | Firewall for tunneled IPv6 traffic | |
| US7073196B1 (en) | Firewall for processing a connectionless network packet | |
| TWI378704B (en) | Method and apparatus for datastream analysis and blocking | |
| CA2464784A1 (en) | Multi-layered firewall architecture | |
| CN103023914B (en) | Firewall system and implementation method thereof | |
| EP2509262B1 (en) | Unaddressed device communication from within an MPLS network | |
| JP2007533172A (en) | Virtual private network with fake server | |
| US20180191681A1 (en) | Facilitating enforcement of security policies by and on behalf of a perimeter network security device by providing enhanced visibility into interior traffic flows | |
| JP2009510815A (en) | Method and system for reassembling packets before search | |
| CN108881328B (en) | Data packet filtering method and device, gateway equipment and storage medium | |
| JP4137948B2 (en) | Packet passage control apparatus and packet passage control method | |
| US20160277293A1 (en) | Application-based network packet forwarding | |
| US7519004B1 (en) | Loopback testing of a network interface device from a user-space software layer | |
| CN111131539B (en) | Message forwarding method and device | |
| WO2023103891A1 (en) | Packet forwarding method and apparatus, and network system | |
| JP6184381B2 (en) | Method and apparatus for classifying encrypted data flows, computer program, and information storage means | |
| CN114356593A (en) | Data processing method, device, network device and medium | |
| CN116318801B (en) | SOHO router data modification method | |
| JP2007166514A (en) | Communication processing apparatus and communication processing method | |
| US11640366B1 (en) | Address decoder for a multi-chip system | |
| JP4472651B2 (en) | Network access system and network access method | |
| JP6542726B2 (en) | Attack determination device and attack determination method | |
| CN118316682B (en) | Data packet filtering methods, apparatus and equipment | |
| JP5088830B2 (en) | Packet passing control method | |
| KR100563825B1 (en) | High-performance proxy server capable of content analysis and packet processing using the same |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080515 |
|
| 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: 20080527 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080604 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4137948 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110613 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110613 Year of fee payment: 3 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110613 Year of fee payment: 3 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110613 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120613 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120613 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130613 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140613 Year of fee payment: 6 |
|
| 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 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| 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 |