JP2007005910A - Network processing apparatus - Google Patents
Network processing apparatus Download PDFInfo
- Publication number
- JP2007005910A JP2007005910A JP2005180880A JP2005180880A JP2007005910A JP 2007005910 A JP2007005910 A JP 2007005910A JP 2005180880 A JP2005180880 A JP 2005180880A JP 2005180880 A JP2005180880 A JP 2005180880A JP 2007005910 A JP2007005910 A JP 2007005910A
- Authority
- JP
- Japan
- Prior art keywords
- comparison
- data
- parameter
- entry
- network processing
- 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.)
- Withdrawn
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本発明は、インターネットなどのネットワークインタフェースを通じてパケットを受信処理する装置において、あらかじめ定めた条件を満たすパケットを転送あるいは廃棄するといったパケットフィルタ機能を備えるネットワーク処理装置に関する。 The present invention relates to a network processing apparatus having a packet filter function for transferring or discarding a packet that satisfies a predetermined condition in an apparatus for receiving and processing a packet through a network interface such as the Internet.
ネットワーク機器において、受信パケットヘッダの情報がある一定の条件を満足したときパケットを転送あるいは廃棄するパケットフィルタ機能が必要とされている。 In network equipment, there is a need for a packet filter function that forwards or discards a packet when information in a received packet header satisfies a certain condition.
従来のネットワーク処理装置は、パケットフィルタ条件を構成する各種情報の種別毎に該当情報を格納するエントリを備え、各エントリに格納された情報と入力パケットが有する該当種別の情報が一致する情報を保持しているエントリが存在するときに、この一致したエントリのアドレスを出力する第1の内容検索型メモリ(Content Addressable Memory : CAMとも記す)と、各種情報の集合からなるパケットフィルタ条件の代わりに、第1の内容検索型メモリの一致エントリアドレスの集合をパケットフィルタ条件として記憶し、複数の第1の内容検索型メモリからそれぞれ出力された一致エントリアドレスの集合がパケットフィルタ条件と一致したとき、一致信号を出力する第2の内容検索型メモリとすることでパケットフィルタとして動作する。 The conventional network processing apparatus has an entry for storing the corresponding information for each type of various information constituting the packet filter condition, and holds information in which the information stored in each entry matches the corresponding type of information included in the input packet. A first content searchable memory (also referred to as a Content Addressable Memory: CAM) that outputs the address of the matched entry when there is a matching entry, and a packet filter condition consisting of a set of various information, A set of matching entry addresses in the first content search type memory is stored as a packet filter condition, and when a set of matching entry addresses output from each of the plurality of first content search type memories matches the packet filter condition, a match is found. Operates as a packet filter by using a second content search memory that outputs signals .
このように、第1の内容検索型メモリによってパケットフィルタ条件を構成する各種情報の種別毎で検索を行い、第2の内容検索型メモリによって第1の内容検索型メモリからの一致エントリアドレスの集合がパケットフィルタ条件と一致するか否かを判定することにより、入力パケットの属性を判断することでパケットフィルタ動作が可能である。また、第1の内容検索型メモリの各々は同一の情報を重複して格納する必要が無く、フィルタリング装置を1つの内容検索型メモリで実現する場合に比べて、メモリ量を削減できる(例えば、特許文献1参照)。 In this way, a search is performed for each type of various information constituting the packet filter condition by the first content search type memory, and a set of matching entry addresses from the first content search type memory by the second content search type memory. The packet filtering operation is possible by determining the attribute of the input packet by determining whether or not matches the packet filter condition. Further, each of the first content search type memories does not need to store the same information repeatedly, and the amount of memory can be reduced as compared with the case where the filtering device is realized by one content search type memory (for example, Patent Document 1).
図12は、特許文献1に記載された従来のネットワーク処理装置の構成を示すものである。図12において、個別情報判定CAM501a〜501cが種別情報のエントリを検索して一致したエントリの格納アドレスを種別毎に出力し、出力した格納アドレスがレジスタ502に記憶され、フィルタ条件判定CAM503が、各種別情報の格納アドレスの集合を用いてフィルタリング条件の一致判定を行うようにしていた。
前記従来のネットワーク処理装置は、受信パケットの種別毎に内容検索型メモリ(CAM)を設けており、CAMのサイズを種別毎に取り得る最大値としておく必要があった。しかしながら、実際には、全ての種別にわたって最大値に相当するサイズが必要となる可能性は極めて低いので、使用効率が低下し大きなメモリが必要になるという事情を有していた。 The conventional network processing apparatus is provided with a content search type memory (CAM) for each type of received packet, and it is necessary to set the CAM size to the maximum value that can be taken for each type. However, in reality, the possibility that a size corresponding to the maximum value is required for all types is extremely low, and thus there is a situation that the use efficiency is reduced and a large memory is required.
本発明は、上記従来の事情に鑑みてなされたものであって、メモリの使用効率を低下させずに少ないメモリ量でパケットフィルタ機能を実現可能なネットワーク処理装置を提供することを目的としている。 The present invention has been made in view of the above-described conventional circumstances, and it is an object of the present invention to provide a network processing apparatus capable of realizing a packet filter function with a small amount of memory without reducing the use efficiency of the memory.
本発明のネットワーク処理装置は、到着パケットに含まれるIPアドレス等のパラメータと比較するための比較データを同一列に並べるエントリとし、前記比較データのエントリ先頭位置が前記パラメータの種別毎に同一行に並んだ形式で保持する比較データ参照メモリへのアクセス制御を行うアクセス制御手段と、前記比較データ参照メモリ上における、前記パラメータの種別毎のエントリ先頭位置を示す先頭アドレスを保持する先頭アドレス保持手段と、前記先頭アドレスが示す位置より前記比較データを読み出し、読み出した前記比較データと前記到着パケットより取り出したパラメータとの一致比較を行うデータ一致比較手段と、前記データ一致比較手段における比較結果を出力する比較結果出力手段と、前記比較結果出力手段から出力された比較結果の集合により表されるフィルタリング規則により、前記到着パケットの処理を判定するフィルタリング規則判定手段と、を備える。 The network processing apparatus of the present invention uses the comparison data for comparison with a parameter such as an IP address included in the arrival packet as an entry arranged in the same column, and the entry start position of the comparison data is on the same line for each parameter type. Access control means for controlling access to the comparison data reference memory held in a side-by-side format; and head address holding means for holding a head address indicating an entry head position for each type of the parameter on the comparison data reference memory; The comparison data is read from the position indicated by the head address, and the comparison result in the data match comparison means for comparing the read comparison data with the parameter extracted from the arrival packet is output. The comparison result output means and the comparison result output means The filtering rules represented by a set of comparison result, and a determining filtering rules determining means for processing the incoming packet.
上記構成によれば、複数のパラメータ種別の比較データを比較データ参照メモリの同一行に配置して未使用領域を比較データの保持に活用することができるため、メモリの使用効率を向上し、メモリ量を削減することができる。 According to the above configuration, the comparison data of a plurality of parameter types can be arranged in the same row of the comparison data reference memory, and the unused area can be utilized for holding the comparison data. The amount can be reduced.
また、本発明のネットワーク処理装置は、前記比較データ参照メモリより読み出したデータのうち有効なエントリを示す情報を保持する有効エントリ保持手段を備える。 The network processing apparatus of the present invention further includes valid entry holding means for holding information indicating a valid entry among the data read from the comparison data reference memory.
上記構成によれば、種別が異なる複数のパラメータの比較データとして同一の値が設定されていたとしても、有効エントリ保持手段が出力する有効エントリ情報により、必要なパラメータの比較データのみを比較対象とすることができるため、複数の異なるパラメータの比較データの値が同一の値を取っても一致比較を行うことができる。 According to the above configuration, even if the same value is set as the comparison data of a plurality of parameters of different types, only the comparison data of the necessary parameters is set as the comparison target by the valid entry information output by the valid entry holding means. Therefore, even when the comparison data values of a plurality of different parameters have the same value, a coincidence comparison can be performed.
また、本発明のネットワーク処理装置は、前記データ一致比較手段が、マスク情報を用いて前記エントリの一部をマスクして一致比較を行うものである。 In the network processing apparatus of the present invention, the data match comparison unit masks a part of the entry using mask information and performs a match comparison.
上記構成によれば、例えば、IPアドレスのネットワークアドレス部分のみについて一致比較を行うことができ、エントリ数を削減し、比較に要する時間を短縮することができる。 According to the above configuration, for example, it is possible to perform a coincidence comparison only on the network address portion of the IP address, thereby reducing the number of entries and shortening the time required for the comparison.
また、本発明のネットワーク処理装置は、前記データ一致比較手段が、データの範囲を指定して一致比較を行うものである。 In the network processing apparatus of the present invention, the data coincidence comparing means designates a data range and performs a coincidence comparison.
上記構成によれば、ポート番号等の範囲指定比較を行うことができ、最小値と最大値のみをテーブルに設定すればよいため、テーブルのエントリ数を節約することができる。 According to the above configuration, the range designation comparison of port numbers and the like can be performed, and only the minimum value and the maximum value need be set in the table, so the number of entries in the table can be saved.
さらに、本発明のネットワーク処理装置は、前記比較結果出力手段が、一致したエントリに対応する符号または一致したエントリを格納しているアドレスを、比較結果として出力するものである。 Further, in the network processing apparatus of the present invention, the comparison result output means outputs a code corresponding to the matched entry or an address storing the matched entry as a comparison result.
本発明によれば、複数のパラメータ種別の比較データを比較データ参照メモリの同一行に配置して未使用領域を比較データの保持に活用することができるため、メモリの使用効率を向上し、メモリ量を削減することができる。 According to the present invention, the comparison data of a plurality of parameter types can be arranged in the same row of the comparison data reference memory, and the unused area can be used for holding the comparison data. The amount can be reduced.
以下、本発明の実施の形態にかかるネットワーク処理装置について、図面を参照しながら説明する。 Hereinafter, a network processing apparatus according to an embodiment of the present invention will be described with reference to the drawings.
(実施の形態1)
図13は、本発明の実施の形態1におけるネットワーク処理装置を含むネットワークシステムの構成図である。本発明の実施の形態1におけるネットワーク処理装置1300は、ネットワークインタフェース1301よりパケットを入力し、パケットを分類して受信フレーム廃棄手段1302に対して一致比較結果を出力し、一致比較結果が廃棄指示を示す内容である場合、受信フレーム廃棄手段1302が受信フレームを廃棄して後段のアプリケーション処理装置1303に到達しないようにする。
(Embodiment 1)
FIG. 13 is a configuration diagram of a network system including the network processing device according to the first embodiment of the present invention. The
図1は、本発明の実施の形態1におけるネットワーク処理装置の構成図である。図1において、ネットワーク処理装置は、接続しているインターネット等のネットワークよりパケットを受信するネットワークインタフェース(ネットワークI/Fとも記す)101と、受信したパケットよりパラメータを抽出し、パラメータとパラメータ種別とパラメータサイズを出力するパラメータ抽出部102と、を備え、パラメータ比較部として、一致比較用に参照するための比較データを格納している比較データ参照メモリ103と、パラメータ抽出部102より受信したパラメータ種別に対応する比較データ集合の先頭位置情報を出力する先頭アドレス保持部104と、比較データ参照メモリ103より読み出した1行のデータのうち、パラメータ抽出部102より受信したパラメータ種別に対応する比較データエントリの位置を示す有効エントリ情報を保持する有効エントリ保持部105と、CPU及びデータ一致比較部107と比較データ参照メモリ103との間のアクセスを制御するアクセス制御部106と、受信したパケットより抽出したIPv4(Internet Protocol Version 4)アドレス等のパラメータと比較データ参照メモリ103より読み出した比較データエントリのバイト単位での一致比較を行うデータ一致比較部107と、データ一致比較部107のバイト単位の比較結果がパラメータ全てにわたって一致である場合に、一致したエントリに対応する符号を出力する一致符号出力部108と、を備え、各パラメータ値を変換した符号の集合を用いて表されるフィルタリング規則を保持するフィルタリング規則参照テーブル部109と、フィルタリング規則参照テーブル部109を参照することにより受信パケットを転送または廃棄するかを判定し、判定結果としてフィルタリングを実施することを意味する一致信号あるいは一致比較結果を出力するフィルタリング規則判定部110と、を備える。
FIG. 1 is a configuration diagram of a network processing apparatus according to
以上のように構成されたネットワーク処理装置について、図2及び図3を用いてその動作を説明する。図2は、本発明の実施の形態1におけるネットワーク処理装置の概略動作を示す流れ図である。図3は、本発明の実施の形態1におけるネットワーク処理装置のパラメータ比較動作を示す流れ図である。 The operation of the network processing apparatus configured as described above will be described with reference to FIGS. FIG. 2 is a flowchart showing a schematic operation of the network processing apparatus according to the first embodiment of the present invention. FIG. 3 is a flowchart showing the parameter comparison operation of the network processing apparatus according to the first embodiment of the present invention.
図2において、ネットワークI/F101がネットワークよりパケットを受信したかどうかを判定し(S201)、受信していない場合(S201のN)はパケット受信判定に戻る。一方、受信する(S201のY)と、パラメータ抽出部102は、受信パケットのヘッダ情報を参照して順番にパラメータを抽出し、宛先MACアドレスやIPv6(Internet Protocol Version 6)アドレス等のパラメータ種別を判定して出力し、パラメータのサイズを出力する(S202)。
In FIG. 2, it is determined whether or not the network I /
次に、パラメータ比較部は、受信パケットのヘッダ情報より抽出されたパラメータ、パラメータ種別、パラメータサイズを用いて、比較データ参照メモリ103が格納しているデータと一致比較を行い、パラメータの値を一致エントリに該当する一致符号に変換し(S203)、フィルタリング規則判定部110に出力する(S204)。パラメータ比較部の動作の詳細については図3で説明する。
Next, the parameter comparison unit performs a match comparison with the data stored in the comparison
フィルタリング規則判定部110は、パラメータ比較部の一致符号出力部108より一致符号を受信すると、該当するパラメータについてフィルタリング規則参照テーブル部109の検索を行い、検索結果を保持する(S205)。そして、パラメータが最後のパラメータであるかどうかを判定する(S206)。最後のパラメータでない場合にはS202に戻り(S206のN)、最後のパラメータである場合には(S206のY)検索したフィルタリング規則に該当する一致比較結果を出力し、処理を終了する(S207)。
When the matching rule is received from the matching
図3において、パラメータ比較部の動作の詳細について説明する。データ一致比較部107は、比較データ参照メモリ103のデータ読出し行を示すオフセット値を0に初期化する(S301)。先頭アドレス保持部104は、受信パケットのパラメータ種別より、比較データ参照メモリ103における同一種別のデータの先頭格納位置情報を出力する(S302)。
The details of the operation of the parameter comparison unit will be described with reference to FIG. The data
アクセス制御部106は、データの先頭格納アドレスにオフセットを加算した位置において比較用参照データを比較データ参照メモリ103より1行単位で読み出す(S303)。また、アクセス制御部106は、比較データ参照メモリ103より読み出したデータのうち、有効エントリ保持部105が示す位置のデータを取り出してデータ一致比較部107に出力する(S304)。
The
データ一致比較部107は、アクセス制御部106より受信した比較データエントリと受信したパケットのパラメータとのバイト単位での一致比較を行う(S305)。データ一致比較部107は、オフセット値を1増加する(S306)。そして、パラメータサイズよりパラメータの最後のバイトデータであるかどうかを確認する(S307)。最後のバイトデータでなければ(S307のN)、S303に戻り、最後のバイトデータであれば(S307のY)、一致符号出力部106が、パラメータの全バイトにわたる一致比較結果について全一致したエントリに該当する符号を出力し保持する(S308)。
The data
図4は、本実施の形態のネットワーク処理装置における比較データ参照メモリ103上のデータ配置例と一致比較動作を示す図である。
FIG. 4 is a diagram showing an example of data arrangement on the comparison
図4において、比較データ参照メモリ103上にIPv4アドレスとIPv6アドレスと宛先ポート番号が配置されている場合を例に示す。メモリ幅は4バイトであり、IPv4アドレスとIPv6アドレスと宛先ポート番号のそれぞれのエントリ数(保持数)は2である。IPv4アドレスとIPv6アドレスと宛先ポート番号を図に示すようにメモリの列方向に並べて設定する。比較データ参照メモリ103の比較データを設定するための領域は、どのパラメータ(例えば送信元ポート番号や宛先ポート番号等)が使用してもよい。図に示すように、IPv4アドレスとIPv6アドレスを同一行に並べて配置することにより、メモリの未使用領域を減らし、メモリの使用効率を向上させることができる。
In FIG. 4, a case where an IPv4 address, an IPv6 address, and a destination port number are arranged on the comparison
未使用領域が減る仕組みについては図6を参照して詳細に後述するが、同一行に配置しない場合、メモリの幅より少ないエントリ数となるパラメータの比較用データの隣の領域は使用されないため未使用領域となる。一方、同一行に配置する場合、メモリの幅より少ないエントリ数となるパラメータの比較用データの隣の領域に、別のパラメータの比較用データを配置するため、元々使用されていないメモリの領域を使用するようになり、未使用領域が減ることになる。 The mechanism for reducing the unused area will be described in detail later with reference to FIG. 6. However, if not arranged in the same row, the area adjacent to the parameter comparison data having the number of entries smaller than the memory width is not used. It becomes a use area. On the other hand, when arranging on the same line, in order to place the comparison data for another parameter in the area next to the parameter comparison data, which has a smaller number of entries than the width of the memory, the memory area not originally used is It will be used and unused area will be reduced.
パケットが到着するとパケットのヘッダ又はペイロードの情報(図の例ではIPv6アドレスの1バイト目)を取り出し、到着パケットのパラメータと同じ種類の情報のメモリ上の格納先頭位置を示す先頭アドレスよりデータ一致比較部107が持つオフセットn(図の例の場合IPv6アドレスの1バイト目であるのでオフセット0)の位置のデータをメモリより読み出し、読み出したデータのうち、情報種別毎に設けられた有効エントリレジスタ(図の例の場合IPv6アドレス用の有効エントリレジスタ)が示す位置のデータを取り出して(図の例の場合、右側の2バイト分のデータ)、受信パケットのヘッダ又はペイロードの情報(図の例の場合IPv6アドレスの1バイト目)とバイト単位での一致比較を行う。各パラメータの全バイトについて一致比較結果が全一致となるエントリに該当する符号を出力する。
When a packet arrives, the packet header or payload information (in the example shown, the first byte of the IPv6 address) is extracted, and the data match comparison is performed from the start address indicating the storage start position in the memory of the same type of information as the parameter of the arrival packet. The data at the position of offset n (offset 0 because it is the first byte of the IPv6 address in the case of the example) of the
図5は、パラメータ比較とフィルタリング規則検索の一連の動作を説明するための図である。宛先MACアドレス(以下、DMAC)を例に取り説明する。図の4011〜4016はDMACの6バイトのそれぞれについて、1、2,3,4の4つのエントリを示している。4017は、各エントリのパラメータ比較結果を表している。比較データ参照メモリ103に格納されているDMACの比較データエントリを1行単位で読み出してバイト単位で到着パケットのDMACと6バイトにわたって順に一致比較する。4つのエントリ1、2,3,4についてバイト毎に一致/不一致結果を表している。DMACの全バイトの一致比較完了後、6バイト分全て一致しているエントリに該当する符号として3(4017の上から3つ目)を出力する。一致符号3を用いて、フィルタリング規則参照テーブル109の検索を行い、該当するフィルタリング規則を検索する。図5ではDMACの場合について示したが、この一致比較を全パラメータ種別について行い、合致するフィルタリング規則を最終的に一致検索する。
FIG. 5 is a diagram for explaining a series of operations of parameter comparison and filtering rule search. A description will be given by taking a destination MAC address (hereinafter referred to as DMAC) as an example.
図6は、本実施の形態のネットワーク処理装置における比較データ参照メモリ103の効果を示す図である。
FIG. 6 is a diagram illustrating the effect of the comparison
図6において、比較データ参照メモリ103上に宛先MACアドレスと宛先IPv4アドレスとIPv6アドレスとProtocol番号とNext Headerと宛先ポート番号が配置されている場合を例に示す。単純にパラメータをメモリに配置しようとすると、図の左側に示すようになる。メモリの横幅がパラメータ中の最大エントリ数となるように配置するため、エントリ数が最大値より小さいパラメータを格納している部分に未使用領域が発生する。このような未使用領域を低減するために、図の右側に示すように異なるパラメータを横に並べて配置できるようにする。図の右側のようにパラメータを配置することにより、左側のメモリ量が30×4=120バイト必要であったところが、右側のメモリ量が18×4=72バイトに低減されている。
In FIG. 6, a case where a destination MAC address, a destination IPv4 address, an IPv6 address, a Protocol number, a Next Header, and a destination port number are arranged on the comparison
すなわち、左側の図では、宛先MACアドレス[1,1]より宛先ポート番号[2,1]までのバイト数30と、メモリ幅4が必要であるが、右側の図では、宛先MACアドレス[1,1]よりNext Header[1,1]までのバイト数18と、メモリ幅4で済む。したがって、左側の図では、120バイト分の領域が(未使用領域も含めて)占有されるのに対して、右側の図では、72バイト分の領域が占有されるだけで済む。
That is, in the figure on the left side, the number of bytes 30 from the destination MAC address [1,1] to the destination port number [2,1] and the
かかる構成によれば、パケット情報種別毎に個別に内容検索型メモリを設ける方式に比較して、複数の異なるパラメータ種別の比較データを比較データ参照メモリの同一行に配置することにより、従来の未使用領域を比較データの保持に活用することができるため、メモリの使用効率を向上し、メモリ量を削減できる。 According to such a configuration, compared to a method in which a content search type memory is provided for each packet information type, comparison data of a plurality of different parameter types is arranged in the same row of the comparison data reference memory, thereby reducing Since the used area can be used for holding comparison data, the memory use efficiency can be improved and the amount of memory can be reduced.
また、本実施の形態のネットワーク処理装置は、前記比較データ参照メモリ103より読み出したデータのうち有効なエントリを示す有効エントリ保持部105を備え、複数の異なるパラメータの比較データを比較データ参照メモリの未使用領域に詰めて配置することにより、複数の異なるパラメータの比較データとして同一の値が設定されていたとしても、有効エントリ保持手段が出力する有効エントリにより必要なパラメータの比較データのみを比較対象とすることができ、複数の異なるパラメータの比較データの値が同一の値を取っても一致比較を行うことができる。
In addition, the network processing apparatus according to the present embodiment includes a valid
なお、本実施の形態において、一致比較を行うパラメータがIPv6アドレスの場合で説明したが、本発明はこれに限定されることなく、IPv4アドレスであっても、あるいは、送信元MACアドレスや、Ethernet Typeなどでもよい。 In the present embodiment, the case where the parameter for matching comparison is an IPv6 address has been described. However, the present invention is not limited to this, and even an IPv4 address, a source MAC address, an Ethernet, Type may be used.
また、一致符号出力部108が符号を出力する代わりに、一致したエントリのアドレスを出力してもよい。また、パラメータ情報がヘッダ情報に限定されることなく、受信パケットのデータ本体であるペイロードから取り出される情報であってもよい。
Further, instead of the coincidence
(実施の形態2)
図7は、本発明の実施の形態2におけるネットワーク処理装置の構成図である。図7において、図1と同じ構成要素については同じ符号を用い、説明を省略する。
(Embodiment 2)
FIG. 7 is a configuration diagram of the network processing apparatus according to the second embodiment of the present invention. In FIG. 7, the same components as those in FIG.
図7において、マスク情報参照テーブル部711は、IPアドレス等の情報の一部をマスクして一致比較を行う、すなわち、情報の一部のビットもしくはバイトについてのみ一致比較を行うために使用するマスク情報を格納する。データ一致比較部707は、IPアドレス等の受信パケットの情報のうち、マスク情報が指定するビットもしくはバイトの部分を一致比較の対象から除外した上で、残りの部分のデータを用いて一致比較を行う。
In FIG. 7, the mask information
図8は、本発明の実施の形態2におけるネットワーク処理装置のパラメータ比較の動作を説明する流れ図である。 FIG. 8 is a flowchart for explaining the parameter comparison operation of the network processing apparatus according to the second embodiment of the present invention.
図8において、パラメータ比較部の動作の詳細について説明する。データ一致比較部107は、比較データ参照メモリ103のデータ読出し行を示すオフセット値を0に初期化する(S801)。先頭アドレス保持部104は、受信パケットのパラメータ種別より、比較データ参照メモリ103における同一種別のデータの先頭格納位置情報を出力する(S802)。アクセス制御部106は、データの先頭格納アドレスにオフセットを加算した位置において比較用参照データを比較データ参照メモリ103より1行単位で読み出す(S803)。また、アクセス制御部106は、比較データ参照メモリ103より読み出したデータのうち、有効エントリ保持部105が示す位置のデータを取り出してデータ一致比較部107に出力する(S804)。データ一致比較部107は、マスク情報をマスク情報参照テーブル711より読み出して、アクセス制御部106より受信した比較データエントリと受信したパケットのパラメータとのバイト単位でのマスク情報を用いた一致比較を行う(S805)。データ一致比較部107は、オフセット値を1増加する(S806)。そして、パラメータサイズ情報よりパラメータの最後のバイトデータであるかどうかを確認する(S807)。最後のバイトデータでなければ(S807のN)、S803に戻り、最後のバイトデータであれば(S807のY)、一致符号出力部106が、パラメータの全バイトに渡る一致比較結果について全一致したエントリに該当する符号を出力し保持する(S808)。
The details of the operation of the parameter comparison unit will be described with reference to FIG. The data
図9は、本実施の形態のネットワーク処理装置における比較データ参照メモリ103及びマスク情報参照テーブル711上のデータ配置例と一致比較動作を示す図である。
FIG. 9 is a diagram showing an example of data arrangement on the comparison
図9において、比較データ参照メモリ103上にIPv4アドレスとIPv6アドレスと宛先ポート番号が、マスク情報参照テーブル711上にIPv4アドレスとIPv6アドレスのマスク情報が配置されている場合を例に示す。メモリ幅は4バイトであり、IPv4アドレスとIPv6アドレスと宛先ポート番号のそれぞれのエントリ数は2である。IPv4アドレスとIPv6アドレスと宛先ポート番号を図に示すようにメモリの列方向に並べて設定する。比較データ参照メモリ103の比較データを設定するための領域は、どのパラメータ(例えば送信元ポート番号や宛先ポート番号等)が使用してもよい。図に示すように、IPv4アドレスとIPv6アドレスを同一行に並べて配置することにより、メモリの未使用領域を減らし、メモリの使用効率を向上させることができる。
FIG. 9 shows an example in which the IPv4 address, the IPv6 address, and the destination port number are arranged on the comparison
パケットが到着するとパケットのヘッダ又はペイロードの情報(図の例ではIPv6アドレスの1バイト目)を取り出し、到着パケットのヘッダ又はペイロードの情報と同じ種類の情報のメモリ上の格納先頭位置を示す先頭アドレスよりデータ一致比較部107が持つオフセットn(図の例の場合IPv6アドレスの1バイト目であるのでオフセット0)の位置のデータを比較データ参照メモリ103及びマスク情報参照テーブル711より読み出す。そして、読み出したデータのうち、情報種別毎に設けられた有効エントリレジスタ(図の例の場合IPv6アドレス用の有効エントリレジスタ)が示す位置のデータを取り出して(図の例の場合、右側の2バイト分)、受信パケットのヘッダ又はペイロードの情報(図の例の場合IPv6アドレスの1バイト目)とマスク情報を用いた一致比較を行い、一致エントリに該当する符号を出力する。
When the packet arrives, the packet header or payload information (in the example shown, the first byte of the IPv6 address) is extracted, and the start address indicating the storage start position in the memory of the same type of information as the header or payload information of the arrival packet Further, the data at the position of the offset n (offset 0 because it is the first byte of the IPv6 address in the case of the figure) held by the data match
かかる構成によれば、データ一致比較手段507がマスク情報を用いて固定長データの一部をマスクし、一致比較を行うことにより、例えば、IPアドレスのネットワークアドレス部分のみについて一致比較を行うことができ、比較に要する時間を短縮することができる。 According to this configuration, the data match comparison unit 507 masks a part of the fixed-length data using the mask information and performs a match comparison, for example, to perform a match comparison only for the network address portion of the IP address. And the time required for comparison can be shortened.
(実施の形態3)
図10は、本発明の実施の形態3におけるネットワーク処理装置の構成図である。図10において、図1と同じ構成要素については同じ符号を用い、説明を省略する。
(Embodiment 3)
FIG. 10 is a configuration diagram of the network processing apparatus according to the third embodiment of the present invention. 10, the same components as those in FIG. 1 are denoted by the same reference numerals, and description thereof is omitted.
図10において、範囲指定情報参照テーブル1011は、例えば、受信パケットを構成するレイヤの第4層で規定されるポート番号等の情報が、指定した最小値及び最大値の間に含まれているかどうかを比較し判定するために使用する範囲指定情報を格納する。データ一致比較部1007は、ポート番号等の受信パケットの情報が、範囲指定情報が指定する最小値と最大値の間に含まれるかどうかを比較し判定する。
In FIG. 10, the range designation information reference table 1011 includes, for example, whether information such as a port number defined in the fourth layer of the layer constituting the received packet is included between the designated minimum value and maximum value. Stores range specification information used to compare and determine The data match
図11は、本発明の実施の形態3におけるネットワーク処理装置のパラメータ比較の動作を説明する流れ図である。 FIG. 11 is a flowchart for explaining the parameter comparison operation of the network processing apparatus according to the third embodiment of the present invention.
図11において、パラメータ比較部の動作の詳細について説明する。比較データ参照メモリ103のデータ読出し行を示すオフセット値を0に初期化する(S1101)。先頭アドレス保持部104は、受信パケットのヘッダ情報の種別より、比較データ参照メモリ103における同一種別のデータの先頭格納位置情報を出力する(S1102)。アクセス制御部106は、データの先頭格納アドレスにオフセットを加算した位置において比較用参照データを比較データ参照メモリ103より1行単位で読み出す(S1103)。また、アクセス制御部106は、比較データ参照メモリ103より読み出したデータのうち、有効エントリ保持部105が示す位置の比較データエントリを取り出して一致比較部1007に出力する(S1104)。データ一致比較部1007は、範囲指定情報として最小値及び最大値を分割した値を範囲指定情報参照テーブル部1011より読み出し、これらのデータについて最小値及び最大値との一致比較を行なう。最小値より大きく最大値より小さければ、指定された範囲内にあると判定する。最小値より小さいかもしくは最大値より大きければ、指定された範囲外にあると判定する。最小値と最大値のいずれかに一致した場合は、次の下位の分割データまで指定範囲内にあるかどうかの判断を保留し(S1105)、オフセット値を1増加する(S1106)。そして、パラメータサイズ情報よりパラメータの最後のバイトデータであるかどうかを確認する(S1107)。最後のバイトデータでなければ(S1107のN)、S1103に戻り、最後のバイトデータであれば(S1107のY)、一致符号出力部106が、パラメータの全バイトにわたる一致比較結果について全一致したエントリに該当する符号を出力し保持する(S1108)。
The details of the operation of the parameter comparison unit will be described with reference to FIG. The offset value indicating the data read line of the comparison
かかる構成によれば、データ一致比較手段707がデータの範囲を指定して比較することにより、ポート番号等の範囲指定比較を行うことができ、最小値と最大値のみをテーブルに設定すればよいため、テーブルのエントリ数を節約できる。なお、範囲指定により比較対象となるパラメータとしてはポート番号に限らずIPv4アドレス等でもよい。
According to such a configuration, the data
本実施の形態のネットワーク処理装置は、ネットワーク端末装置やネットワーク中継装置として応用可能である。また、本発明のネットワーク処理装置は、集積回路を用いて実現してもよい。 The network processing device of this embodiment can be applied as a network terminal device or a network relay device. The network processing apparatus of the present invention may be realized using an integrated circuit.
本発明は、複数のパラメータ種別の比較データを比較データ参照メモリの同一行に配置して未使用領域を比較データの保持に活用することができるため、メモリの使用効率を向上し、メモリ量を削減することができる効果を有し、インターネットなどのネットワークインタフェースを通じてパケットを受信処理する装置において、あらかじめ定めた条件を満たすパケットを転送あるいは廃棄するといったパケットフィルタ機能を備えるネットワーク処理装置等に有用である。 In the present invention, comparison data of a plurality of parameter types can be arranged in the same row of the comparison data reference memory, and an unused area can be used for holding comparison data. This is useful for network processing devices that have a packet filtering function such as forwarding or discarding packets that satisfy a predetermined condition in devices that receive and process packets through a network interface such as the Internet. .
101 ネットワークインタフェース(ネットワークI/F)
102 パラメータ抽出部
103 比較データ参照メモリ
104 先頭アドレス保持部
105 有効エントリ保持部
106 アクセス制御部
107、607、807 データ一致比較部
108 一致符号出力部
109 フィルタリング規則参照テーブル部
110 フィルタリング規則判定部
711 マスク情報参照テーブル部
1011 範囲指定情報参照テーブル部
4011〜4016 DMACの6バイトのそれぞれについての、1、2,3,4の4つのエントリ
4017 各エントリのパラメータ比較結果
1300 本発明の実施の形態1におけるネットワーク処理装置
1301 ネットワークインタフェース
1302 受信フレーム廃棄手段
1303 アプリケーション処理装置
101 Network interface (network I / F)
DESCRIPTION OF
Claims (5)
前記比較データ参照メモリ上における、前記パラメータの種別毎のエントリ先頭位置を示す先頭アドレスを保持する先頭アドレス保持手段と、
前記先頭アドレスが示す位置より前記比較データを読み出し、読み出した前記比較データと前記到着パケットより取り出したパラメータとの一致比較を行うデータ一致比較手段と、
前記データ一致比較手段における比較結果を出力する比較結果出力手段と、
前記比較結果出力手段から出力された比較結果の集合により表されるフィルタリング規則により、前記到着パケットの処理を判定するフィルタリング規則判定手段と、を備えるネットワーク処理装置。 Comparison data for storing comparison data for comparison with a parameter such as an IP address included in an arrival packet in the same column, and holding the entry start position of the comparison data in the same row for each parameter type Access control means for controlling access to the reference memory;
Start address holding means for holding a start address indicating an entry start position for each parameter type on the comparison data reference memory;
Data matching comparison means for reading the comparison data from the position indicated by the head address, and performing matching comparison between the read comparison data and the parameter extracted from the arrival packet;
Comparison result output means for outputting a comparison result in the data match comparison means;
A network processing apparatus comprising: filtering rule determination means for determining processing of the arrival packet based on a filtering rule represented by a set of comparison results output from the comparison result output means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005180880A JP2007005910A (en) | 2005-06-21 | 2005-06-21 | Network processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005180880A JP2007005910A (en) | 2005-06-21 | 2005-06-21 | Network processing apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007005910A true JP2007005910A (en) | 2007-01-11 |
Family
ID=37691120
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005180880A Withdrawn JP2007005910A (en) | 2005-06-21 | 2005-06-21 | Network processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007005910A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009066340A1 (en) * | 2007-11-19 | 2009-05-28 | Duaxes Corporation | Determining device and determining method |
-
2005
- 2005-06-21 JP JP2005180880A patent/JP2007005910A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009066340A1 (en) * | 2007-11-19 | 2009-05-28 | Duaxes Corporation | Determining device and determining method |
US8019776B2 (en) | 2007-11-19 | 2011-09-13 | Duaxes Corporation | Determining device and determining method for determining processing to be performed based on acquired data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8819217B2 (en) | Intelligent graph walking | |
KR101615915B1 (en) | GENERATING A NFA (Non-Deterministic finite automata) GRAPH FOR REGULAR EXPRESSION PATTERNS WITH ADVANCED FEATURES | |
US9997245B1 (en) | Method and apparatus for TCAM based look-up | |
US8842672B2 (en) | Systems and methods for modifying network packets to use unrecognized headers/fields for packet classification and forwarding | |
US8599859B2 (en) | Iterative parsing and classification | |
EP2019360A1 (en) | Data processing apparatus and data transfer method | |
WO2015125801A1 (en) | Network control method, network system, device, and program | |
US7403526B1 (en) | Partitioning and filtering a search space of particular use for determining a longest prefix match thereon | |
JP2006025121A (en) | Frame transfer method and device therefor | |
US8331368B2 (en) | Method of processing information packets and telecommunication apparatus using the same | |
KR102337513B1 (en) | Method of forming a hash input from packet contents and an apparatus thereof | |
JP2006135574A (en) | Packet transmitter | |
CN113411290A (en) | Packet header parsing method and device | |
JP6678401B2 (en) | Method and apparatus for dividing a packet into individual layers for change and joining the layers after change by information processing | |
CN106878308B (en) | ICMP message matching system and method | |
US10397113B2 (en) | Method of identifying internal destinations of network packets and an apparatus thereof | |
JP2007005910A (en) | Network processing apparatus | |
JP2008085886A (en) | Packet processing apparatus, packet processing method, and packet processing program | |
JP2006191260A (en) | Packet filter device | |
JP2013038536A (en) | Semiconductor device | |
WO2022097725A1 (en) | Information processing device, information processing method, and computer program | |
JP2006246302A (en) | Packet filter device, apparatus using the same, and packet filter method | |
JP6907903B2 (en) | Packet identification device and method | |
JP2002374289A (en) | Retrieval system and method for registering retrieval condition to cam used therefor, and program thereof | |
JP2005354334A (en) | Data string retrieving apparatus, illegal intrusion detecting and preventing apparatus, method for retrieving data string, and data string retrieving program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20071113 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20071120 |
|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20080902 |