JP3967285B2 - Traffic flow detection method, traffic flow detection device, and packet switch device - Google Patents

Traffic flow detection method, traffic flow detection device, and packet switch device Download PDF

Info

Publication number
JP3967285B2
JP3967285B2 JP2003089130A JP2003089130A JP3967285B2 JP 3967285 B2 JP3967285 B2 JP 3967285B2 JP 2003089130 A JP2003089130 A JP 2003089130A JP 2003089130 A JP2003089130 A JP 2003089130A JP 3967285 B2 JP3967285 B2 JP 3967285B2
Authority
JP
Japan
Prior art keywords
packet
traffic flow
destination address
port
transfer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003089130A
Other languages
Japanese (ja)
Other versions
JP2004297603A (en
Inventor
奨 清水
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2003089130A priority Critical patent/JP3967285B2/en
Publication of JP2004297603A publication Critical patent/JP2004297603A/en
Application granted granted Critical
Publication of JP3967285B2 publication Critical patent/JP3967285B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

【0001】
【発明の属する技術分野】
コンピュータネットワークに利用されるパケットスイッチ装置において、トラフィックの状態を監視する方法及び装置に関し、さらに詳しくは、トラフィックフローを検出する方法及び装置に関する。
【0002】
【従来の技術】
図12は、従来のストアアンドフォワード型のパケットスイッチ装置90におけるパケット転送フロー図である。同図に示すパケットスイッチ装置90は、通常ポート2i(i=a,…,h)から入力されたパケットが入力バッファ4i(i=a,…,h)に入ると、ヘッダ解析/宛先抽出部6がこの入力ポート2iに対応する入力データバイトカウンタと入力パケットカウンタをそれぞれ更新し、該パケットのヘッダ部分から宛先アドレスを取り出し、転送テーブル91を参照して出力先ポート識別子を得るようになっている。そして、スイッチファブリック5は、この出力先ポート識別子に基づいてパケットを出力先ポートの出力バッファ4iに送ると、ヘッダ解析/宛先抽出部6が出力データバイトカウンタと出力パケットカウンタを更新した後、通常ポート2iは、出力バッファ4iから出力パケットを取り出し、ポートから送信することにより、該パケットの転送が完了するようになっている。尚、ここで、パケットスイッチ装置とは、イーサネット(登録商標)スイッチなどのレイヤ2スイッチのみならず、ルータなどのレイヤ3スイッチも含むものである。
【0003】
このようなパケット転送を行うパケットスイッチ装置90において、トラフィックフローを把握するための方法は主に2通りある。1つは、プロトコルアナライザと呼ばれる専用装置を回線中に挿入する方法である。図13はプロトコルアナライザ100を用いたトラフィックフロー検出の一例を示す構成図である。同図に示すパケットスイッチ90は通常ポート2i(i=a,…,g)を経由するパケットを監視ポート2zにコピーする機能(ポートミラーリング)を有するもので、管理者は別途プロトコルアナライザ100を用意して、パケットスイッチ装置90の監視ポート2zにこれを接続する事により、通常ポート2iを経由するトラフィックについて、最もトラフィックの多いホストやアプリケーション種別に関するデータを得ることができるようになっている。また、ポートミラーリング機能のないパケットスイッチ装置90にプロトコルアナライザ100を適用する場合においては、通常ポート2iにタップと呼ばれるパケットコピー/分岐装置を接続し、プロトコルアナライザ100をタップに接続することにより、トラフィックフローを検出できるようになっている。
【0004】
もう1つは、サンプリングに基づくフロー検出装置を持つ高機能なパケットスイッチ装置を採用する方法である。こうしたフロー検出装置としては、例えば、Cisco Systems 社のnetflow サービス機能を有する装置、Inmon 社のsflow テクノロジー(Foundry Networks 社製品に実装されている)を有する装置などがあるが、該フロー検出装置を備えたパケットスイッチ装置90の概略構成を示しているのが図14である。図14のパケットスイッチ装置90においては、通常ポート2i(i=a,…,h)を経由し、他の通常ポート2iへと転送されるトラフィックの一部をサンプリングによりコピーするサンプリング装置110によってパケットヘッダを取り出し、これを解析して送信元アドレス:宛先アドレス対を抽出し、各アドレス対毎のトラフィックデータをフローデータとして生成するフローデータ生成装置120によってフローデータが解析装置130に送られるので、管理者は解析装置130の出力を見ると通常ポート2iを経由するトラフィックフローに関する情報を得ることができるようになっている。
【0005】
尚、この出願に関連する先行技術文献情報としては、次のものがある。
【0006】
【非特許文献1】
Cisco Systems、“Cisco IOS NetFlow Technology Datasheet”、[Online]、[平成15年3月14日検索]、インターネット<URL:http://www.cisco.com/warp/public/cc/pd/iosw/prodlit/iosnf_ds.htm>
【0007】
【非特許文献2】
S.Panchen,et,al「InMon Corporation's sFlow」,A Method for Monitoring Traffic in Switched and Routed Networks,IETF,RFC3176.
【0008】
【発明が解決しようとする課題】
しかしながら、上述した従来のトラフィックフローを把握する方法においては、トラフィックフローに関する詳細な情報を収集することはできるが、方法が複雑であるためコスト面に関する課題がある。
【0009】
例えば、プロトコルアナライザを回線に挿入する方法は、情報収集の対象となるポートが通常1つに制限される。そのため、複数のポートにわたるトラフィックフローを検出するためには、各ポートに1台のプロトコルアナライザを専属させる必要があり、アナライザの管理も含め、全体として極めて高コストとなるという問題がある。
【0010】
一方、フロー検出装置を持つ高機能なパケットスイッチ装置を採用する方法は、このような機能を持つパケットスイッチ装置自体が高価であるという問題がある。さらに、回線が高速になるにつれて生成されるフローデータは大量となるので、これを処理する解析装置にも極めて高度な性能が要求され、その結果、システム全体のコストを上昇させるという問題もある。
【0011】
本発明は、上記の課題を解決するためになされたものであり、低コストで簡単にトラフィックフローを検出することができるトラフィックフロー検出方法、トラフィックフロー検出装置及び該装置を有するパケットスイッチ装置を提供することを目的とする。
【0012】
【課題を解決するための手段】
上記目的を達成するため、本発明の第1の態様は、パケットスイッチ装置におけるトラフィックフロー検出方法であって、パケットデータの宛先アドレスと、該宛先アドレスに対応する転送先ポート番号、及び該宛先アドレスが参照された回数である被参照回数を組み合わせたデータを複数記憶している転送テーブルから、前記パケットスイッチ装置に入力されたパケットデータの宛先アドレスに従って、該当データを検索する転送テーブル検索ステップと、前記転送テーブルの該当データの前記被参照回数をインクリメントする被参照回数加算ステップと、前記パケットスイッチ装置の複数のポートごとに設けられ、該ポートに入出力するパケットデータの数及び大きさを計測するトラフィックカウンタ及び前記転送テーブルに基づいてトラフィックフローに関する情報を出力する結果出力ステップと、を有することを要旨とする。
【0013】
本発明の第2の態様は、前記転送テーブルの被参照回数は、前記パケットデータが入力された入力ポートごとに分類されており、被参照回数加算ステップは、前記パケットデータの宛先アドレス及び前記入力ポートに従って前記転送テーブルの該当データの前記被参照回数をインクリメントすることを要旨とする。
【0014】
本発明の第3の態様は、パケットスイッチ装置に内蔵されるトラフィックフロー検出装置であって、前記パケットスイッチ装置の複数のポートごとに設けられ、該ポートに入出力するパケットデータの数及び大きさを計測するトラフィックカウンタと、パケットデータの宛先アドレスと、該宛先アドレスに対応する転送先ポート番号、及び該宛先アドレスが参照された回数である被参照回数を組み合わせたデータを複数記憶している転送テーブルと、前記パケットデータの宛先アドレスに従って前記転送テーブルの該当データの前記被参照回数をインクリメントする被参照回数加算手段と、前記トラフィックカウンタ及び前記転送テーブルに基づいてトラフィックフローに関する情報を出力する結果出力手段と、を有することを要旨とする。
【0015】
本発明の第4の態様は、上記第3の態様において、前記転送テーブルの被参照回数は、前記パケットデータが入力された入力ポートごとに分類されており、被参照回数加算手段は、前記パケットデータの宛先アドレス及び前記入力ポートに従って前記転送テーブルの該当データの前記被参照回数をインクリメントすることを要旨とする。
【0016】
本発明の第5の態様は、第3又は又は第4の態様のトラフィックフロー検出装置を有するパケットスイッチ装置であることを要旨とする。
【0017】
【発明の実施の形態】
以下、本発明の実施の形態を図面を用いて説明する。
【0018】
<第1の実施の形態>
本発明の第1の実施の形態に係るパケットスイッチ装置10は、従来のパケットスイッチ装置90に装備されている転送テーブル91を拡張するとともに、ポート毎のトラフィックカウンタを用いることで、トラフィックフローを検出できるようになっている装置である。
【0019】
従って、本発明は、転送テーブル91の拡張が主眼となっており、その他の部分、すなわちバッファ4iやヘッダ解析部6、スイッチファブリック5などには何ら変更を要さず、またパケットのコピーやサンプリング等、特別な機能を持つ要素を追加する必要もないので、既存のパケットスイッチ装置90に対して軽微な変更を施すだけで、従来複雑な装置を必要としたトラフィックフロー検出機能を提供することができるようにしたものである。
【0020】
このことから、まず、転送テーブル91を拡張した転送テーブル1の概要について説明し、その後、この転送テーブル1を装備しているパケットスイッチ装置10の構成及び動作について説明する。
【0021】
図1は本実施の形態における転送テーブル1の構成を示す図である。同図によれば、転送テーブル1は、図15に示す宛先アドレスと転送先ポート番号が対になっている従来の転送テーブル91に対して、宛先アドレス毎に、該アドレスが参照された回数を数えるカウンタが拡張装備されている。これは、例えば、32ビットカウンタを用いるとして、1エントリあたり4バイトの増加で実現されるものである。尚、説明上、ポート2a,2b…,2hに対応するポート番号をそれぞれ、1,2,…,8とする。
【0022】
次に、転送テーブル1の作用について説明する。ここで、転送テーブル1の要素xを、宛先アドレスをa,転送先ポート番号をp,被参照回数をrとして(a,p,r)の組で表すものとする。ただし、転送テーブル1を分散して搭載する大型パケットスイッチ装置の場合には、各部に分散された各転送テーブルについて被参照回数を小計し、これらをシステムレベルで合計するものとする。
【0023】
また、パケットスイッチ装置1にはポート毎のトラフィックカウンタとして入力バイトカウンタBin(p)、出力バイトカウンタBout(p)、入力パケットカウンタFin(p)と出力パケットカウンタFout(p)が具備されているものとする。
【0024】
このとき、単位時間Δt におけるrの変化Δr は、アドレスaに向かうΔt 時間あたりのパケット数に等しい。即ち、Δr はアドレスa宛のΔt 時間あたりのトラフィックフローをパケット数で表したものである。Δr をパケット数でなく、データバイト数に変換するには、アドレスaが属するポート(転送先ポート)pについて、出力平均パケットサイズ Sout(p)AV=Bout(p)/Fout(p)を求め、ΔrSout(p)AVを用いればよい。また、トラフィックフローの累積パケット数を得るためにはrの値をそのまま使用でき、累積バイト数を得るためには、rSout(p)を使用することができる。
【0025】
以上のことから、例えば、図1に示した転送テーブル1の各要素xに対して、図2に示すような出力側累積トラフィックフローを得ることができる。これにより、例えば、あるポートを占有するフローを検出して当該アドレス宛のトラフィックに対して優先度の低いスケジューリングを行なうことや、別のポートに迂回させるといった操作を加えることが、パケットスイッチ装置10単体で容易にできるようになる。
【0026】
図3は、上述した転送テーブル1を装備しているパケットスイッチ装置10の機能ブロック図であるが、従来のパケットスイッチ装置90と同様の機能を有する部位については、符号を同一にして記載している。尚、以下においては、本実施の形態のパケットスイッチ装置10は、具体的に、4ポート小型イーサネット(登録商標)スイッチ10として説明する。
【0027】
イーサネット(登録商標)スイッチ10は、入出力インタフェース2i(i=a,…,d)毎に入出力パケットバッファ4i(i=a,…,d)と物理層コントローラ3i(i=a,…,d)を備え、これらの間をスイッチファブリック(転送網)5で結合した構成になっている。
【0028】
図4は、イーサネット(登録商標)スイッチ10におけるパケット転送のフローチャートであるが、同図によれば、イーサネット(登録商標)スイッチ10に入力されたパケットはエラーチェックを受け、エラーがなければ、入力ポートに対応する入力バイトカウンタ及びフレームカウンタが更新される(ステップS01〜S03)。尚、パケットにエラーがあれば、パケットは破棄される(ステップS11)。次に、転送コントローラ6は、パケットのヘッダを切り出して、送信元アドレス及び宛先アドレスを取り出し、転送テーブル1を参照する(ステップS04,S05)。そして、送信元アドレスが登録されていなければ、送信元アドレスを受信ポートと対応させて、転送テーブル1に登録する(ステップS06,S12)。次に、宛先アドレスが登録されていれば、転送テーブル1の被参照カウンタをインクリメントし、宛先のポートへパケットを転送する(ステップS07〜S09)。宛先アドレスが登録されていないときは、全ポートにパケットを転送する(ステップS07,S13)。このように、イーサネット(登録商標)スイッチ10は、転送テーブル1を参照及び更新しつつ、パケット転送を行っている。
【0029】
図5は、より詳細な転送テーブル1の機能ブロック図である。図5に示す転送テーブル1は、検索を高速化するため、48ビット×2048ワード構成の連想メモリ(Content Addressable Memory,CAM)を牽引に使っており、出力ポートと被参照カウンタを保存するための16ビット×2048ワード(4キロバイト)のSRAMが組み合わされているものである。このSRAMは、16ビットのうちポートに2ビット、カウンタに14ビット使用しているので、カウンタの最大値は16384となっており、カウンタはフリーラン、すなわち最大値を超えた場合0からの加算にもどるようになっている。また、CAM、SRAMともに2048ワードの記憶が可能であるので、学習可能のMACアドレスの数は最大2048となっている。
【0030】
転送テーブル1の主な機能は、(1)宛先MACアドレスに対する出力ポート2iを検索し、同時に該当MACアドレスに対応する被参照カウンタをインクリメントすること、(2)宛先MACアドレスが転送テーブル1に存在しない場合は転送コントローラ6にunmatch信号を返すこと、(3)転送コントローラ6からMACアドレス登録の依頼があった場合、これを転送テーブル1に書き込むこと、(4)転送コントローラ6からMACアドレス削除の依頼があった場合、これを転送テーブル1から削除すること、の4種類がある。以下、それぞれの機能の動作を図5を用いつつ説明する。
【0031】
(1)宛先MACアドレスに対する出力ポート検索
転送コントローラ6はパケットの出力先を決定するため、宛先MACアドレスで転送テーブル1を検索する。図5では例として00:00:01:02:03:04というMACアドレスの出力ポートを検索する場合を記載している。この例では、あらかじめCAMにエントリがあり、SRAMにもデータがある状態を示している。
【0032】
転送コントローラ6は検索対象となるMACアドレス00:00:01:02:03:04を転送テーブル1に送る。CAMのアドレス1にエントリがあるので、CAMはmatch信号とともにアドレス1を出力する。出力されたアドレスはラッチされ、SRAMにあたえられる。
【0033】
SRAMはアドレス1に相当するデータフィールド3:240を出力する。転送テーブル1から転送コントローラ6に出力ポート3が返され、同時にカウンタインクリメント機構によって被参照回数が1つ増やされ、241となる。つまり、アドレス1のデータフィールドは3:241となり、これが更新バッファを介してSRAMに書き込まれる。すなわち、転送テーブル1のエントリが参照されるたびに、被参照回数を数えるカウンタが更新される。
【0034】
(2)宛先MACアドレスがテーブルに存在しない場合
転送コントローラ6から送られた検索対象MACアドレスがCAMに存在しない場合、CAMからunmatch信号が転送コントローラ6に送られる。この場合、図4のステップS07,S13に示す通り、転送コントローラ6はパケットを全ポートに転送する。
【0035】
(3)MACアドレス登録
図4のステップS06,S12に示す通り、転送コントローラ6はパケットの送信元MACアドレスが転送テーブル1に存在しなかった場合、これを転送テーブル1に登録する。図5では、例として00:00:01:2c:de:10をポート1に登録する。
【0036】
転送コントローラ6から送られた登録MACアドレスとポートは登録バッファに送られ、CAMの空きアドレスに保存される。図5の例では、CAMはアドレス4に書き込み、このアドレスを出力する。
【0037】
CAMから出力されたアドレスはラッチされ、転送先ポート番号1と、初期化時の被参照回数0を組み合わせたデータフィールド1:0が更新バッファを介してSRAMに書き込まれる。以上で、新規MACアドレスが転送テーブル1に追加されたことになる。
【0038】
(4)MACアドレス削除
転送テーブル1のエントリに上限(図5の場合には2048エントリ)があるため、転送コントローラ6は、転送テーブル1のエージング管理をしている。すなわち、長期間使われないエントリを消去して再利用できるようにしている。
【0039】
エージング処理の結果、消去すべきと判断されたアドレスは、転送コントローラ6から転送テーブル1に送られる。CAMはエントリ内容を消去し、「空き」のタグをつけて再利用の準備をする。このとき、SRAMは操作しなくてよい。
【0040】
次に、上述した動作を行う転送テーブル1から、トラフィックフローに関する情報を得る処理について説明する。これは、図6に示すような処理フローに沿って管理モジュール8のソフトウェアがトラフィックフローに関する情報を抽出するものである。図6によれば、トラフィックフロー抽出のコマンドが起動されると、転送テーブル1のダンプ処理がΔtの間隔をあけて2度行われるので、ポートごとにΔtにおける被参照回数の差分を集計する(ステップS21〜S25)。そして、それぞれのポート毎の占有率を計算し、パケットスイッチ装置10の単位時間におけるそれぞれのポートの宛先アドレスごとの占有率リスト12を出力する(ステップS26〜S29)。これにより、トラフィックフローに関する情報を容易に得ることができる。
【0041】
以上、本実施の形態のパケットスイッチ装置10によれば、従来のパケットスイッチの転送テーブルを拡張して被参照カウンタを搭載することにより、低コストで簡単にトラフィックフローを検出することができる。
【0042】
即ち、従来、さまざまなメーカがさまざまなアーキテクチャでイーサネット(登録商標)スイッチを設計しているが、本発明は転送テーブルに被参照カウンタを用意するという簡便な手法を提供するため、他の設計がどのようなものであっても容易に実装することができる。また、これにより、システム全体のコストをほとんど変えずに、トラフィックフローに基づくさまざまなサービスが展開できる。例えば、トラフィック生成の多少に基づくフロー毎課金や、フロー毎のサービス品質の差異化などである。また、ネットワークのセキュリティ保護に応用する事もできる。例えば、サービス拒否攻撃(Denial of Service,DoS)等の外部からの攻撃についても、これらがトラフィックパターンの異常として現れることから、トラフィックフローを正確に把握することによってこれらの攻撃を検出することが可能となる。
【0043】
<第2の実施の形態>
本発明の第2の実施の形態に係るパケットスイッチ装置20は、第1の実施の形態に係るパケットスイッチ装置10と同様に、従来のパケットスイッチ90に装備されている転送テーブル91を拡張するとともに、ポート毎のトラフィックカウンタを用いることで、トラフィックフローを検出できるようになっている装置である。但し、パケットスイッチ装置20に装備されている転送テーブル21は、図7に示すように、参照元ポート毎に、該アドレスが参照された回数を数えるカウンタを備えているので、トラフィックフローの入力側についても分析することが可能となっている。
【0044】
本実施の形態においても、まず、転送テーブル91を拡張した転送テーブル21の概要について説明し、その後、この転送テーブル21を装備しているパケットスイッチ装置20について説明する。尚、本実施の形態においては、第1の実施の形態と異なる構成及び機能のみ説明し、その他の構成及び機能に関しては同一部分には同一符号を付して説明を省略する。
【0045】
図7は、本実施の形態における転送テーブル21の構成を示す図である。同図によれば、転送テーブル21は、従来の転送テーブル91に対して、宛先アドレスの参照元ポート毎に該アドレスが参照された回数を数えるカウンタが拡張装備されている。
【0046】
次に、転送テーブル21の作用について説明する。ここで、転送テーブル21の要素xを、被参照回数rが参照元ポート毎にr1 …rn (ここでr=Σrn )に分割されているので、スイッチのポート数をnとして(a,p,(r1 …rn ))の組で表すものとする。ただし、転送テーブル21を分散して搭載する大型パケットスイッチ装置の場合には、転送テーブル1と同様に、各部に分散された各転送テーブルについて被参照回数を小計し、これらをシステムレベルで合計するものとする。
【0047】
また、パケットスイッチ装置21にはポート毎のトラフィックカウンタとして入力バイトカウンタBin(p)、出力バイトカウンタBout(p)、入力パケットカウンタFin(p)と出力パケットカウンタFout(p)が具備されているものとする。
【0048】
このとき、単位時間Δt におけるrk の変化Δrk はポートkからアドレスaに向かうΔt 時間あたりのパケット数に等しい。即ち、Δrk は、ポートkから流れ込むアドレスa宛のΔt 時間あたりのトラフィックフローをパケット数で表したものである。Δrをパケット数でなく、データバイト数に変換するには、ポートkについて入力平均パケットサイズSin(k)AV=Bin(k)/Fin(k)を求め、Δrk Sin(k)AVを用いればよい。また、トラフィックフローの累積パケット数を得るためには、rk の値をそのまま使用でき、累積バイト数を得るためには、rk Sin(k)を使用することができる。
【0049】
以上のことから、例えば図7に示した転送テーブル21の各要素xに対して、図8に示すようなトラフィックフローを得ることができる。これにより、パケットスイッチ装置20のポート間の関係が理解しやすくなる。図8に示した例では、ポート3から出力されるトラフィックはポート4及びポート6から流入するものが主であり、特に宛先MACアドレス00:00:11:02:03:0bに向かうトラフィック流量が増加していることがわかる。これにより、当該アドレス宛のトラフィックに対して、主にポート4とポート6の入力キューの優先度を下げることや、別のポートに迂回させるといった操作を加えることがパケットスイッチ装置20単体で容易にできるようになる。
【0050】
次に、上述した転送テーブル21を装備しているパケットスイッチ装置20について説明するが、パケットスイッチ装置20は、構成上、図3に示されたパケットスイッチ装置10と転送テーブルだけが異なっているので、パケットスイッチ装置20の構成及びパケット転送に関する動作の説明は省略し、転送テーブル21に関連する動作を中心に説明する。尚、以下においては、本実施の形態のパケットスイッチ装置20は、具体的に、4ポート小型イーサネット(登録商標)スイッチ20として説明する。
【0051】
図9は、より詳細な転送テーブル21の機能ブロック図である。図9に示す転送テーブル21は、参照元ポートごとに参照回数を保存する必要があるため、転送テーブル1に比べポート数N倍(実施例では4ポートを仮定しているので4倍)のSRAM領域が必要になっている点が転送テーブル1と異なっている。また、この広い領域をアドレシングするためのアドレスエンコーダと、CAM出力アドレスとの加算回路がアドレスラッチ前段に挿入されている点が異なっている。
【0052】
転送テーブル21の主な機能は、転送テーブル1と大きな違いはなく、主に4つある。すなわち(1)宛先MACアドレスに対する出力ポート2iを検索し、同時に該当MACアドレスに対応する参照元別の被参照カウンタをインクリメントすること、(2)宛先MACアドレスが転送テーブル21に存在しない場合は転送コントローラ6にunmatch信号を返すこと、(3)転送コントローラ6からMACアドレス登録の依頼があった場合、これを転送テーブル21に書き込むこと、(4)転送コントローラ6からMACアドレス削除の依頼があった場合、これを転送テーブル21から削除すること、である。以下、それぞれの機能の動作を図9を用いつつ説明する。
【0053】
(1)宛先MACアドレスに対する出力ポート検索
転送コントローラ6はパケットの出力先を決定するため、宛先MACアドレスで転送テーブル21を検索する。図9では例として00:00:01:02:03:04というMACアドレスの出力ポートを検索する場合を記載している。この例では、あらかじめCAMにエントリがあり、SRAMにもデータがある状態を示している。
【0054】
転送コントローラ6は検索対象となるMACアドレス00:00:01:02:03:04を転送テーブル21に送る。このとき、どのポートから検索がかかっているかを参照元ポート番号としてアドレスエンコーダに伝える。CAMのアドレス1にエントリがあるので、CAMはmatch信号とともにアドレス1を出力する。これと、参照元ポート番号1からエンコードされた上位アドレス0が加算されて出力されたアドレス0001がラッチされ、SRAMにあたえられる。
【0055】
SRAMはアドレス0001に相当するデータフィールド3:240を出力する。転送テーブル21から転送コントローラ6に出力ポート3が返され、同時にカウンタインクリメント構成によって被参照回数が1増やされ、241となる。つまりアドレス0001のデータフィールドは3:241となり、これが更新バッファを介してSRAMに書き込まれる。すなわち、転送テーブル21のエントリが参照されるたびに、参照元ポートごとに被参照回数を数えるカウンタが更新される。
【0056】
(2)宛先MACアドレスがテーブルに存在しない場合
転送コントローラ6から送られた検索対象MACアドレスがCAMに存在しない場合、CAMからunmatch信号が転送コントローラ6に送られる。この場合、図4のステップS07,S13に示す通り、転送コントローラ6はパケットを全ポートに転送する。
【0057】
(3)MACアドレス登録
図4のステップS06,S12に示す通り、転送コントローラ6はパケットの送信元MACアドレスが転送テーブル21に存在しなかった場合、これを転送テーブル21に登録する。図9では、例として00:00:01:2c:de:10をポート1に登録する。
【0058】
転送コントローラ6から送られた登録MACアドレスとポートは登録バッファに送られ、CAMの空きアドレスに保存される。図9の例では、CAMはアドレス4に書き込み、このアドレスを出力する。
【0059】
CAMから出力されるアドレス空間は0x000−0x7FFの2048エントリであるが、カウンタはポート数ごとに独立であるため、上位アドレスとして2ビット分が加算される。すなわち、CAMのアドレス0x004に対して、初期化が必要な書き込みアドレスとして0x004,0x804,0x1004,0x1804の4つが生成され、SRAMのそれぞれのアドレスに転送先ポート番号1と、初期化時の被参照回数0を組み合わせたデータフィールド1:0が更新バッファを介してSRAMに書き込まれる。以上で、新規MACアドレスが転送テーブル21に追加されたことになる。
【0060】
(4)MACアドレス削除
転送テーブル21のエントリに上限(図9の場合には2048エントリ)があるため、転送コントローラ6は、転送テーブル21のエージング管理をしている。すなわち、長期間使われないエントリを消去して再利用できるようにする。
【0061】
エージング処理の結果、消去すべきと判断されたアドレスは、転送コントローラ6から転送テーブル21に送られる。CAMはエントリ内容を消去し、「空き」のタグをつけて再利用の準備をする。このとき、SRAMは操作しなくてよい。
【0062】
次に、上述した動作を行う転送テーブル21から、トラフィックフローに関する情報を得る処理について説明する。これは、図10に示すような処理フローに沿って管理モジュール8のソフトウェアがトラフィックフローに関する情報を抽出するものである。図10によれば、トラフィックフロー抽出のコマンドが起動されると、転送テーブル21のダンプ処理がΔtの間隔をあけて2度行われるので、転送先ポート毎、参照元ポート毎にΔtにおける被参照回数の差分を集計する(ステップS31〜S35)。そして、それぞれのポート毎の占有率を計算し、パケットスイッチ装置20の単位時間における転送先ポート毎、参照元ポート毎の占有率リスト22を出力する(ステップS26〜S29)。これにより、トラフィックフローに関する情報を容易に得ることができる。
【0063】
以上、本実施の形態のパケットスイッチ装置20によれば、第1の実施の形態のパケットスイッチ装置10と同様の効果を奏する他、従来のパケットスイッチの転送テーブルを拡張して転送先ポート毎及び参照元ポート毎の被参照カウンタを搭載することにより、低コストで簡単に出力側だけでなく入力側も含めてトラフィックフローを検出することができる。
【0064】
以上、本発明の実施の形態について説明してきたが、本発明の要旨を逸脱しない範囲において、本発明の実施の形態に対して種々の変形や変更を施すことができる。例えば、上記実施の形態においては、宛先アドレスと転送先ポートの対応が1対1であるものとして説明したが、IP層における転送テーブル探索のように、比較が宛先アドレスの一部を対象としている場合であっても同様な作用であることはもちろんである。この場合、図11に示す転送テーブル31のように、宛先アドレスがネットワークとマスクで表されるため、フローの検出単位は宛先ネットワーク毎になる。
【0065】
【発明の効果】
以上説明したように、本発明によれば、パケットスイッチ装置の転送テーブルを拡張して被参照カウンタを搭載し、該被参照カウンタをパケット転送の宛先アドレスに応じてインクリメントしているので、低コストで簡単にトラフィックフローを検出することができる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態に係る転送テーブルの構成を説明する図である。
【図2】本発明の第1の実施の形態に係る転送テーブルから得られるトラフィックフローの1つを説明する図である。
【図3】本発明の第1の実施の形態に係るパケットスイッチ装置の機能ブロック図である。
【図4】本発明の第1の実施の形態に係るパケットスイッチ装置のパケット転送処理のフローチャートである。
【図5】本発明の第1の実施の形態に係る転送テーブルの動作を説明する図である。
【図6】本発明の第1の実施の形態に係るパケットスイッチ装置が転送テーブルからトラフィックフローを抽出する際のフローチャートである。
【図7】本発明の第2の実施の形態に係る転送テーブルの構成を説明する図である。
【図8】本発明の第2の実施の形態に係る転送テーブルから得られるトラフィックフローの1つを説明する図である。
【図9】本発明の第2の実施の形態に係る転送テーブルの動作を説明する図である。
【図10】本発明の第2の実施の形態に係るパケットスイッチ装置が転送テーブルからトラフィックフローを抽出する際のフローチャートである。
【図11】本発明の他の実施の形態に係る転送テーブルの構成を説明する図である。
【図12】従来のストアアンドフォワード型のパケットスイッチ装置におけるパケット転送フローを説明する図である。
【図13】従来のパケットスイッチ装置においてプロトコルアナライザを用いたトラフィックフロー検出の構成図である。
【図14】従来のパケットサンプリング機能を用いたトラフィックフロー検出の構成図である。
【図15】従来の転送テーブルの構成を説明する図である。
【符号の説明】
1,21,31,91 転送テーブル
2i ポート
3i 物理層コントローラ
4i パケットバッファ
5 スイッチファブリック
6 転送コントローラ(ヘッダ解析/宛先抽出部)
7 各種カウンタ
8 管理モジュール
9 電源/ファン/環境モニタ
10,20,90 パケットスイッチ装置
12,22 結果レポート
100 プロトコルアナライザ
110 サンプリング装置
120 フローデータ生成装置
130 解析装置
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method and apparatus for monitoring traffic conditions in a packet switch device used in a computer network, and more particularly to a method and apparatus for detecting a traffic flow.
[0002]
[Prior art]
FIG. 12 is a packet transfer flow chart in the conventional store-and-forward type packet switch apparatus 90. When the packet input from the normal port 2i (i = a,..., H) enters the input buffer 4i (i = a,..., H), the packet switch device 90 shown in FIG. 6 updates the input data byte counter and the input packet counter corresponding to the input port 2i, extracts the destination address from the header portion of the packet, and obtains the output destination port identifier by referring to the transfer table 91. Yes. When the switch fabric 5 sends the packet to the output buffer 4i of the output destination port based on the output destination port identifier, the header analysis / destination extraction unit 6 updates the output data byte counter and the output packet counter, and then The port 2i takes out the output packet from the output buffer 4i and transmits it from the port, whereby the transfer of the packet is completed. Here, the packet switch device includes not only a layer 2 switch such as an Ethernet (registered trademark) switch but also a layer 3 switch such as a router.
[0003]
In the packet switch apparatus 90 that performs such packet transfer, there are mainly two methods for grasping the traffic flow. One is a method of inserting a dedicated device called a protocol analyzer into the line. FIG. 13 is a configuration diagram showing an example of traffic flow detection using the protocol analyzer 100. The packet switch 90 shown in the figure has a function (port mirroring) for copying a packet normally passing through the port 2i (i = a,..., G) to the monitoring port 2z, and the administrator prepares a separate protocol analyzer 100. Then, by connecting this to the monitoring port 2z of the packet switch device 90, it is possible to obtain data relating to the host and application type with the most traffic for the traffic passing through the normal port 2i. In addition, when the protocol analyzer 100 is applied to the packet switch device 90 having no port mirroring function, a packet copy / branch device called a tap is normally connected to the port 2i, and the protocol analyzer 100 is connected to the tap, thereby causing traffic. The flow can be detected.
[0004]
The other is a method that employs a highly functional packet switch device having a flow detection device based on sampling. Examples of such a flow detection device include a device having a netflow service function of Cisco Systems and a device having sflow technology (implemented in a product of Foundry Networks) of Inmon. FIG. 14 shows a schematic configuration of the packet switch apparatus 90. In the packet switch device 90 of FIG. 14, the packet is received by the sampling device 110 that copies a part of the traffic transferred to the other normal port 2i via the normal port 2i (i = a,..., H) by sampling. The flow data is sent to the analysis device 130 by the flow data generation device 120 that extracts the header, analyzes it, extracts the source address: destination address pair, and generates the traffic data for each address pair as flow data. The administrator can obtain information related to the traffic flow that normally passes through the port 2 i when viewing the output of the analysis device 130.
[0005]
The prior art document information related to this application includes the following.
[0006]
[Non-Patent Document 1]
Cisco Systems, “Cisco IOS NetFlow Technology Datasheet”, [Online], [Search March 14, 2003], Internet <URL: http://www.cisco.com/warp/public/cc/pd/iosw/ prodlit / iosnf_ds.htm>
[0007]
[Non-Patent Document 2]
S. Panchen, et, al "InMon Corporation's sFlow", A Method for Monitoring Traffic in Switched and Routed Networks, IETF, RFC3176.
[0008]
[Problems to be solved by the invention]
However, in the conventional method for grasping the traffic flow described above, detailed information regarding the traffic flow can be collected, but there is a problem with respect to cost because the method is complicated.
[0009]
For example, in the method of inserting a protocol analyzer into a line, the number of ports for information collection is usually limited to one. Therefore, in order to detect a traffic flow across a plurality of ports, it is necessary to dedicate a single protocol analyzer to each port, and there is a problem that the overall cost including the management of the analyzer is extremely high.
[0010]
On the other hand, the method of adopting a high-function packet switch device having a flow detection device has a problem that the packet switch device itself having such a function is expensive. Furthermore, since the amount of flow data generated increases as the line speed increases, an extremely high level of performance is required for an analysis apparatus that processes the flow data, resulting in a problem of increasing the cost of the entire system.
[0011]
The present invention has been made to solve the above-described problems, and provides a traffic flow detection method, a traffic flow detection device, and a packet switch device having the device capable of easily detecting a traffic flow at low cost. The purpose is to do.
[0012]
[Means for Solving the Problems]
To achieve the above objective, The first aspect of the present invention is: A traffic flow detection method in a packet switch device, wherein a plurality of data combining a destination address of packet data, a transfer destination port number corresponding to the destination address, and a reference count that is the number of times the destination address is referenced A transfer table search step for searching for the corresponding data in accordance with a destination address of the packet data input to the packet switch device from the stored transfer table, and a reference for incrementing the reference count of the corresponding data in the transfer table A number of times addition step, a traffic counter that is provided for each of a plurality of ports of the packet switch device and measures the number and size of packet data input / output to / from the ports, and outputs information on traffic flow based on the forwarding table Result output And step, to have a the gist.
[0013]
The second aspect of the present invention is: The number of times of reference in the forwarding table is classified for each input port to which the packet data is input, and the step of adding the number of times of reference is performed according to the destination address of the packet data and the input port. The gist is to increment the reference count.
[0014]
The third aspect of the present invention is: A traffic flow detection device built in a packet switch device, provided for each of a plurality of ports of the packet switch device, a traffic counter for measuring the number and size of packet data inputted to and outputted from the port, and packet data A destination table of the packet data, a transfer destination port number corresponding to the destination address, and a forwarding table storing a plurality of pieces of data in which the destination address is referenced, and a destination address of the packet data And a result output means for outputting information relating to a traffic flow based on the traffic counter and the forwarding table, and a result output means for outputting information on traffic flow based on the forwarding table. To do.
[0015]
The fourth aspect of the present invention is the same as the third aspect. The number of referenced times of the forwarding table is classified for each input port to which the packet data is input, and the number of times of referenced number adding means determines the number of times of the forwarding table according to the destination address of the packet data and the input port. The gist is to increment the number of times the data is referred to.
[0016]
The fifth aspect of the present invention is the third or fourth aspect. The gist of the present invention is a packet switch device having a traffic flow detection device.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0018]
<First Embodiment>
The packet switch device 10 according to the first exemplary embodiment of the present invention detects a traffic flow by expanding the forwarding table 91 provided in the conventional packet switch device 90 and using a traffic counter for each port. It is a device that can be used.
[0019]
Accordingly, the present invention mainly focuses on the extension of the forwarding table 91, and other parts, that is, the buffer 4i, the header analysis unit 6, the switch fabric 5 and the like are not required to be changed, and packet copy and sampling are not required. Therefore, it is not necessary to add an element having a special function such as the above, and it is possible to provide a traffic flow detection function that conventionally requires a complicated device by making a slight change to the existing packet switch device 90. It is something that can be done.
[0020]
Therefore, first, an outline of the forwarding table 1 obtained by extending the forwarding table 91 will be described, and then the configuration and operation of the packet switch device 10 equipped with the forwarding table 1 will be described.
[0021]
FIG. 1 is a diagram showing the configuration of the transfer table 1 in the present embodiment. According to the figure, the forwarding table 1 shows, for each destination address, the number of times the address is referred to the conventional forwarding table 91 in which the destination address and forwarding port number shown in FIG. A counting counter has been added. For example, this is realized by an increase of 4 bytes per entry when a 32-bit counter is used. For the sake of explanation, the port numbers corresponding to the ports 2a, 2b,..., 2h are 1, 2,.
[0022]
Next, the operation of the transfer table 1 will be described. Here, the element x of the transfer table 1 is represented by a set of (a, p, r) where a is a destination address, p is a transfer destination port number, and r is a reference count. However, in the case of a large packet switch device in which the transfer table 1 is distributed and mounted, the number of times of reference is subtotaled for each transfer table distributed in each part, and these are summed at the system level.
[0023]
Further, the packet switch device 1 includes an input byte counter Bin (p), an output byte counter Bout (p), an input packet counter Fin (p), and an output packet counter Fout (p) as traffic counters for each port. Shall.
[0024]
At this time, the change Δr of r in the unit time Δt is equal to the number of packets per Δt time toward the address a. That is, Δr represents the traffic flow per time Δt addressed to the address a in the number of packets. To convert Δr to the number of data bytes instead of the number of packets, the output average packet size Sout (p) for the port (transfer destination port) p to which the address a belongs AV = Bout (p) / Fout (p) is calculated and ΔrSout (p) AV May be used. Further, the value of r can be used as it is to obtain the cumulative number of packets in the traffic flow, and rSout (p) can be used to obtain the cumulative number of bytes.
[0025]
From the above, for example, an output side accumulated traffic flow as shown in FIG. 2 can be obtained for each element x of the forwarding table 1 shown in FIG. Thus, for example, it is possible to detect a flow that occupies a certain port and perform low-priority scheduling for traffic destined for the address, or to perform an operation such as detouring to another port. It can be easily done by itself.
[0026]
FIG. 3 is a functional block diagram of the packet switch device 10 equipped with the forwarding table 1 described above. The parts having the same functions as those of the conventional packet switch device 90 are described with the same reference numerals. Yes. In the following, the packet switch device 10 according to the present embodiment will be specifically described as a 4-port small Ethernet (registered trademark) switch 10.
[0027]
The Ethernet (registered trademark) switch 10 includes an input / output packet buffer 4i (i = a,..., D) and a physical layer controller 3i (i = a,...) For each input / output interface 2i (i = a,..., D). d), and a switch fabric (forwarding network) 5 between them.
[0028]
FIG. 4 is a flowchart of packet transfer in the Ethernet (registered trademark) switch 10. According to FIG. 4, the packet input to the Ethernet (registered trademark) switch 10 is subjected to an error check. The input byte counter and frame counter corresponding to the port are updated (steps S01 to S03). If there is an error in the packet, the packet is discarded (step S11). Next, the transfer controller 6 cuts out the packet header, extracts the source address and the destination address, and refers to the transfer table 1 (steps S04 and S05). If the transmission source address is not registered, the transmission source address is registered in the transfer table 1 in association with the reception port (steps S06 and S12). Next, if the destination address is registered, the referenced counter in the forwarding table 1 is incremented and the packet is forwarded to the destination port (steps S07 to S09). When the destination address is not registered, the packet is transferred to all ports (steps S07 and S13). As described above, the Ethernet (registered trademark) switch 10 performs packet transfer while referring to and updating the transfer table 1.
[0029]
FIG. 5 is a functional block diagram of the transfer table 1 in more detail. The transfer table 1 shown in FIG. 5 uses an associative memory (Content Addressable Memory, CAM) having a 48-bit × 2048-word configuration to speed up the search, and stores the output port and the referenced counter. This is a combination of 16 bits x 2048 words (4 kilobytes) of SRAM. Since this SRAM uses 2 bits for the port and 14 bits for the counter among the 16 bits, the maximum value of the counter is 16384, and the counter is free-run, that is, addition from 0 when the maximum value is exceeded It has come back. Since both CAM and SRAM can store 2048 words, the maximum number of MAC addresses that can be learned is 2048.
[0030]
The main functions of the forwarding table 1 are: (1) searching the output port 2i for the destination MAC address and simultaneously incrementing the referenced counter corresponding to the corresponding MAC address; (2) the destination MAC address exists in the forwarding table 1 If not, an unmatch signal is returned to the transfer controller 6, (3) if a request for MAC address registration is received from the transfer controller 6, this is written in the transfer table 1, and (4) the MAC address is deleted from the transfer controller 6. When there is a request, there are four types of deleting this from the transfer table 1. Hereinafter, the operation of each function will be described with reference to FIG.
[0031]
(1) Output port search for destination MAC address
The transfer controller 6 searches the transfer table 1 with the destination MAC address in order to determine the output destination of the packet. FIG. 5 shows a case where an output port with a MAC address of 00: 00: 01: 02: 03: 04 is searched as an example. In this example, there is shown a state in which there is an entry in the CAM in advance and there is data in the SRAM.
[0032]
The transfer controller 6 sends the MAC address 00: 00: 01: 02: 03: 04 to be searched to the transfer table 1. Since there is an entry at address 1 of the CAM, the CAM outputs address 1 together with the match signal. The output address is latched and given to the SRAM.
[0033]
The SRAM outputs a data field 3: 240 corresponding to address 1. The output port 3 is returned from the transfer table 1 to the transfer controller 6, and at the same time, the counter increment mechanism increases the number of times of reference by one to 241. That is, the data field at address 1 is 3: 241, which is written to the SRAM via the update buffer. That is, each time an entry in the transfer table 1 is referred to, the counter for counting the number of times of reference is updated.
[0034]
(2) When the destination MAC address does not exist in the table
When the search target MAC address sent from the transfer controller 6 does not exist in the CAM, an unmatch signal is sent from the CAM to the transfer controller 6. In this case, as shown in steps S07 and S13 in FIG. 4, the transfer controller 6 transfers the packet to all ports.
[0035]
(3) MAC address registration
As shown in steps S06 and S12 in FIG. 4, when the transmission source MAC address of the packet does not exist in the transfer table 1, the transfer controller 6 registers this in the transfer table 1. In FIG. 5, 00: 00: 01: 2c: de: 10 is registered in port 1 as an example.
[0036]
The registered MAC address and port sent from the transfer controller 6 are sent to the registration buffer and stored in the CAM free address. In the example of FIG. 5, the CAM writes to address 4 and outputs this address.
[0037]
The address output from the CAM is latched, and the data field 1: 0 that combines the transfer destination port number 1 and the reference count 0 at the time of initialization is written to the SRAM via the update buffer. Thus, the new MAC address has been added to the transfer table 1.
[0038]
(4) Delete MAC address
Since the transfer table 1 has an upper limit (2048 entries in the case of FIG. 5), the transfer controller 6 manages the aging of the transfer table 1. In other words, entries that have not been used for a long time are deleted so that they can be reused.
[0039]
As a result of the aging process, the address determined to be deleted is sent from the transfer controller 6 to the transfer table 1. The CAM erases the entry contents and adds a “vacant” tag to prepare for reuse. At this time, the SRAM need not be operated.
[0040]
Next, processing for obtaining information related to traffic flow from the forwarding table 1 that performs the above-described operation will be described. This is because the software of the management module 8 extracts information relating to the traffic flow along the processing flow as shown in FIG. According to FIG. 6, when the traffic flow extraction command is activated, the dump process of the forwarding table 1 is performed twice with an interval of Δt, so the difference in the number of referenced times at Δt is totaled for each port ( Steps S21 to S25). Then, the occupancy rate for each port is calculated, and the occupancy rate list 12 for each destination address of each port in the unit time of the packet switch device 10 is output (steps S26 to S29). Thereby, the information regarding a traffic flow can be obtained easily.
[0041]
As described above, according to the packet switch device 10 of the present embodiment, it is possible to easily detect a traffic flow at a low cost by expanding a transfer table of a conventional packet switch and mounting a referenced counter.
[0042]
In other words, various manufacturers have conventionally designed Ethernet (registered trademark) switches with various architectures. However, the present invention provides a simple method of preparing a referenced counter in a transfer table, so other designs are available. Anything can be easily implemented. This also allows various services based on traffic flow to be deployed with little change in the overall system cost. For example, charging for each flow based on the amount of traffic generation, differentiation of service quality for each flow, and the like. It can also be applied to network security protection. For example, attacks from the outside such as denial of service (DoS) can be detected by accurately grasping the traffic flow because these appear as abnormal traffic patterns. It becomes.
[0043]
<Second Embodiment>
The packet switch device 20 according to the second embodiment of the present invention extends the forwarding table 91 provided in the conventional packet switch 90, as with the packet switch device 10 according to the first embodiment. By using a traffic counter for each port, the traffic flow can be detected. However, as shown in FIG. 7, the forwarding table 21 provided in the packet switch device 20 includes a counter for counting the number of times the address is referred to for each reference source port. Can also be analyzed.
[0044]
Also in this embodiment, first, an outline of the transfer table 21 obtained by expanding the transfer table 91 will be described, and then the packet switch device 20 equipped with the transfer table 21 will be described. In the present embodiment, only the configuration and functions different from those of the first embodiment will be described, and the other components and functions will be denoted by the same reference numerals and the description thereof will be omitted.
[0045]
FIG. 7 is a diagram showing the configuration of the transfer table 21 in the present embodiment. As shown in the figure, the transfer table 21 is provided with an extended counter for counting the number of times the address is referred to for each reference source port of the destination address with respect to the conventional transfer table 91.
[0046]
Next, the operation of the transfer table 21 will be described. Here, the element x of the forwarding table 21 is changed to r for each reference source port where the reference count r is 1 ... r n (Where r = Σr n ), The number of switch ports is n (a, p, (r 1 ... r n )). However, in the case of a large packet switch device in which the transfer table 21 is distributed and mounted, as in the transfer table 1, the number of referenced times is subtotaled for each transfer table distributed in each part, and these are summed at the system level. Shall.
[0047]
The packet switch device 21 includes an input byte counter Bin (p), an output byte counter Bout (p), an input packet counter Fin (p), and an output packet counter Fout (p) as traffic counters for each port. Shall.
[0048]
At this time, r in unit time Δt k Change Δr k Is equal to the number of packets per time Δt from port k to address a. That is, Δr k Represents the traffic flow per Δt time addressed to address a flowing in from port k in terms of the number of packets. Δr k Is converted to the number of data bytes instead of the number of packets, the average input packet size Sin (k) for port k AV = Bin (k) / Fin (k) is calculated and Δr k Sin (k) AV May be used. Also, to obtain the cumulative number of packets in the traffic flow, r k To get the cumulative number of bytes, you can use r k Sin (k) can be used.
[0049]
From the above, for example, a traffic flow as shown in FIG. 8 can be obtained for each element x of the forwarding table 21 shown in FIG. Thereby, it becomes easy to understand the relationship between the ports of the packet switch device 20. In the example shown in FIG. 8, the traffic output from the port 3 mainly flows from the port 4 and the port 6, and the traffic flow toward the destination MAC address 00: 00: 11: 02: 03: 0b is particularly large. It can be seen that it has increased. As a result, it is easy for the packet switch device 20 alone to add operations such as lowering the priority of the input queues of the ports 4 and 6 to the traffic addressed to the address, or detouring to another port. become able to.
[0050]
Next, the packet switch device 20 equipped with the above-described forwarding table 21 will be described. However, the packet switching device 20 is different from the packet switching device 10 shown in FIG. The description of the configuration of the packet switch device 20 and the operation related to packet transfer will be omitted, and the operation related to the transfer table 21 will be mainly described. In the following, the packet switch device 20 according to the present embodiment will be specifically described as a 4-port small Ethernet (registered trademark) switch 20.
[0051]
FIG. 9 is a functional block diagram of the transfer table 21 in more detail. Since the transfer table 21 shown in FIG. 9 needs to store the reference count for each reference source port, the number of ports is N times that of the transfer table 1 (4 times because four ports are assumed in the embodiment). This is different from the forwarding table 1 in that an area is required. Another difference is that an address encoder for addressing this wide area and an adder circuit for the CAM output address are inserted before the address latch.
[0052]
The main functions of the transfer table 21 are not significantly different from those of the transfer table 1, and there are mainly four. That is, (1) search the output port 2i for the destination MAC address and simultaneously increment the referenced counter for each reference source corresponding to the corresponding MAC address, and (2) transfer if the destination MAC address does not exist in the forwarding table 21 An unmatch signal is returned to the controller 6, (3) when there is a request for MAC address registration from the transfer controller 6, this is written in the transfer table 21, and (4) there is a request for deletion of the MAC address from the transfer controller 6. If this is the case, delete this from the transfer table 21. The operation of each function will be described below with reference to FIG.
[0053]
(1) Output port search for destination MAC address
The transfer controller 6 searches the transfer table 21 with the destination MAC address in order to determine the output destination of the packet. FIG. 9 shows a case where an output port with a MAC address of 00: 00: 01: 02: 03: 04 is searched as an example. In this example, there is shown a state in which there is an entry in the CAM in advance and there is data in the SRAM.
[0054]
The transfer controller 6 sends the MAC address 00: 00: 01: 02: 03: 04 to be searched to the transfer table 21. At this time, the port from which the search is applied is notified to the address encoder as a reference source port number. Since there is an entry at address 1 of the CAM, the CAM outputs address 1 together with the match signal. This is added with the higher address 0 encoded from the reference port number 1 and the output address 0001 is latched and given to the SRAM.
[0055]
The SRAM outputs a data field 3: 240 corresponding to the address 0001. The output port 3 is returned from the transfer table 21 to the transfer controller 6, and at the same time, the reference count is incremented by 1 by the counter increment configuration to 241. That is, the data field of the address 0001 is 3: 241, and this is written to the SRAM via the update buffer. That is, each time an entry in the transfer table 21 is referenced, a counter that counts the number of times of reference is updated for each reference source port.
[0056]
(2) When the destination MAC address does not exist in the table
When the search target MAC address sent from the transfer controller 6 does not exist in the CAM, an unmatch signal is sent from the CAM to the transfer controller 6. In this case, as shown in steps S07 and S13 in FIG. 4, the transfer controller 6 transfers the packet to all ports.
[0057]
(3) MAC address registration
As shown in steps S06 and S12 of FIG. 4, when the transmission source MAC address of the packet does not exist in the transfer table 21, the transfer controller 6 registers this in the transfer table 21. In FIG. 9, 00: 00: 01: 2c: de: 10 is registered in port 1 as an example.
[0058]
The registered MAC address and port sent from the transfer controller 6 are sent to the registration buffer and stored in the CAM free address. In the example of FIG. 9, the CAM writes to address 4 and outputs this address.
[0059]
The address space output from the CAM is 2048 entries of 0x000-0x7FF, but since the counter is independent for each port number, 2 bits are added as the upper address. That is, for the CAM address 0x004, four write addresses 0x004, 0x804, 0x1004, and 0x1804 that need to be initialized are generated. A data field 1: 0 in which the number of times 0 is combined is written to the SRAM via the update buffer. Thus, the new MAC address is added to the transfer table 21.
[0060]
(4) Delete MAC address
Since there is an upper limit (2048 entries in the case of FIG. 9) in the entries of the transfer table 21, the transfer controller 6 manages the aging of the transfer table 21. That is, an entry that has not been used for a long time is erased so that it can be reused.
[0061]
As a result of the aging process, the address determined to be deleted is sent from the transfer controller 6 to the transfer table 21. The CAM erases the entry contents and adds a “vacant” tag to prepare for reuse. At this time, the SRAM need not be operated.
[0062]
Next, processing for obtaining information related to traffic flow from the forwarding table 21 that performs the above-described operation will be described. This is because the software of the management module 8 extracts information on the traffic flow along the processing flow as shown in FIG. According to FIG. 10, when the traffic flow extraction command is activated, the dump process of the forwarding table 21 is performed twice with an interval of Δt. Therefore, the referenced reference at Δt for each transfer destination port and each reference source port. The difference in the number of times is totaled (steps S31 to S35). Then, the occupancy rate for each port is calculated, and the occupancy rate list 22 for each transfer destination port and reference source port in the unit time of the packet switch device 20 is output (steps S26 to S29). Thereby, the information regarding a traffic flow can be obtained easily.
[0063]
As described above, according to the packet switch device 20 of the present embodiment, the same effect as that of the packet switch device 10 of the first embodiment is obtained, and the transfer table of the conventional packet switch is expanded for each transfer destination port. By mounting a referenced counter for each reference source port, it is possible to easily detect a traffic flow including not only the output side but also the input side at low cost.
[0064]
While the embodiments of the present invention have been described above, various modifications and changes can be made to the embodiments of the present invention without departing from the spirit of the present invention. For example, in the above embodiment, the correspondence between the destination address and the forwarding port is explained as one-to-one. However, as in the forwarding table search in the IP layer, the comparison covers a part of the destination address. Of course, even if it is a case, it is the same effect | action. In this case, since the destination address is represented by a network and a mask as in the transfer table 31 shown in FIG. 11, the flow detection unit is for each destination network.
[0065]
【The invention's effect】
As described above, according to the present invention, the forwarding table of the packet switch device is expanded to include a referenced counter, and the referenced counter is incremented according to the destination address of packet forwarding. Can easily detect the traffic flow.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a configuration of a transfer table according to a first embodiment of the present invention.
FIG. 2 is a diagram for explaining one of traffic flows obtained from a forwarding table according to the first embodiment of the present invention.
FIG. 3 is a functional block diagram of the packet switch device according to the first embodiment of the present invention.
FIG. 4 is a flowchart of packet transfer processing of the packet switch device according to the first embodiment of the present invention;
FIG. 5 is a diagram for explaining an operation of a transfer table according to the first embodiment of the present invention;
FIG. 6 is a flowchart when the packet switch device according to the first exemplary embodiment of the present invention extracts a traffic flow from a forwarding table.
FIG. 7 is a diagram illustrating a configuration of a transfer table according to the second embodiment of the present invention.
FIG. 8 is a diagram for explaining one of traffic flows obtained from a forwarding table according to the second embodiment of the present invention.
FIG. 9 is a diagram for explaining an operation of a forwarding table according to the second embodiment of the present invention.
FIG. 10 is a flowchart when the packet switch device according to the second exemplary embodiment of the present invention extracts a traffic flow from a forwarding table.
FIG. 11 is a diagram illustrating the configuration of a forwarding table according to another embodiment of the present invention.
FIG. 12 is a diagram for explaining a packet transfer flow in a conventional store-and-forward type packet switch device;
FIG. 13 is a configuration diagram of traffic flow detection using a protocol analyzer in a conventional packet switch device.
FIG. 14 is a configuration diagram of traffic flow detection using a conventional packet sampling function.
FIG. 15 is a diagram illustrating a configuration of a conventional transfer table.
[Explanation of symbols]
1, 21, 31, 91 Forwarding table
2i port
3i physical layer controller
4i packet buffer
5 Switch fabric
6 Transfer controller (header analysis / destination extraction unit)
7 Counters
8 Management module
9 Power supply / Fan / Environment monitor
10, 20, 90 packet switch device
12,22 Result report
100 Protocol analyzer
110 Sampling device
120 Flow data generator
130 Analyzer

