JP2008085886A - Packet processing apparatus, packet processing method, and packet processing program - Google Patents
Packet processing apparatus, packet processing method, and packet processing program Download PDFInfo
- Publication number
- JP2008085886A JP2008085886A JP2006265663A JP2006265663A JP2008085886A JP 2008085886 A JP2008085886 A JP 2008085886A JP 2006265663 A JP2006265663 A JP 2006265663A JP 2006265663 A JP2006265663 A JP 2006265663A JP 2008085886 A JP2008085886 A JP 2008085886A
- Authority
- JP
- Japan
- Prior art keywords
- packet
- transmission control
- identification information
- policy
- 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.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本発明は、パケット処理装置、パケット処理方法及びパケット処理プログラムに関し、例えば、ルータやスイッチ機器等のようなネットワーク装置において、受信パケットのパケット情報を分析するパケット処理装置、パケット処理方法及びパケット処理プログラムに適用し得る。 The present invention relates to a packet processing device, a packet processing method, and a packet processing program. For example, a packet processing device, a packet processing method, and a packet processing program for analyzing packet information of a received packet in a network device such as a router or a switch device. Applicable to.
例えばルータやスイッチ装置等などのネットワーク装置は、基本的には、ネットワーク上を流れる通信パケットを送信先に向けて転送するものであるが、近年のネットワークサービスのニーズに応えるために、受信パケットに対して様々な処理を適用する機能を搭載するものがある(特許文献1参照)。 For example, network devices such as routers and switch devices basically transfer communication packets that flow on the network toward the destination, but in order to meet recent network service needs, On the other hand, there is one equipped with a function for applying various processes (see Patent Document 1).
このようなネットワーク装置においては、受信パケットのヘッダ情報を解析し、その解析結果に基づいてパケットに適用する処理を検索する処理が必要であるが、この検索処理として、例えば、受信パケットのヘッダ情報を検索キーとして、連想メモリ(例えば、CAM;Content Addressable-Memory等)を用いて、パケットに適用する処理のポリシーを検索する方法がある(特許文献2参照)。 In such a network device, it is necessary to analyze the header information of the received packet and search for a process to be applied to the packet based on the analysis result. As this search process, for example, the header information of the received packet There is a method of searching a policy of processing applied to a packet using an associative memory (for example, CAM; Content Addressable-Memory, etc.) using as a search key (see Patent Document 2).
図2は、従来のCAMを備えたネットワーク装置の内部構成の一部を示す構成図であり、図3は、CAMを用いたポリシーの検索処理を簡単に説明するフローチャートである。 FIG. 2 is a block diagram showing a part of the internal configuration of a network device provided with a conventional CAM, and FIG. 3 is a flowchart for briefly explaining a policy search process using the CAM.
図3において、まず、通信パケットがネットワークを通じてネットワーク装置に受信されると、通信パケットはパケット分析部1に与えられ、パケット分析部1によりヘッダ情報が抽出され、この抽出されたヘッダ情報の一部又は全部が検索データとして検索コマンド共にCAM2に与えられる(ステップS1)。
In FIG. 3, first, when a communication packet is received by the network device through the network, the communication packet is given to the
そして、パケット分析部1は、CAM2に予め用意されたポリシーテーブルを用いて、検索データと一致する識別子があるか否かを検索し、所定時間の応答時間後に、一致する識別子がある場合には、検索した識別子のアドレスの返信を受け、一致する識別子がない場合には、一致しなかった旨の通知を受ける(ステップS2)。
Then, the
なお、検索回数については、例えば予め設定・変更することができ、複数回検索する場合には、S1に戻り検索を繰り返す(ステップS3)。 Note that the number of searches can be set and changed in advance, for example. When searching a plurality of times, the process returns to S1 and the search is repeated (step S3).
また、パケット分析部1は、検索対象のフレームの先頭に拡張ヘッダを設け、CAM2からの結果(取得インデックスともいう)を拡張ヘッダに付与し(ステップS3)、拡張ヘッダを追加したフレームをNPU3に与え、NPU3が拡張ヘッダに基づいて対応する処理を行なう(ステップS4)。
Further, the
しかしながら、上述した検索方法によれば、1つのパケットに対してのCAM検索回数を増やした場合、図4に示すように、受信フレームに追加する拡張ヘッダも増加するので、拡張ヘッダのデータサイズが増加し、結果として、検索対象フレームの総データサイズが増加してしまう。 However, according to the above-described search method, when the number of CAM searches for one packet is increased, the extension header added to the received frame is also increased as shown in FIG. As a result, the total data size of the search target frame increases.
そのため、1フレームのデータサイズが、ネットワークから入力されたときのデータサイズよりも大きくなってしまい、パケット分布部2とNPU3との間のパスの帯域不足が生じたり、拡張ヘッダを付与に伴うパケット分布部2の出力処理能力が追従できなくなり、結果として、ネットワーク装置のデータ転送レートの低下が起こる可能性がある。
Therefore, the data size of one frame becomes larger than the data size when it is input from the network, the bandwidth of the path between the
そのため、拡張ヘッダの付与によるパケット分析(通知)手段からの出力処理の負荷を軽減することにより、ネットワーク装置のデータ転送レートの低下を回避することができるパケット処理装置、パケット処理方法及びパケット処理プログラムが求められている。 Therefore, a packet processing device, a packet processing method, and a packet processing program capable of avoiding a decrease in the data transfer rate of the network device by reducing the load of the output processing from the packet analysis (notification) means due to the addition of the extension header Is required.
かかる課題を解決するために、第1の本発明のパケット処理装置は、入力パケットのヘッダ情報に含まれている伝送制御情報に基づいて、入力パケットに対応する伝送制御処理を行なうパケット処理装置において、(1)パケットに適用する伝送制御処理を示すポリシー識別情報と伝送制御情報とを対応付けて記憶するポリシー記憶手段と、(2)入力パケットのヘッダに含まれている伝送制御情報を抽出する伝送制御情報抽出手段と、(3)伝送制御情報抽出手段により抽出された伝送制御情報に対応する1又は複数のポリシー識別情報をポリシー記憶手段から検索するポリシー識別情報検索手段と、(4)検索手段が検索した1又は複数のポリシー識別情報を、入力パケットのデータサイズの冗長を抑止しながらパケット処理手段に通知するパケット通知手段と、(5)パケット通知手段から通知された1又は複数のポリシー識別情報に基づいて、入力パケットに対応する伝送制御処理を行なうパケット処理手段とを備えるパケット処理装置。 In order to solve this problem, a packet processing device according to a first aspect of the present invention is a packet processing device that performs transmission control processing corresponding to an input packet based on transmission control information included in header information of the input packet. (1) Policy storage means for storing policy identification information indicating transmission control processing applied to a packet in association with transmission control information, and (2) extracting transmission control information contained in the header of the input packet Transmission control information extraction means; (3) policy identification information search means for searching one or more policy identification information corresponding to the transmission control information extracted by the transmission control information extraction means from the policy storage means; and (4) search. One or more policy identification information retrieved by the means is notified to the packet processing means while suppressing redundancy of the data size of the input packet That a packet notifying means, (5) based on one or more policy identification information notified from the packet notifying means, the packet processing device and a packet processing unit for performing transmission control processing corresponding to the input packet.
第2の本発明のパケット処理方法は、入力パケットのヘッダ情報に含まれている伝送制御情報に基づいて、入力パケットに対応する伝送制御処理を行なうパケット処理方法において、(1)パケットに適用する伝送制御処理を示すポリシー識別情報と伝送制御情報とを対応付けて記憶するポリシー記憶手段を備え、(2)伝送制御情報抽出手段が、入力パケットのヘッダに含まれている伝送制御情報を抽出する伝送制御情報抽出工程と、(3)ポリシ識別情報検索手段が、伝送制御情報抽出手段により抽出された伝送制御情報に対応する1又は複数のポリシー識別情報をポリシー記憶手段から検索するポリシー識別情報検索工程と、(4)パケット通知手段が、検索手段が検索した1又は複数のポリシー識別情報を、入力パケットのデータサイズの冗長を抑止しながらパケット処理手段に通知するパケット通知工程と、(5)パケット処理手段が、パケット通知手段から通知された1又は複数のポリシー識別情報に基づいて、入力パケットに対応する伝送制御処理を行なうパケット処理工程とを備えるパケット処理方法。 A packet processing method according to a second aspect of the present invention is a packet processing method for performing transmission control processing corresponding to an input packet based on transmission control information included in header information of the input packet. Policy storage means for associating and storing policy identification information indicating transmission control processing and transmission control information is provided, and (2) transmission control information extracting means extracts transmission control information included in the header of the input packet. A transmission control information extraction step; and (3) a policy identification information search in which the policy identification information search means searches the policy storage means for one or more policy identification information corresponding to the transmission control information extracted by the transmission control information extraction means. And (4) the packet notifying unit converts the one or more policy identification information searched by the searching unit into a data source of the input packet. A packet notification step for notifying the packet processing means while suppressing redundancy of the packet, and (5) the packet processing means transmitting the packet corresponding to the input packet based on the one or more policy identification information notified from the packet notification means. A packet processing method comprising: a packet processing step for performing control processing.
第3の本発明のパケット処理プログラムは、入力パケットのヘッダ情報に含まれている伝送制御情報に基づいて、入力パケットに対応する伝送制御処理を行なうパケット処理プログラムにおいて、(1)パケットに適用する伝送制御処理を示すポリシー識別情報と伝送制御情報とを対応付けて記憶するポリシー記憶手段を備え、コンピュータに、(2)入力パケットのヘッダに含まれている伝送制御情報を抽出する伝送制御情報抽出手段、(3)伝送制御情報抽出手段により抽出された伝送制御情報に対応する1又は複数のポリシー識別情報をポリシー記憶手段から検索するポリシー識別情報検索手段、(4)検索手段が検索した1又は複数のポリシー識別情報を、入力パケットのデータサイズの冗長を抑止しながらパケット処理手段に通知するパケット通知手段、(5)パケット通知手段から通知された1又は複数のポリシー識別情報に基づいて、入力パケットに対応する伝送制御処理を行なうパケット処理手段として機能させる。 A packet processing program according to a third aspect of the present invention is (1) applied to a packet in a packet processing program for performing transmission control processing corresponding to an input packet based on transmission control information included in header information of the input packet. Policy storage means for associating and storing policy identification information indicating transmission control processing and transmission control information, and (2) transmission control information extraction for extracting transmission control information included in the header of the input packet in a computer Means, (3) policy identification information retrieval means for retrieving one or more policy identification information corresponding to the transmission control information extracted by the transmission control information extraction means from the policy storage means, and (4) one or more retrieved by the retrieval means Notification of multiple policy identification information to the packet processing means while suppressing redundancy of the data size of the input packet That packet notifying unit, based on (5) one or more policy identification information notified from the packet notifying means, to function as a packet processing unit for performing transmission control processing corresponding to the input packet.
本発明のパケット処理装置、パケット処理方法及びパケット処理プログラムによれば、拡張ヘッダの付与によるパケット通知手段からの出力処理の負荷を軽減することにより、ネットワーク装置のデータ転送レートの低下を回避することができる。 According to the packet processing device, the packet processing method, and the packet processing program of the present invention, it is possible to avoid a decrease in the data transfer rate of the network device by reducing the load of the output processing from the packet notification means due to the addition of the extension header. Can do.
(A)第1の実施形態
以下、本発明のパケット処理装置、パケット処理方法及びパケット処理プログラムの第1の実施形態を図面を参照して説明する。
(A) First Embodiment Hereinafter, a first embodiment of a packet processing device, a packet processing method, and a packet processing program of the present invention will be described with reference to the drawings.
第1の実施形態は、本発明のパケット処理装置、パケット処理方法及びパケット処理プログラムを、ネットワーク上に配置されたルータの受信パケット処理部に適用した場合を説明する。 1st Embodiment demonstrates the case where the packet processing apparatus of this invention, the packet processing method, and the packet processing program are applied to the received packet processing part of the router arrange | positioned on a network.
(A−1)第1の実施形態の構成
図5は、第1の実施形態のネットワーク装置の例であるルータの内部構成を示す構成図である。
(A-1) Configuration of First Embodiment FIG. 5 is a configuration diagram illustrating an internal configuration of a router that is an example of a network device according to the first embodiment.
図5において、第1の実施形態のルータ5は、複数の物理ポート8(8−1〜8−N)と、物理終端部4と、パケット分析部10Aと、ポリシーテーブル記憶部2と、受信パケット処理部6と、ネットワークプロセッサ(NPU)部3と、送信パケット処理部7と、を少なくとも有して構成される。
5, the
物理ポート8−1〜8−Nは、ネットワークを構成する伝送媒体と接続する接続ポートである。ここで、伝送媒体としては、有線媒体(すなわち有線回線)や無線媒体(すなわち無線回線)のいずれかを適用することができる。 The physical ports 8-1 to 8-N are connection ports that are connected to transmission media constituting the network. Here, as the transmission medium, either a wired medium (that is, a wired line) or a wireless medium (that is, a wireless line) can be applied.
物理終端部4は、OSI参照モデルの物理層やデータリンク層の処理を行なうものである。すなわち、物理ポート8を介してネットワークから受け取ったパケットを、パケット分析部10Aに与えるものである。また、物理終端部4は、物理ポート8から受信パケットを受け取ると、データリンク層のプロトコルデータ単位であるMACフレームからネットワーク層のプロトコル単位を取り出して、受信パケット処理部6に与えるものである。また、物理終端部4は、送信パケット処理部7からネットワーク層のプロトコル単位を受け取ると、このネットワーク層のプロトコル単位をデータリンク層のプロトコル単位であるMACフレームに収容し、物理ポート8に与えるものである。
The
パケット分析部10Aは、物理終端部4を介して、ネットワークから入力されたパケットを取り込み、その取り込んだパケットからヘッダ情報を抽出し、ポリシーテーブル記憶部2を用いて、ヘッダ情報に対応する処理のポリシーを検索するものである。また、パケット分析部10Aは、ポリシーテーブル記憶部2を用いたポリシー検索結果を反映させた内容(すなわち、従来の拡張ヘッダに書き込む内容)を、パケットのMACアドレスフィールドに上書きして、ネットワークプロセッサ(NPU)部3に与えるものである。
The
ポリシーテーブル記憶部2は、パケットのヘッダ情報に含まれる識別子と、パケットに対し適用する処理のポリシーを示すアドレス(インデックスともいう)との対応関係を有するポリシーテーブル2aを記憶する記憶領域であり、例えば、連想メモリ(例えばCAM等)が該当する。
The policy
ネットワークプロセッサ部3は、ルータ5としての機能を実現するものであり、受信パケット処理部6からのパケットに対する転送機能を行なうと共に、パケット分析部10Aから、MACアドレスフィールドに拡張ヘッダの内容が上書きされたフレームを受け取ると、上書きされている拡張ヘッダの内容に基づいて、パケットに対して適用する処理を行なうものである。
The
受信パケット処理部6は、物理終端部4からネットワーク層のプロトコル単位(例えばIPパケット)を受け取ると、所定の受信処理を施し、ネットワークプロセッサ部3に与えるものである。
When receiving a network layer protocol unit (for example, an IP packet) from the
送信パケット処理部7は、ネットワークプロセッサ部3により指示されたパケットを送信実行するものである。例えば、送信パケット処理部7は、ネットワークプロセッサ部3の制御の下、パケットの廃棄や次の転送先に対するパケットの送信処理を行なうものである。
The transmission
図1は、第1の実施形態のパケット分析部10Aの内部構成と、パケット分析部10Aを中心とする構成を示す機能ブロック図である。
FIG. 1 is a functional block diagram illustrating an internal configuration of the
図1において、第1の実施形態のパケット分析部10Aは、パケットバッファ部11、識別子抽出部12、検索管理部13、パケット処理実行部14、を少なくとも有する。
In FIG. 1, the packet analysis unit 10 </ b> A according to the first embodiment includes at least a
パケットバッファ部11は、物理終端部4から受け取ったパケットを一時的に記憶するものであり、一時的に記憶したパケットをパケット処理実行部14に与えるものである。
The
識別子抽出部12は、パケットバッファ部11に記憶されているパケットのヘッダ情報に含まれている検索用識別子を抽出し、その抽出した検索用識別子を検索管理部13に与えるものである。
The
ここで、検索用識別子とは、パケットヘッダ情報に含まれる伝送制御情報であり、この伝送制御情報が、パケットに対し適用する処理のポリシーを検索するためのポリシーテーブル2aを検索するための識別子となる。例えば、IPパケットのヘッダの場合、宛先IPアドレス、送信元IPアドレス、ToS(サービスタイプ)、プロトコル番号(上位プロトコルの種類)等が該当する。 Here, the search identifier is transmission control information included in the packet header information, and this transmission control information is an identifier for searching the policy table 2a for searching a policy of processing applied to the packet. Become. For example, in the case of an IP packet header, a destination IP address, a source IP address, a ToS (service type), a protocol number (a type of a higher level protocol), and the like are applicable.
検索管理部13は、識別子抽出部12により抽出された検索用識別子を受け取り、この検索用識別子を検索キーとし、ポリシーテーブル記憶部2に記憶されているポリシーテーブル2aから、当該検索用識別子に対応するポリシー番号を検索するものである。さらに、検索管理部13は、検索したポリシー番号を利用して、ACLアクションテーブル13aを参照して、パケットに対する処理を行なうポリシーのアドレス(インデックス)を検索し、その検索したアドレス(インデックス)をパケット処理実行部14に与えるものである。
The
ACLアクションテーブル13aは、前記ポリシーテーブル2aの各行のポリシー番号に対応付けてアクションの内容が登録されたテーブルである。ACLアクションテーブル13aに登録されるアクションには、パケットの通過、廃棄などのほか、通過させる場合のQoS制御などに関するアクションが含まれていてもよい。 The ACL action table 13a is a table in which the contents of actions are registered in association with the policy numbers of the respective rows of the policy table 2a. Actions registered in the ACL action table 13a may include actions related to QoS control in the case of passing, in addition to passing and discarding of packets.
また、ポリシーのアドレス(インデックス)は、ポリシーテーブル2aの検索により、検索用識別子に対応するポリシーがヒットしたか又はミスヒットしたかを示す識別情報と、そのポリシーのアドレス番号とを少なくとも有して構成される。 The policy address (index) includes at least identification information indicating whether or not the policy corresponding to the search identifier has been hit or missed by searching the policy table 2a, and the policy address number. Composed.
なお、アクションの内容はそのためのデータ項目を用意することで、前記ポリシーテーブル2aにまとめて登録する構成としてもよいが、ここでは、ポリシーテーブル2aと別個にACLアクションテーブル13aを用意している。これによって一覧性は低下するが、管理が容易になり、記憶資源を節約できる可能性が高い。実際には、ポリシーテーブル2a上の異なる多くの行に対し、同一のアクションを対応付けることが多いからである。 The action content may be configured to be registered in the policy table 2a by preparing data items for that purpose, but here, the ACL action table 13a is prepared separately from the policy table 2a. As a result, the listability is lowered, but the management becomes easy and the possibility of saving storage resources is high. This is because the same action is often associated with many different rows on the policy table 2a in practice.
パケット処理実行部14は、ACLアクションテーブル13aの検索によって得られたアクションの内容などを反映したパケット処理をパケットに対し行なうものである。例えば、パケット処理実行部14が行う処理としてはパケットの廃棄処理等を行なう。
The packet
また、パケット処理実行部14は、検索管理部13が検索したアドレス(インデックス)を、パケットバッファ部11から出力されるパケットのMACアドレスフィールド(宛先アドレス部分及び送信元アドレス部分)に上書きして出力するものである。
The packet
このとき、パケット処理実行部14は、MACアドレスフィールドの先頭から順次上書きするものとし、上書き後、上書きしたMACアドレスフィールドのうちの余った部分には空白を意図するデータ(例えば、オール0)を付与するものとする。
At this time, the packet
パケット処理実行部14が、拡張ヘッダの内容を、パケットのMACアドレスフィールドに上書きすることとしたのは、MACアドレスフィールドは、パケットを送信する際、パケット送信処理部7によりMACアドレスの置換処理が行なわれる部分である。つまり、MACアドレスフィールドは、少なくとも、ルータ5内部における処理においては使用しない部分であるから、この使用しないフィールド部分に、従来まで拡張ヘッダに書き込んでいた内容を上書きするものとする。
The packet
このように、拡張ヘッダの内容をMACアドレスフィールドに上書きすることで、新たな拡張ヘッダの追加を行なわずにすむので、フレームのデータサイズを抑えることができ、その結果、パケット分析部10AとNPU部3との間のパスの帯域不足を解消でき、また、従来のような拡張ヘッダの付与に伴うパケット分析部10Aの出力処理の低下を抑えることができる。
Thus, by overwriting the contents of the extension header in the MAC address field, it is not necessary to add a new extension header, so that the data size of the frame can be suppressed. As a result, the
(A−2)第1の実施形態の動作
次に、第1の実施形態のパケット情報の分析処理の動作を図面を参照しながら説明する。
(A-2) Operation of First Embodiment Next, the operation of the packet information analysis processing of the first embodiment will be described with reference to the drawings.
図1において、ネットワークから物理終端部4に入力したパケットは、パケットバッファ部11に与えられ、パケットバッファ部11に一時的に保持される(ステップS11)。
In FIG. 1, a packet input from the network to the
パケットバッファ部11に保持されたパケットは、識別子抽出部12によりパケットのヘッダ情報に含まれている検索用識別子が抽出され(ステップS12)、その抽出された検索用識別子が検索管理部13に与えられる(ステップS13)。
For the packet held in the
検索用識別子が検索管理部13に与えられると、検索管理部13は、ポリシーテーブル記憶部2に記憶されているポリシーテーブル2aを参照し、検索用識別子に対応するポリシー番号を検索し、ACLアクションテーブル13aを参照し、検索したポリシー番号に対応するパケットに対する処理を検索する(ステップS14)。
When the search identifier is given to the
検索管理部13によりポリシー番号とポリシー番号に対するパケット処理とが検索され、その検索結果がパケット処理実行部14に与えられると(ステップS15)、パケット処理実行部14は、パケットバッファ部11に保持されているパケットを読み出し(ステップS16)、ACLアクションテーブル13aから検索したパケット処理(例えば、パケット廃棄等)の処理を行なうと共に、パケットのMACアドレスフィールドにポリシーテーブル2aから検索したポリシーのアドレスを上書きする(ステップS17)。
When the
図6は、パケットのMACアドレスフィールドに、ポリシーテーブル2aの検索結果であるアドレス(インデックス)を上書きする処理のイメージ図である。 FIG. 6 is an image diagram of processing for overwriting an address (index) as a search result of the policy table 2a in the MAC address field of the packet.
図6に示すように、上書きするアドレス(フィールド)は、従来、拡張ヘッダとして記入していた内容と同じである。すなわち、図6に示す拡張ヘッダ内容において、「A〜D」部分31には、ポリシーテーブル2aの検索によるヒット又はミスヒット別を示す識別情報(例えば、ヒットの場合「1」、ミスヒットの場合「0」)が記入され、「取得インデックス」32部分には、ポリシーテーブル2aの検索ヒット時のポリシー番号のアドレスが記入される(ミスヒット場合、例えばオール「0」とする)。
As shown in FIG. 6, the address (field) to be overwritten is the same as the contents previously entered as the extension header. That is, in the contents of the extension header shown in FIG. 6, the “A to D”
そして、パケット処理実行部14は、MACアドレスフィールドにポリシーのアドレスを上書きしたパケットをNPU3に与えて、当該パケットに対する処理を実行させる(ステップS18)。
Then, the packet
(A−3)第1の実施形態の効果
以上のように、第1の実施形態によれば、パケット処理実行部14が、従来拡張ヘッダに記入していた内容を、パケットのMACアドレスフィールドに上書きすることにより、新たに拡張ヘッダの付与することがないので、パケット分析部の出力処理の負荷を軽減することができ、ルータとしてのデータ転送レートの低下を防ぐことができる。
(A-3) Effects of the First Embodiment As described above, according to the first embodiment, the packet
(B)第2の実施形態
次に、本発明のパケット処理装置、パケット処理方法及びパケット処理プログラムの第2の実施形態を、図面を参照しながら説明する。
(B) Second Embodiment Next, a second embodiment of the packet processing apparatus, the packet processing method, and the packet processing program of the present invention will be described with reference to the drawings.
第2の実施形態も、第1の実施形態と同様に、本発明のパケット処理装置、パケット処理方法及びパケット処理プログラムを、ネットワーク上に配置されたルータの受信パケット処理部に適用した場合を説明する。 Similarly to the first embodiment, the second embodiment also describes the case where the packet processing device, the packet processing method, and the packet processing program of the present invention are applied to the received packet processing unit of the router arranged on the network. To do.
(B−1)第2の実施形態の構成
図7は、第2の実施形態のネットワーク装置の例であるルータの内部構成を示すブロック図である。
(B-1) Configuration of Second Embodiment FIG. 7 is a block diagram illustrating an internal configuration of a router that is an example of a network device according to the second embodiment.
図7において、第2の実施形態のルータ5は、複数の物理ポート8(8−1〜8−N)と、物理終端部4と、パケット分析部10Bと、ポリシーテーブル記憶部2と、受信パケット処理部6と、ネットワークプロセッサ(NPU)部3と、送信パケット処理部7と、インデックス内容記憶部9、を少なくとも有して構成される。
In FIG. 7, the
第2の実施形態が第1の実施形態と異なる点は、第2の実施形態のルータ5が、インデックス内容記憶部9を備える点とパケット分析部10Bの機能の点である。
The second embodiment differs from the first embodiment in that the
そこで、以下では、インデックス記憶部9及びパケット分析部10Bの構成及び動作を中心に詳細に説明し、第1の実施形態で説明した機能構成については省略する。
Therefore, hereinafter, the configuration and operation of the
インデックス内容記憶部9は、あるパケットについて、パケット分析部10Bがポリシーテーブル2aによる検索をした際の検索結果、すなわちポリシーのアドレス(インデックス)をパケット分析部10Bから受け取り、そのポリシーのアドレス(インデックス)を、検索対象のパケット毎に記憶するものである。インデックス内容記憶部9は、例えば、DPRAMなどの記憶装置を適用することができる。
The index
このとき、インデックス内容記憶部9がポリシーのアドレス(インデックス)を記憶するメモリアドレスは、パケット分析部10Bにより認識されているものとする。このメモリアドレスの認識は、例えば、検索対象のパケット毎にメモリアドレスカウンタをインクリメントし、パケット分析部10Bがこのカウント値を保持することで実現することができる。
At this time, it is assumed that the memory address at which the index
パケット分析部10Bは、あるパケットについて、ポリシーテーブル2aによる検索を行ない、ポリシーのアドレス(インデックス)を取得すると、そのポリシーのアドレス(インデックス)をインデックス内容記憶部9に記憶するものである。
When the packet analysis unit 10B searches for a packet by using the policy table 2a and obtains a policy address (index), the packet analysis unit 10B stores the policy address (index) in the index
また、パケット分析部10Bは、インデックス内容記憶部9に記憶したメモリアドレスと検索回数とを、パケットの拡張ヘッダとして付与したり、若しくは、MACアドレスフィールドに上書きしたりするものである。
The packet analysis unit 10B adds the memory address and the number of searches stored in the index
第1の実施形態を適用した場合、ポリシーテーブル2aの検索回数が増えると、上書きする内容が増え、MACアドレスフィールド以上のデータフィールドが必要となる。しかし、第2の実施形態では、パケット分析部10Bが、インデックス内容記憶部9のメモリアドレス及び検索回数を、パケットに付与するだけでいいので、拡張ヘッダとして若しくは上書きするデータフィールドを一定とすることができるので、MACアドレスフィールドを超える場合がない。
When the first embodiment is applied, as the number of searches in the policy table 2a increases, the content to be overwritten increases, and a data field greater than the MAC address field is required. However, in the second embodiment, the packet analysis unit 10B only needs to add the memory address and the number of searches of the index
NPU3は、パケット分析部10Bからのパケットの先頭に記入されているメモリアドレス及び検索回数に基づいて、インデックス内容記憶部9に記憶されているポリシーのアドレス(インデックス)を読み出し、そのポリシーのアドレス(インデックス)に基づくポリシーに従って、パケットに対する処理を行なうものである。
The
(B−2)第2の実施形態の動作
次に、第2の実施形態のパケット分析処理の動作を図面を参照して説明する。
(B-2) Operation of Second Embodiment Next, the operation of the packet analysis processing of the second embodiment will be described with reference to the drawings.
図8は、第2の実施形態のパケット分析部10Bと、パケット分析部10Bを中心とする構成要素を示す図である。 FIG. 8 is a diagram illustrating the packet analysis unit 10B according to the second embodiment and the components centering on the packet analysis unit 10B.
図8において、第1の実施形態と同様に、ネットワークからのパケットがパケット分析部10Bに入力すると(ステップS11)、パケットのヘッダ情報に含まれている検索用識別子が識別子抽出部12により抽出され(ステップS12)、検索用識別子が検索管理部14に与えられ(ステップS13)、検索管理部15により、当該パケットについてポリシーテーブル2aによる検索が行なわれる(ステップS14)。
In FIG. 8, as in the first embodiment, when a packet from the network is input to the packet analysis unit 10B (step S11), the identifier for search included in the header information of the packet is extracted by the
ここで、図10は、検索管理部15及びパケット実行部16における動作を示すフローチャートである。
Here, FIG. 10 is a flowchart showing operations in the
検索管理部15が識別子抽出部12から検索用識別子を受け取ると、検索管理部15は、ポリシーテーブル記憶部2に対し、検索要求コマンド及び検索用識別子を与える(ステップS201)。
When the
そうすると、ポリシーテーブル記憶部2は、ポリシーテーブル2aの内部エントリと検索用識別子とを比較し、その応答として一致又は不一致の別の返答と、一致する場合にはポリシーのアドレスとを検索管理部15に返信する(ステップS202)。
Then, the policy
なお、検索管理部15における検索回数Nが「1」である場合にはステップS204に移行し、検索回数Nが「1以上」の場合にはステップS201に戻り処理を繰り返す(ステップS203)。
If the number of searches N in the
ステップS204においては、検索管理部15は、検索したインデックスの内容を、インデックス内容記憶部9にライトする所定の準備を行ない(ステップS204)、インデックスの内容をライトするメモリアドレスを管理する(ステップS205)。
In step S204, the
そうすると、検索管理部15は、インデックス内容記憶部9の管理するメモリアドレスに、今回検索したインデックスの内容をライトする(ステップS205、図8のステップS21)。
Then, the
図9は、インデックス内容記憶部9におけるインデックス内容の記憶態様のイメージを示す。
FIG. 9 shows an image of an index content storage mode in the index
図9に示すように、インデックス内容記憶部9は、検索管理部15からのインデックス内容42を、所定のメモリアドレス41に対応付けて記憶する。このメモリアドレス42は、検索管理部15も管理しており、例えばメモリアドレス42の番号順にインデックス内容が順次記憶されるものとする。また、インデックス内容42は、検索回数に応じて記憶するデータ幅(データ長)を変えることができる。これにより、検索回数が増えることで、データ長が大きくなるインデックス内容を記憶することができる。
As shown in FIG. 9, the index
また、検索管理部15は、今回検索したインデックスの内容をライトしたメモリアドレスと今回検索の検索回数とをパケット実行部16に与えると(図8のステップS22)、パケット実行部16は、パケットバッファ部11に保持されている対応のパケットを読み出し(図8のステップS23)、当該パケットフレームの先頭に、インデックス内容記憶部9のメモリアドレスと検索回数とを付与する(ステップS207、図8のステップ24)。
When the
そして、パケット実行部16は、インデックス内容記憶部9のメモリアドレスと検索回数とを付与したパケットをNPU3与える(図8のステップS25)。
Then, the
NPU3は、パケットの先頭に付与されているメモリアドレスと検索回数に基づいて、インデックス内容記憶部9に記憶されているインデックス内容を読み出し(図8のステップS26及びS27)、NPU9は読み出したインデックス内容に基づくポリシーを当該パケットに対し行なう。
The
(B−3)第2の実施形態の効果
以上のように、第2の実施形態によれば、第1の実施形態と同様の効果を得ることができる。
(B-3) Effects of Second Embodiment As described above, according to the second embodiment, the same effects as those of the first embodiment can be obtained.
また、第2の実施形態によれば、インデックス内容記憶部9を備え、パケット分析部10Bが、検索したポリシーのインデックス内容をインデックス内容記憶部9に記憶し、そのメモリアドレス及び検索回数をフレームの先頭に付与することにより、検索回数が増えることにより、上書きするインデックス内容のデータ量が多くなった場合でも、フレームに付加するデータサイズを一定にすることができるので、新たに拡張ヘッダの付与することがないので、パケット分析部の出力処理の負荷を軽減することができ、ルータとしてのデータ転送レートの低下を防ぐことができる。
Further, according to the second embodiment, the index
(C)第3の実施形態
次に、本発明のパケット処理装置、パケット処理方法及びパケット処理プログラムの第3の実施形態を、図面を参照しながら説明する。
(C) Third Embodiment Next, a third embodiment of the packet processing device, the packet processing method, and the packet processing program of the present invention will be described with reference to the drawings.
第3の実施形態も、第1の実施形態と同様に、本発明のパケット処理装置、パケット処理方法及びパケット処理プログラムを、ネットワーク上に配置されたルータの受信パケット処理部に適用した場合を説明する。 As in the first embodiment, the third embodiment also describes the case where the packet processing device, the packet processing method, and the packet processing program of the present invention are applied to the received packet processing unit of the router arranged on the network. To do.
(C−1)第3の実施形態の構成及び動作
図11は、第3の実施形態のパケット分析部10Cの内部構成を示すブロック図である。
(C-1) Configuration and Operation of the Third Embodiment FIG. 11 is a block diagram showing the internal configuration of the packet analysis unit 10C of the third embodiment.
第3の実施形態が第1及び第2の実施形態と異なる点は、パケット分析部10Cの検索管理部17が、第1の実施形態で説明した処理と、第2の実施形態で説明した処理とを切り替える切替部171を備える点である。
The third embodiment is different from the first and second embodiments in that the
これにより、パケット分析部10Cは、検索回数又は入力したパケット種別に応じて、第1の実施形態で説明した処理(すなわち、MACアドレスフィールドへの上書き処理)と、第2の実施形態で説明した処理(すなわち、インデックス内部記憶部9にインデックス内容を書き込み、そのメモリアドレスと検索回数をフレームの先頭に付与する処理)のいずれかの処理を切り替えることができる。
As a result, the packet analysis unit 10C performs the processing described in the first embodiment (that is, overwrite processing on the MAC address field) and the processing described in the second embodiment according to the number of searches or the input packet type. Any one of the processes (that is, the process of writing the index contents in the index
切替部171による切り替え方法としては、例えば、検索回数に応じて切り替える方法や、又は、入力パケットの種別に応じて切り替える方法がある。
As a switching method by the
例えば検索回数に応じて切り替える方法の場合、切替部171は、検索回数が、所定の検索回数以下の場合には第1の実施形態で説明した処理を行なうようにし、所定の検索回数を超えた場合には第2の実施形態で説明した処理を行なうようにする。
For example, in the case of a method of switching according to the number of searches, the
具体的に、1回の検索について、ポリシーテーブル記憶部2からの返信のデータサイズ、すなわち、一致/不一致の返答とインデックスとの合計データサイズが2byteとすると、検索回数が1〜6回のときには、第1の実施形態と同様に、MACアドレスフィールドにインデックス内容を上書きし、検索回数が6回を超えたときには、第2の実施形態と同様に、インデックス内容をインデックス内容記憶部9に記憶させ、そのメモリアドレス及び検索回数をフレームの先頭に付与するよう動作モードを切り替える。
Specifically, for one search, if the data size of the reply from the policy
この場合、切替部171は、予めパケット分析部10Cの内部レジスタに検索回数を設定し、その設定されている検索回数に基づいて実現することができる。
In this case, the
また例えば、パケット種別に応じて切り替える方法の場合、切替部171は、入力パケットの種別を判断し、そのパケット種別に応じて、検索回数や、第1の実施形態の処理又は第2の実施形態の処理を変更するようにしてもよい。
Further, for example, in the case of a method of switching according to the packet type, the
具体的には、イーサヘッダ内のTypeフィールドを参照し、IPパケットか否かを判断した上で、IPパケットの場合には、全回数の検索を実施し、IPパケットでない場合には、1機能分の検索を1回のみ実施する。 Specifically, referring to the Type field in the ether header and determining whether or not the packet is an IP packet, the IP packet is searched for all the times. Perform a minute search only once.
この場合、IPパケットでない場合には、第1の実施形態と同様に、MACアドレスフィールドにインデックス内容を上書きし、IPパケットの場合、第2の実施形態と同様に、インデックス内容をインデックス内容記憶部9に記憶させ、そのメモリアドレス及び検索回数をフレームの先頭に付与するよう動作モードを切り替える。 In this case, if it is not an IP packet, the index contents are overwritten in the MAC address field as in the first embodiment, and if it is an IP packet, the index contents are stored in the index contents storage unit as in the second embodiment. 9 and the operation mode is switched so that the memory address and the number of searches are given to the head of the frame.
(C−2)第3の実施形態の効果
以上のように、第3の実施形態によれば、第1及び第2の実施形態で得られる効果と同様の効果を得ることができる。
(C-2) Effects of Third Embodiment As described above, according to the third embodiment, the same effects as those obtained in the first and second embodiments can be obtained.
また、第3の実施形態によれば、検索回数又は入力パケットの種別に応じて、第1の実施形態で説明した処理、又は第2の実施形態で説明した処理を切り替えることができる。 Further, according to the third embodiment, the processing described in the first embodiment or the processing described in the second embodiment can be switched according to the number of searches or the type of input packet.
2…ポリシーテーブル記憶部、2a…ポリシーテーブル、11…パケットバッファ部、12…識別子抽出部、13、15及び17…検索管理部、14及び16…パケット処理実行部、3…NPU、9…インデックス内容記憶部。
DESCRIPTION OF
Claims (6)
パケットに適用する伝送制御処理を示すポリシー識別情報と伝送制御情報とを対応付けて記憶するポリシー記憶手段と、
上記入力パケットのヘッダに含まれている伝送制御情報を抽出する伝送制御情報抽出手段と、
上記伝送制御情報抽出手段により抽出された上記伝送制御情報に対応する1又は複数のポリシー識別情報を上記ポリシー記憶手段から検索するポリシー識別情報検索手段と、
上記検索手段が検索した上記1又は複数のポリシー識別情報を、上記入力パケットのデータサイズの冗長を抑止しながらパケット処理手段に通知するパケット通知手段と、
上記パケット通知手段から通知された上記1又は複数のポリシー識別情報に基づいて、上記入力パケットに対応する伝送制御処理を行なうパケット処理手段と
を備えるパケット処理装置。 In a packet processing device that performs transmission control processing corresponding to the input packet based on transmission control information included in header information of the input packet,
Policy storage means for storing policy identification information indicating transmission control processing applied to a packet and transmission control information in association with each other;
Transmission control information extracting means for extracting transmission control information included in the header of the input packet;
Policy identification information search means for searching one or more policy identification information corresponding to the transmission control information extracted by the transmission control information extraction means from the policy storage means;
A packet notification means for notifying the packet processing means of the one or more policy identification information searched by the search means while suppressing redundancy of the data size of the input packet;
A packet processing device comprising: packet processing means for performing transmission control processing corresponding to the input packet based on the one or more pieces of policy identification information notified from the packet notification means.
上記パケット通知手段が、上記ポリシー識別情報保持部に保持させた上記1又は複数のポリシー識別情報の保持アドレス及び検索回数を、上記入力パケットの先頭部分に付与して上記パケット処理手段に通知することを特徴とする請求項2に記載のパケット処理装置。 The packet notification unit includes a policy identification information holding unit that holds the one or more policy identification information in association with a holding address;
The packet notification means gives the holding address and the search count of the one or more policy identification information held in the policy identification information holding section to the head part of the input packet and notifies the packet processing means. The packet processing device according to claim 2.
パケットに適用する伝送制御処理を示すポリシー識別情報と伝送制御情報とを対応付けて記憶するポリシー記憶手段を備え、
伝送制御情報抽出手段が、上記入力パケットのヘッダに含まれている伝送制御情報を抽出する伝送制御情報抽出工程と、
ポリシ識別情報検索手段が、上記伝送制御情報抽出手段により抽出された上記伝送制御情報に対応する1又は複数のポリシー識別情報を上記ポリシー記憶手段から検索するポリシー識別情報検索工程と、
パケット通知手段が、上記検索手段が検索した上記1又は複数のポリシー識別情報を、上記入力パケットのデータサイズの冗長を抑止しながらパケット処理手段に通知するパケット通知工程と、
パケット処理手段が、上記パケット通知手段から通知された上記1又は複数のポリシー識別情報に基づいて、上記入力パケットに対応する伝送制御処理を行なうパケット処理工程と
を備えるパケット処理方法。 In a packet processing method for performing transmission control processing corresponding to the input packet based on transmission control information included in header information of the input packet,
Policy storage means for storing policy identification information indicating transmission control processing applied to a packet and transmission control information in association with each other,
A transmission control information extracting means for extracting transmission control information included in the header of the input packet;
A policy identification information search step in which policy identification information search means searches the policy storage means for one or more policy identification information corresponding to the transmission control information extracted by the transmission control information extraction means;
A packet notification step in which the packet notification means notifies the packet processing means of the one or more policy identification information searched by the search means while suppressing redundancy of the data size of the input packet;
A packet processing step, wherein the packet processing means performs a transmission control process corresponding to the input packet based on the one or more pieces of policy identification information notified from the packet notification means.
パケットに適用する伝送制御処理を示すポリシー識別情報と伝送制御情報とを対応付けて記憶するポリシー記憶手段を備え、
コンピュータに、
上記入力パケットのヘッダに含まれている伝送制御情報を抽出する伝送制御情報抽出手段、
上記伝送制御情報抽出手段により抽出された上記伝送制御情報に対応する1又は複数のポリシー識別情報を上記ポリシー記憶手段から検索するポリシー識別情報検索手段、
上記検索手段が検索した上記1又は複数のポリシー識別情報を、上記入力パケットのデータサイズの冗長を抑止しながらパケット処理手段に通知するパケット通知手段、
上記パケット通知手段から通知された上記1又は複数のポリシー識別情報に基づいて、上記入力パケットに対応する伝送制御処理を行なうパケット処理手段
として機能させるパケット処理プログラム。 In a packet processing program for performing transmission control processing corresponding to the input packet based on transmission control information included in header information of the input packet,
Policy storage means for storing policy identification information indicating transmission control processing applied to a packet and transmission control information in association with each other,
On the computer,
Transmission control information extracting means for extracting transmission control information contained in the header of the input packet;
Policy identification information search means for searching one or more policy identification information corresponding to the transmission control information extracted by the transmission control information extraction means from the policy storage means;
A packet notification means for notifying the packet processing means of the one or more policy identification information searched by the search means while suppressing redundancy of the data size of the input packet;
A packet processing program for functioning as packet processing means for performing transmission control processing corresponding to the input packet based on the one or more pieces of policy identification information notified from the packet notification means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006265663A JP2008085886A (en) | 2006-09-28 | 2006-09-28 | Packet processing apparatus, packet processing method, and packet processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006265663A JP2008085886A (en) | 2006-09-28 | 2006-09-28 | Packet processing apparatus, packet processing method, and packet processing program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008085886A true JP2008085886A (en) | 2008-04-10 |
Family
ID=39356231
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006265663A Pending JP2008085886A (en) | 2006-09-28 | 2006-09-28 | Packet processing apparatus, packet processing method, and packet processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008085886A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009260880A (en) * | 2008-04-21 | 2009-11-05 | Fujitsu Ltd | Packet transfer controlling apparatus and packet transfer controlling method |
KR101619371B1 (en) * | 2014-12-24 | 2016-05-10 | 주식회사 시큐아이 | Method and apparatus for packet processing |
JP2020178348A (en) * | 2019-04-19 | 2020-10-29 | ホアウェイ・テクノロジーズ・カンパニー・リミテッド | Service processing method and network device |
-
2006
- 2006-09-28 JP JP2006265663A patent/JP2008085886A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009260880A (en) * | 2008-04-21 | 2009-11-05 | Fujitsu Ltd | Packet transfer controlling apparatus and packet transfer controlling method |
KR101619371B1 (en) * | 2014-12-24 | 2016-05-10 | 주식회사 시큐아이 | Method and apparatus for packet processing |
JP2020178348A (en) * | 2019-04-19 | 2020-10-29 | ホアウェイ・テクノロジーズ・カンパニー・リミテッド | Service processing method and network device |
JP7044223B2 (en) | 2019-04-19 | 2022-03-30 | ホアウェイ・テクノロジーズ・カンパニー・リミテッド | Service handling method and network device |
US11502953B2 (en) | 2019-04-19 | 2022-11-15 | Huawei Technologies Co., Ltd. | Service processing method and network device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4483535B2 (en) | Network equipment | |
US8799507B2 (en) | Longest prefix match searches with variable numbers of prefixes | |
US8176300B2 (en) | Method and apparatus for content based searching | |
US6674769B1 (en) | Simultaneous searching of layer 3 policy filter and policy cache in a network switch port | |
US7787442B2 (en) | Communication statistic information collection apparatus | |
US8767757B1 (en) | Packet forwarding system and method using patricia trie configured hardware | |
JP3734704B2 (en) | Packet classification engine | |
EP1836808B1 (en) | Fibre channel forwarding information base | |
US8265072B2 (en) | Frame switching device | |
WO2018178906A1 (en) | Flexible processor of a port extender device | |
US9356844B2 (en) | Efficient application recognition in network traffic | |
US9590922B2 (en) | Programmable and high performance switch for data center networks | |
US20180367431A1 (en) | Heavy network flow detection method and software-defined networking switch | |
US11652744B1 (en) | Multi-stage prefix matching enhancements | |
JP5967222B2 (en) | Packet processing apparatus, flow entry arrangement method and program | |
US7403526B1 (en) | Partitioning and filtering a search space of particular use for determining a longest prefix match thereon | |
JP4263718B2 (en) | Communication processing apparatus and communication processing method | |
US20110149776A1 (en) | Network interface card device and method of processing traffic using the network interface card device | |
JP2008085886A (en) | Packet processing apparatus, packet processing method, and packet processing program | |
US9590897B1 (en) | Methods and systems for network devices and associated network transmissions | |
US7843927B1 (en) | Methods, systems, and computer program products for routing packets at a multi-mode layer 3 packet forwarding device | |
KR100864889B1 (en) | Device and method for tcp stateful packet filter | |
JP5389193B2 (en) | Packet transfer processing apparatus, method and program | |
US9553829B2 (en) | Apparatus and method for fast search table update in a network switch | |
US10389626B2 (en) | Transfer device |