Claims (5)

パケットスイッチ装置におけるトラフィックフロー検出方法であって、
パケットデータの宛先アドレスと、該宛先アドレスに対応する転送先ポート番号、及び該宛先アドレスが参照された回数である被参照回数を組み合わせた要素データを複数記憶している転送テーブルから、前記パケットスイッチ装置に入力されたパケットデータの宛先アドレスを用いて前記要素データを検索する転送テーブル検索ステップと、
当該宛先アドレスが前記転送テーブルに登録されていれば、前記転送テーブルの当該宛先アドレスに対応する要素データの前記被参照回数をインクリメントする被参照回数加算ステップと、
前記パケットスイッチ装置の複数のポートごとに設けられ、該ポートに入出力するパケットデータの数及び大きさを計測するトラフィックカウンタの値及び前記転送テーブルの被参照回数に基づいてトラフィックフローに関する情報を出力する結果出力ステップと、
を有することを特徴とするトラフィックフロー検出方法。
A traffic flow detection method in a packet switch device,
From the transfer table storing a plurality of element data combining a destination address of packet data, a transfer destination port number corresponding to the destination address, and a reference count which is a reference count of the destination address, the packet switch A forwarding table search step for searching for the element data using a destination address of packet data input to the device;
If the destination address is registered in the transfer table, a reference count addition step of incrementing the reference count of element data corresponding to the destination address of the transfer table;
Provided for each of a plurality of ports of the packet switch device, and outputs traffic flow information based on the value of a traffic counter that measures the number and size of packet data input / output to / from the port and the number of times the forwarding table is referenced A result output step,
A traffic flow detection method characterized by comprising:
前記転送テーブルの被参照回数は、前記パケットデータが入力された入力ポートごとに分類されており、
被参照回数加算ステップは、前記パケットデータの宛先アドレス及び前記入力ポートに従って前記転送テーブルの当該宛先アドレスに対応する要素データの当該入力ポートに対応する被参照回数をインクリメントする
ことを特徴とする請求項1記載のトラフィックフロー検出方法。
The number of referenced times in the forwarding table is classified for each input port to which the packet data is input,
The step of adding the number of referenced times increments the number of referenced times corresponding to the input port of the element data corresponding to the destination address of the forwarding table according to the destination address of the packet data and the input port. The traffic flow detection method according to 1.
パケットスイッチ装置に内蔵されるトラフィックフロー検出装置であって、
前記パケットスイッチ装置の複数のポートごとに設けられ、該ポートに入出力するパケットデータの数及び大きさを計測するトラフィックカウンタと、
パケットデータの宛先アドレスと、該宛先アドレスに対応する転送先ポート番号、及び該宛先アドレスが参照された回数である被参照回数を組み合わせた要素データを複数記憶している転送テーブルと、
前記転送テーブルから、前記パケットスイッチ装置に入力されたパケットデータの宛先アドレスを用いて前記要素データを検索する転送テーブル検索手段と、
当該宛先アドレスが前記転送テーブルに登録されていれば、前記転送テーブルの当該宛先アドレスに対応する要素データの前記被参照回数をインクリメントする被参照回数加算手段と、
前記トラフィックカウンタの値及び前記転送テーブルの被参照回数に基づいてトラフィックフローに関する情報を出力する結果出力手段と、
を有することを特徴とするトラフィックフロー検出装置。
A traffic flow detection device built in a packet switch device,
A traffic counter that is provided for each of a plurality of ports of the packet switch device and measures the number and size of packet data input to and output from the ports;
A transfer table storing a plurality of element data combining a destination address of packet data, a transfer destination port number corresponding to the destination address, and a reference count that is a reference count of the destination address;
Transfer table search means for searching the element data using a destination address of packet data input to the packet switch device from the transfer table;
If the destination address is registered in the transfer table, a reference count adding means for incrementing the reference count of the element data corresponding to the destination address of the transfer table;
A result output means for outputting information relating to a traffic flow based on the value of the traffic counter and the number of referenced times in the forwarding table;
A traffic flow detection apparatus comprising:
前記転送テーブルの被参照回数は、前記パケットデータが入力された入力ポートごとに分類されており、
被参照回数加算手段は、前記パケットデータの宛先アドレス及び前記入力ポートに従って前記転送テーブルの当該宛先アドレスに対応する要素データの当該入力ポートに対応する被参照回数をインクリメントする
ことを特徴とする請求項3記載のトラフィックフロー検出装置。
The number of referenced times in the forwarding table is classified for each input port to which the packet data is input,
The number-of-references-adding means increments the number of times of reference corresponding to the input port of element data corresponding to the destination address of the forwarding table according to the destination address of the packet data and the input port. 3. The traffic flow detection device according to 3.
請求項3又は4記載のトラフィックフロー検出装置を有することを特徴とするパケットスイッチ装置。  A packet switch apparatus comprising the traffic flow detection apparatus according to claim 3.
JP2003089130A 2003-03-27 2003-03-27 Traffic flow detection method, traffic flow detection device, and packet switch device Expired - Fee Related JP3967285B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003089130A JP3967285B2 (en) 2003-03-27 2003-03-27 Traffic flow detection method, traffic flow detection device, and packet switch device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003089130A JP3967285B2 (en) 2003-03-27 2003-03-27 Traffic flow detection method, traffic flow detection device, and packet switch device

Publications (2)

Publication Number Publication Date
JP2004297603A JP2004297603A (en) 2004-10-21
JP3967285B2 true JP3967285B2 (en) 2007-08-29

Family

ID=33403082

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003089130A Expired - Fee Related JP3967285B2 (en) 2003-03-27 2003-03-27 Traffic flow detection method, traffic flow detection device, and packet switch device

Country Status (1)

Country Link
JP (1) JP3967285B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006252256A (en) * 2005-03-11 2006-09-21 Nec Soft Ltd Network management system, method and program
JP4751436B2 (en) * 2008-10-21 2011-08-17 株式会社東芝 Communication device
CN106330704B (en) * 2015-06-26 2019-12-06 新华三技术有限公司 Message forwarding method and device

Also Published As

Publication number Publication date
JP2004297603A (en) 2004-10-21

Similar Documents

Publication Publication Date Title
JP4392294B2 (en) Communication statistics collection device
JP4341413B2 (en) PACKET TRANSFER APPARATUS HAVING STATISTICS COLLECTION APPARATUS AND STATISTICS COLLECTION METHOD
JP5958570B2 (en) Network system, controller, switch, and traffic monitoring method
US8089895B1 (en) Adaptive network flow analysis
US8059551B2 (en) Method for source-spoofed IP packet traceback
JP5050781B2 (en) Malware detection device, monitoring device, malware detection program, and malware detection method
US6115379A (en) Unicast, multicast, and broadcast method and apparatus
US8059658B1 (en) Method and system for automatic expansion and contraction of IP host forwarding database
US20030050762A1 (en) Method and apparatus for measuring protocol performance in a data communication network
JP5017440B2 (en) Network control apparatus and control method thereof
JP2006352831A (en) Network controller and method of controlling the same
JP2008092118A (en) Layer 2 loop detection device, layer 2 loop detection system, and layer 2 loop detection method
WO2020182085A1 (en) Transmission method and device for message
US8654643B2 (en) Wide field indexing for packet tracking
JP3967285B2 (en) Traffic flow detection method, traffic flow detection device, and packet switch device
CN106878106A (en) A kind of accessible detecting method and device
US20050111447A1 (en) Technique for tracing source addresses of packets
WO2021027420A1 (en) Method and device used for transmitting data
CN112073256A (en) Packet loss processing method, device, equipment and machine-readable storage medium
Cisco NetFlow Switching Overview
CN113556345A (en) Message processing method, device, equipment and medium
JP3376941B2 (en) Router device
JP3754045B2 (en) Forwarding table
US20230113518A1 (en) Distributed Network Flow Record
KR100542407B1 (en) IP address information processing method using hash key and router thereby

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050119

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061212

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070208

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: 20070522

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070530

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100608

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110608

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120608

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees