JP2009296158A - Communication data statistical apparatus and communication data statistical method - Google Patents

Communication data statistical apparatus and communication data statistical method Download PDF

Info

Publication number
JP2009296158A
JP2009296158A JP2008145986A JP2008145986A JP2009296158A JP 2009296158 A JP2009296158 A JP 2009296158A JP 2008145986 A JP2008145986 A JP 2008145986A JP 2008145986 A JP2008145986 A JP 2008145986A JP 2009296158 A JP2009296158 A JP 2009296158A
Authority
JP
Japan
Prior art keywords
flow
data
identification information
address
communication data
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
Application number
JP2008145986A
Other languages
Japanese (ja)
Inventor
Yusuke Shomura
雄介 正村
Yoshinori Watanabe
義則 渡辺
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.)
Alaxala Networks Corp
Original Assignee
Alaxala Networks 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 Alaxala Networks Corp filed Critical Alaxala Networks Corp
Priority to JP2008145986A priority Critical patent/JP2009296158A/en
Publication of JP2009296158A publication Critical patent/JP2009296158A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technique capable of recording and updating statistical information of a flow at high speed, even in a large-scale network. <P>SOLUTION: The communication data statistical apparatus includes: a receiving part for receiving a packet in which flow identification information is recorded; an address determination part for determining one address inside a memory, on the basis of the flow identification information of the received packet, while allowing the determination of the same address for different flow identification information; a data read part for reading at least two prescribed number of flow data continuously from the determined address; and an updating part for adding the number of packets contained in the flow data and rewriting the flow data to the memory, when the flow data having the flow identification information matches the flow identification information in the received packet are present in the plurality of read flow data. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、ネットワークを流れる通信データの統計をとる技術に関する。   The present invention relates to a technique for collecting statistics of communication data flowing through a network.

インターネットは重要な社会インフラとして定着しており、従来のベストエフォート型のデータ通信だけでなく、音声や動画、基幹業務のトランザクションデータなど、通信の品質の保証が必要なデータの通信も行われつつある。また、ADSL(Asymmetric Digital Subscriber Line)やFTTH(Fiber To The Home)技術の普及によってアクセス回線はブロードバンド化され、これに伴い、通信されるデータ量も増大している。   The Internet has become established as an important social infrastructure, and not only conventional best-effort data communication, but also communication of data that requires communication quality assurance such as voice, video, and transaction data for core business is being performed. is there. In addition, access lines have become broadband due to the spread of ADSL (Asymmetric Digital Subscriber Line) and FTTH (Fiber To The Home) technologies, and the amount of data to be communicated has increased accordingly.

このような背景から、通信事業者やISP(インターネットサービスプロバイダ)はネットワーク内の通信の状態を把握するため、ネットワークを流れる通信データの統計をとる技術を必要としている。中でも、通信データの送信元や宛先、利用されるアプリケーション、品質レベルなどにより分類されるフロー毎に通信データの統計をとる技術に対する要求が高い。   From such a background, telecommunications carriers and ISPs (Internet service providers) need a technique for collecting statistics of communication data flowing through the network in order to grasp the state of communication in the network. In particular, there is a high demand for a technique for collecting communication data statistics for each flow classified according to the transmission source and destination of communication data, the application used, the quality level, and the like.

大規模なネットワークでは、その中を流れるフローの数は膨大となり、フローの統計情報を収集する装置には大容量のメモリが必要となる。また、メモリが大容量になれば、記憶された統計情報を高速に検索や更新が可能なメモリ管理方式が必要となる(例えば、非特許文献1参照)。   In a large-scale network, the number of flows flowing in the network becomes enormous, and a device that collects flow statistical information requires a large-capacity memory. Further, if the memory becomes large in capacity, a memory management method capable of searching and updating stored statistical information at high speed is required (for example, see Non-Patent Document 1).

Kenichi Yoshida, Satoshi Katsuno, Shigehiro Ano, Katsuyuki Yamazaki, Masato Tsuru: Stream Mining for Network Management, IEICE, vol.E89-B, no.6, pp.1774-1780 (2006)Kenichi Yoshida, Satoshi Katsuno, Shigehiro Ano, Katsuyuki Yamazaki, Masato Tsuru: Stream Mining for Network Management, IEICE, vol.E89-B, no.6, pp.1774-1780 (2006)

このような問題を考慮し、本発明が解決しようとする課題は、大規模なネットワークにおいても高速にフローの統計情報を記録・更新可能な技術を提供することにある。   In view of such problems, the problem to be solved by the present invention is to provide a technique capable of recording and updating flow statistical information at high speed even in a large-scale network.

本発明は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の形態又は適用例として実現することが可能である。   SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented as the following forms or application examples.

[適用例1]ネットワークを流れる通信データの統計をとる通信データ統計装置であって、パケットのフローを識別可能なフロー識別情報と、該フローに属するパケットの数を示すパケット数とを少なくとも含むフローデータを複数記憶するメモリと、フロー識別情報を含むパケットを受信する受信部と、異なるフロー識別情報に対して同一のアドレスが決定されることを許容しつつ、前記受信したパケットのフロー識別情報に基づいて、前記メモリ内のアドレスを一つ決定するアドレス決定部と、前記メモリの前記決定されたアドレスから連続して複数のフローデータを読み出すデータ読出部と、前記受信したパケット中のフロー識別情報に一致するフロー識別情報を有するフローデータが前記読み出した複数のフローデータの中に存在する場合に、該フローデータに含まれるパケット数を更新して、前記メモリに該フローデータを書き戻す更新部とを備える通信データ統計装置。 Application Example 1 A communication data statistic apparatus that takes statistics of communication data flowing through a network, and includes at least flow identification information capable of identifying a packet flow and a packet number indicating the number of packets belonging to the flow A memory that stores a plurality of data, a receiving unit that receives a packet including flow identification information, and the flow identification information of the received packet while allowing the same address to be determined for different flow identification information Based on an address determination unit for determining one address in the memory, a data reading unit for reading a plurality of flow data continuously from the determined address of the memory, and flow identification information in the received packet The flow data having the flow identification information that coincides with is present in the plurality of read flow data Case, to update the number of packets included in the flow data, communication data statistics apparatus comprising an update unit to write back the flow data into the memory.

このような通信データ統計装置では、メモリから複数のフローデータを連続して読み出し、これらのフローデータの中から、受信したパケットと同一のフロー識別情報を有するフローデータを検索する。そして、受信したパケットと同一のフロー識別情報を有するフローデータが存在すれば、そのフローデータのパケット数を更新する。このような通信データ統計装置であれば、メモリから連続して複数のフローデータを読み出すので、異なるアドレスから複数のフローデータを読み出すよりも、効率的にフローデータを読み出すことができる。この結果、大規模なネットワークにおいても高速にフローの統計情報を記録・更新することが可能になる。   In such a communication data statistical device, a plurality of flow data are continuously read from the memory, and the flow data having the same flow identification information as the received packet is searched from these flow data. If flow data having the same flow identification information as the received packet exists, the number of packets of the flow data is updated. With such a communication data statistical device, a plurality of flow data is read continuously from the memory, so that the flow data can be read more efficiently than reading a plurality of flow data from different addresses. As a result, it is possible to record and update flow statistical information at high speed even in a large-scale network.

[適用例2]適用例1に記載の通信データ統計装置であって、前記更新部は、前記受信したパケット中のフロー識別情報に一致するフロー識別情報を有するフローデータが前記読み出した複数のフローデータの中に存在しない場合に、前記複数のフローデータの中から、上書きの対象となるフローデータを所定の基準に基づき選択し、該選択されたフローデータを、前記受信したパケット中のフロー識別情報に基づいて上書きする通信データ統計装置。 [Application Example 2] The communication data statistics device according to Application Example 1, wherein the update unit includes a plurality of flows read out by flow data having flow identification information that matches flow identification information in the received packet. When not existing in the data, the flow data to be overwritten is selected from the plurality of flow data based on a predetermined criterion, and the selected flow data is selected as the flow identification in the received packet. Communication data statistics device that overwrites based on information.

このような通信データ統計装置では、メモリから読み出した複数のフローデータの中に、受信したパケットのフロー識別情報に一致するフロー識別情報を有するフローデータが存在しなかった場合であっても、これらの複数のフローデータの中から、上書きの対象とするフローデータを選択する。そのため、例えば、新規のフローを受信した場合などに、アドレス決定部によって決定されたアドレスが、他のフローと重複してしまった場合であっても、新規のフローの記録先を効率的に決定することができる。   In such a communication data statistical device, even if there is no flow data having flow identification information that matches the flow identification information of the received packet among the plurality of flow data read from the memory, these The flow data to be overwritten is selected from the plurality of flow data. Therefore, for example, when a new flow is received, even when the address determined by the address determination unit overlaps with another flow, the recording destination of the new flow is determined efficiently. can do.

[適用例3]適用例2に記載の通信データ統計装置であって、前記更新部は、前記複数のフローデータのうち、記録されたパケット数が最も少ないフローデータを、上書きの対象として選択する通信データ統計装置。このような通信データ統計装置であれば、出現頻度の少ないフローのフローデータを、新規のフローのフローデータで上書きすることができる。 [Application Example 3] The communication data statistical device according to Application Example 2, wherein the update unit selects flow data having the smallest number of recorded packets among the plurality of flow data as an overwriting target. Communication data statistics device. With such a communication data statistical device, it is possible to overwrite the flow data of a flow with a low appearance frequency with the flow data of a new flow.

[適用例4]適用例1ないし適用例3のいずれかに記載の通信データ統計装置であって、前記データ読出部は、前記2以上の所定個数のフローデータをバースト転送によって前記メモリから読み出す通信データ統計装置。このような通信データ統計装置であれば、メモリのバースト転送機能を利用することで複数のフローデータを高速に読み出すことができる。 Application Example 4 In the communication data statistics device according to any one of Application Examples 1 to 3, the data reading unit is a communication that reads the two or more predetermined number of flow data from the memory by burst transfer. Data statistics device. With such a communication data statistics device, a plurality of flow data can be read at high speed by using the burst transfer function of the memory.

[適用例5]適用例1ないし適用例4のいずれかに記載の通信データ統計装置であって、前記アドレス決定部は、前記受信したパケットのフロー識別情報のハッシュ値を求め、該ハッシュ値に対応したアドレスを一つ決定する通信データ統計装置。このような通信データ統計装置であれば、フロー識別情報のハッシュ値からアドレスを決定するので、フローの種類が膨大であっても、有限個のアドレスのうち、一つのアドレスを決定することができる。 Application Example 5 In the communication data statistics device according to any one of Application Examples 1 to 4, the address determination unit obtains a hash value of the flow identification information of the received packet, and uses the hash value as the hash value. Communication data statistics device that determines one corresponding address. With such a communication data statistical device, the address is determined from the hash value of the flow identification information, so even if the type of flow is enormous, one address can be determined from a finite number of addresses. .

[適用例6]適用例1ないし適用例5のいずれかに記載の通信データ統計装置であって、前記フローテーブルには、前記所定個数のフローデータを含むブロックの単位で、前記フローデータが記録されており、前記データ読出部は、前記決定されたアドレスに対応するブロックから、前記所定個数のフローデータをまとめて読み出す通信データ統計装置。このような通信データ統計装置であれば、ブロックという大きな単位でフローデータの更新を行うことができるので、メモリ空間を有効に利用することが可能になる。 [Application Example 6] The communication data statistical device according to any one of Application Examples 1 to 5, wherein the flow data is recorded in the flow table in units of blocks including the predetermined number of flow data. The communication data statistics device, wherein the data reading unit collectively reads the predetermined number of flow data from the block corresponding to the determined address. With such a communication data statistics device, the flow data can be updated in a large unit called a block, so that the memory space can be used effectively.

なお、本発明は、上述した通信データ統計装置としての構成のほか、通信データ統計方法や、コンピュータプログラムとしても構成することができる。かかるコンピュータプログラムは、コンピュータが読取可能な記録媒体に記録されていてもよい。記録媒体としては、例えば、フレキシブルディスクやCD−ROM、DVD−ROM、光磁気ディスク、メモリカード、ハードディスク等の種々の媒体を利用することができる。   The present invention can be configured as a communication data statistics method or a computer program in addition to the configuration as the communication data statistics device described above. Such a computer program may be recorded on a computer-readable recording medium. As the recording medium, for example, various media such as a flexible disk, a CD-ROM, a DVD-ROM, a magneto-optical disk, a memory card, and a hard disk can be used.

以下、本発明の実施の形態をいくつかの実施例に基づき説明する。
A.第1実施例:
図1は、第1実施例としての通信データ統計装置104を含むネットワーク構成の一例を示す図である。図示するように、本実施例のネットワーク構成には、それぞれ相互に接続されてパケットの中継を行うルータ101a〜101cや、ルータ101bに接続されたサーバ102a、ルータ101cに接続されたサーバ102b、ルータ101aに接続された通信データ統計装置104、ルータ101aに接続された端末装置103a〜103c、が含まれている。ルータ101aは、ミラーリング技術あるいはRFC3176に規定されたsFlow技術を用いることで、中継を行ったパケット(トラフィック)のコピーを通信データ統計装置104に送信する。
Hereinafter, embodiments of the present invention will be described based on several examples.
A. First embodiment:
FIG. 1 is a diagram showing an example of a network configuration including a communication data statistics device 104 as the first embodiment. As shown in the figure, the network configuration of this embodiment includes routers 101a to 101c that are connected to each other and relay packets, server 102a connected to router 101b, server 102b connected to router 101c, router The communication data statistics device 104 connected to the terminal 101a and the terminal devices 103a to 103c connected to the router 101a are included. The router 101a transmits a copy of the relayed packet (traffic) to the communication data statistics device 104 by using the mirroring technique or the sFlow technique defined in RFC3176.

図2は、本実施例の通信データ統計装置104の概略構成を示すブロック図である。通信データ統計装置104は、ネットワークを流れる通信データの統計をとる装置である。図示するように、本実施例の通信データ統計装置104は、ルータ101aから送信されたパケットを受信するパケット受信部201と、パケット受信部201が受信したパケットの解析を行うパケット解析部202と、パケット解析部202によって解析されたパケットについて統計処理を行う統計処理部204と、統計処理の結果が記録されるフローテーブル221を保持するメモリ222と、統計処理の結果を出力する統計情報出力部203と、統計処理部204や統計情報出力部203に対する制御を行う制御部212とを備えている。本実施例では、メモリ222として、バースト転送機能を備えるSDRAMを用いる。ただし、メモリの種類はSDRAMに限らず、例えば、アクセスのレイテンシを低減させたRLDRAM等を用いることができる。本実施例では、パケット受信部201は、ルータ101aから送信されたパケットを受信するが、パケット受信部201は、ネットワークを流れるパケットを横取り(キャプチャ)することとしてもよい。   FIG. 2 is a block diagram illustrating a schematic configuration of the communication data statistics device 104 of the present embodiment. The communication data statistics device 104 is a device that takes statistics of communication data flowing through the network. As shown in the figure, the communication data statistics device 104 of the present embodiment includes a packet receiving unit 201 that receives a packet transmitted from the router 101a, a packet analysis unit 202 that analyzes a packet received by the packet receiving unit 201, A statistical processing unit 204 that performs statistical processing on the packet analyzed by the packet analysis unit 202, a memory 222 that holds a flow table 221 in which the result of statistical processing is recorded, and a statistical information output unit 203 that outputs the result of statistical processing And a control unit 212 that controls the statistical processing unit 204 and the statistical information output unit 203. In this embodiment, an SDRAM having a burst transfer function is used as the memory 222. However, the type of memory is not limited to SDRAM, and for example, RLDRAM with reduced access latency can be used. In the present embodiment, the packet receiving unit 201 receives a packet transmitted from the router 101a, but the packet receiving unit 201 may intercept (capture) a packet flowing through the network.

パケット受信部201と、パケット解析部202と、統計処理部204と、統計情報出力部203と、制御部212とは、それぞれ、FPGA(Field Programmable Gate Array)によって構成されている。これらは、全ての機能が1つのFPGAによって構成されていてもよいし、個別のFPGAによって構成されていてもよい。また、FPGAではなく、ASIC(Application Specific Integrated Circuit)によって構成されていてもよい。   The packet receiving unit 201, the packet analyzing unit 202, the statistical processing unit 204, the statistical information output unit 203, and the control unit 212 are each configured by an FPGA (Field Programmable Gate Array). As for these, all the functions may be comprised by one FPGA, and may be comprised by separate FPGA. Further, not an FPGA but an ASIC (Application Specific Integrated Circuit) may be used.

パケット解析部202は、パケット受信部201によって受信したパケットから、フロー識別子の値や、パケットの受信時刻、バイト数、TCPのフラグ情報等を抽出し、これらの抽出された情報を統計処理部204へ送信する。フロー識別子は、パケットのヘッダに記録された情報である。フロー識別子としては、例えば、VLAN ID(VID)や、送信元MACアドレス、宛先MACアドレス、送信元IPアドレス(SIP)、宛先IPアドレス(DIP)、上位プロトコル(PRT)、送信元ポート番号(SPT)、宛先ポート番号(DPT)が挙げられる。   The packet analysis unit 202 extracts the value of the flow identifier, the packet reception time, the number of bytes, the TCP flag information, and the like from the packet received by the packet reception unit 201, and the statistical processing unit 204 extracts these extracted information. Send to. The flow identifier is information recorded in the header of the packet. Examples of the flow identifier include a VLAN ID (VID), a source MAC address, a destination MAC address, a source IP address (SIP), a destination IP address (DIP), a higher level protocol (PRT), and a source port number (SPT). ), Destination port number (DPT).

統計処理部204は、パケット解析部202から受信したフロー識別子の値に基づいて、パケットのフローを分析し、分析されたフロー毎にパケット数の集計を行う。集計の結果は、統計処理部204に接続されたメモリ222が有するフローテーブル221に記録する。この統計処理部204の詳細な構成については後述する。   The statistical processing unit 204 analyzes the flow of packets based on the value of the flow identifier received from the packet analysis unit 202, and totals the number of packets for each analyzed flow. The result of the aggregation is recorded in the flow table 221 included in the memory 222 connected to the statistical processing unit 204. The detailed configuration of the statistical processing unit 204 will be described later.

制御部212には、管理端末211が接続される。制御部212は、この管理端末211の指示に従って、統計処理部204や統計情報出力部203に対する種々の設定を行う。管理端末211と制御部212とは、ネットワークによって接続されてもよいし、RS−232CやUSB等のインタフェースによって接続されてもよい。   A management terminal 211 is connected to the control unit 212. The control unit 212 performs various settings for the statistical processing unit 204 and the statistical information output unit 203 in accordance with instructions from the management terminal 211. The management terminal 211 and the control unit 212 may be connected by a network or may be connected by an interface such as RS-232C or USB.

統計情報出力部203は、統計処理部204から受信した統計情報を外部の装置に出力する。統計情報の出力は、ネットワークインタフェースやPCIバスなど、事前に設定された任意のインタフェースを介して行う。ネットワークインタフェースによって出力する際には、制御部212を経由して管理者により設定された、宛先IPアドレス、送信元IPアドレスを用いて送信パケットを生成する。なお、統計情報出力部203は、所定のインタフェースに対して統計情報を出力する以外にも、通信データ統計装置104に接続された表示装置や印刷装置に対して、統計情報を出力することとしてもよい。   The statistical information output unit 203 outputs the statistical information received from the statistical processing unit 204 to an external device. The statistical information is output via an arbitrary interface set in advance, such as a network interface or a PCI bus. When outputting via the network interface, a transmission packet is generated using the destination IP address and the source IP address set by the administrator via the control unit 212. Note that the statistical information output unit 203 may output statistical information to a display device or printing device connected to the communication data statistical device 104 in addition to outputting statistical information to a predetermined interface. Good.

図3は、フローテーブル221の構成を示す図である。フローテーブル116は、「フローエントリ番号」と「フロー識別情報」と「統計情報」とを含んでいる。「フローエントリ番号」は、フローテーブル116の各エントリを一意に識別する識別子である。「フロー識別情報」には、上述したフロー識別子の各値(VID,DIP,DIP,PRT,SPT,DPT)やその他の情報が格納される。その他の情報には、必要に応じて、送信元MACアドレス、宛先MACアドレス等、パケットのヘッダに含まれる情報が格納される。フローテーブル116に格納するフロー識別子の種類は、任意に設定可能である。「統計情報」には、パケット数、バイト数、開始時刻、最終更新時刻、その他の情報からなる。バイト数は受信したパケットの積算バイト数を表し、開始時刻は、そのフローに属するパケットが最初に到着した時刻を表す。また、最終更新時刻は、そのフローに属するパケットが最後に到着した時刻を表す。その他の情報には、必要に応じて、TCPフラグのうちのSYNフラグが立っているパケットの数や、あるフロー識別子の出現した種類数(異なり数)等が格納される。なお、以下では、フローテーブル221に記録された「フロー識別情報」と「統計情報」とをまとめて、「フローデータ」という。   FIG. 3 is a diagram illustrating the configuration of the flow table 221. The flow table 116 includes “flow entry number”, “flow identification information”, and “statistical information”. The “flow entry number” is an identifier that uniquely identifies each entry in the flow table 116. The “flow identification information” stores each value (VID, DIP, DIP, PRT, SPT, DPT) of the flow identifier described above and other information. In other information, information included in the header of the packet, such as a source MAC address and a destination MAC address, is stored as necessary. The type of the flow identifier stored in the flow table 116 can be arbitrarily set. “Statistical information” includes the number of packets, the number of bytes, the start time, the last update time, and other information. The number of bytes represents the accumulated number of bytes of the received packet, and the start time represents the time when the packet belonging to the flow first arrived. The last update time represents the time when the packet belonging to the flow has arrived last. The other information stores the number of packets in which the SYN flag of the TCP flags is set, the number of types (different numbers) in which a certain flow identifier appears, as necessary. Hereinafter, “flow identification information” and “statistical information” recorded in the flow table 221 are collectively referred to as “flow data”.

図4は、統計処理部204の詳細な構成を示す図である。統計処理部204は、解析結果受信部501、格納データ抽出部502、アドレス決定部503、データ比較部504、統計更新部505、閾値判定部506、データ書込み部507、フローデータ出力部508から構成される。   FIG. 4 is a diagram illustrating a detailed configuration of the statistical processing unit 204. The statistical processing unit 204 includes an analysis result reception unit 501, a stored data extraction unit 502, an address determination unit 503, a data comparison unit 504, a statistical update unit 505, a threshold determination unit 506, a data writing unit 507, and a flow data output unit 508. Is done.

解析結果受信部501は、パケット解析部202から、フロー識別子の値(SIP、DIP、PRT、SPT、DPT等)や、パケット受信時刻、バイト数、TCPフラグ情報等を受信する。そして、このうち、フロー識別子の値を、格納データ抽出部502に転送し、他の情報を統計更新部505に転送する。   The analysis result receiving unit 501 receives a flow identifier value (SIP, DIP, PRT, SPT, DPT, etc.), packet reception time, number of bytes, TCP flag information, and the like from the packet analysis unit 202. Among them, the value of the flow identifier is transferred to the stored data extraction unit 502, and other information is transferred to the statistics update unit 505.

格納データ抽出部502は、解析結果受信部501から受信したフロー識別子の値の中から、フローテーブル221に格納すべきフロー識別子の値を抽出する。格納データ抽出部502は、フロー識別子の値を抽出すると、抽出したフロー識別子の値を、アドレス決定部503とデータ比較部504とに送信する。なお、フローテーブル221に格納すべきフロー識別子の種類は、送信元IPアドレス毎の統計情報を収集する場合はSIPのみを抽出するという様に、統計の目的に応じて管理者により制御部212を経由して事前に設定される。   The stored data extraction unit 502 extracts the value of the flow identifier to be stored in the flow table 221 from the value of the flow identifier received from the analysis result receiving unit 501. When the stored data extraction unit 502 extracts the flow identifier value, the stored data extraction unit 502 transmits the extracted flow identifier value to the address determination unit 503 and the data comparison unit 504. It should be noted that the type of flow identifier to be stored in the flow table 221 is that the administrator controls the control unit 212 according to the purpose of statistics, such as extracting only SIP when collecting statistical information for each source IP address. Pre-configured via.

アドレス決定部503は、格納データ抽出部502から受信したフロー識別子の値に基づいて、受信したパケットの統計情報を記録するフローテーブル221のエントリ番号を決定する。具体的には、格納データ抽出部502から受信したフロー識別子の値のハッシュ値をハッシュ関数によって求め、このハッシュ値をエントリ番号に対応付ける(マッピングする)ことで、エントリ番号の決定を行う。エントリ番号を決定すると、更に、アドレス決定部503は、このエントリ番号に対応するメモリ222のアドレスを求める。例えば、1エントリに格納されるフローデータの容量をLバイト、フローテーブル221が記憶されているアドレスまでのオフセットアドレスをαとすれば、ここで算出されるアドレスは、(α+エントリ番号*L)となる。なお、ハッシュ関数とは、あるデータが与えられたときに、そのデータを代表する数値を得る関数のことをいう。このハッシュ関数では、もとのデータから、ある一定範囲の数値が生成される。そのため、本実施例では、異なるフロー識別子の値であっても、ハッシュ値を求めた結果、同一のエントリ番号(つまり、同一のアドレス)が算出される場合がある。フロー識別子の値の種類は膨大である一方、メモリ222の容量の関係によりアドレスやエントリの数は制限されるためである。   Based on the value of the flow identifier received from the stored data extraction unit 502, the address determination unit 503 determines the entry number of the flow table 221 that records the statistical information of the received packet. Specifically, the hash number of the flow identifier value received from the stored data extraction unit 502 is obtained by a hash function, and this hash value is associated (mapped) with the entry number to determine the entry number. When the entry number is determined, the address determination unit 503 further obtains the address of the memory 222 corresponding to the entry number. For example, if the capacity of the flow data stored in one entry is L bytes and the offset address to the address where the flow table 221 is stored is α, the calculated address is (α + entry number * L). It becomes. Note that the hash function refers to a function that obtains a numerical value representing data when given data is given. In this hash function, a certain range of numerical values is generated from the original data. For this reason, in the present embodiment, even if the values are different flow identifiers, the same entry number (that is, the same address) may be calculated as a result of obtaining the hash value. This is because the number of flow identifier values is enormous, while the number of addresses and entries is limited due to the capacity of the memory 222.

アドレス決定部503は、メモリ222のアドレスを求めると、このアドレスをデータ比較部504に通知するとともに、メモリ222に対して、このアドレスから連続した4つ分のフローデータを読み込む信号を送信する。この読み込み信号によって、連続した4つのフローデータが、メモリ222からデータ比較部504にバースト転送される。なお、このように本実施例では、1つのアドレスを決定すると、このアドレスから連続して4つ分のフローデータを読み込むため、アドレス決定部503によって決定されるエントリ番号は、エントリ番号の最大値をNとすると、1から(N−3)までのいずれかの値をとることになる。   When the address determination unit 503 obtains the address of the memory 222, the address determination unit 503 notifies the address to the data comparison unit 504, and transmits a signal for reading four pieces of flow data continuous from the address to the memory 222. In response to this read signal, four continuous flow data are burst transferred from the memory 222 to the data comparison unit 504. In this way, in this embodiment, when one address is determined, four flow data are read continuously from this address, so the entry number determined by the address determination unit 503 is the maximum entry number. If N is N, one of the values from 1 to (N−3) is taken.

データ比較部504は、フローテーブル221から受信した4つのフローデータについて、それぞれ、そのフローデータに含まれるフロー識別子の値と、格納データ抽出部502から受信したフロー識別子の値とを比較する。この比較の結果、フローデータに含まれるフロー識別子の値と、格納データ抽出部502から受信したフロー識別子の値とがすべて一致するフローデータが存在する場合には(換言すれば、受信したパケットのフローが既出のフローである場合には)、データ比較部504は、そのフローデータを統計更新部505に送信し、更に、このフローデータが記録されていたエントリのアドレスをデータ書込み部507に送信する。例えば、1エントリに格納されるフローデータの容量をLバイト、フローテーブル221が記憶されているアドレスまでのオフセットアドレスをαとすれば、R個目のエントリのアドレスは、(α+R*L)と算出することができる。   For each of the four flow data received from the flow table 221, the data comparison unit 504 compares the value of the flow identifier included in the flow data with the value of the flow identifier received from the stored data extraction unit 502. As a result of this comparison, if there is flow data in which all the flow identifier values included in the flow data match the flow identifier values received from the stored data extraction unit 502 (in other words, the received packet When the flow is an existing flow), the data comparison unit 504 transmits the flow data to the statistics update unit 505, and further transmits the address of the entry in which the flow data is recorded to the data writing unit 507. To do. For example, if the capacity of the flow data stored in one entry is L bytes and the offset address to the address where the flow table 221 is stored is α, the address of the Rth entry is (α + R * L). Can be calculated.

フローテーブル221から受信した4つのフローデータのすべてについて、そのフローデータに含まれるフロー識別子と、格納データ抽出部502から受信したフロー識別子とが一致しない場合には(換言すれば、受信したパケットのフローが新規のフローである場合には)、データ比較部504は、フローデータを読み込んだ4つのエントリの中から上書きの対象とするエントリを1つ選択する。本実施例では、統計情報に最も少ないパケット数が記録されたエントリを、上書きするエントリとして選択する。上書きするエントリを選択すると、データ比較部504は、選択したエントリのフローデータに新規のデータを代入する。具体的には、フロー識別情報には、格納データ抽出部502から受信したフロー識別子の値を代入し、統計情報のパケット数には、「0」を代入する。こうして、新規のフローデータを作成すると、データ比較部504は、作成したフローデータを統計更新部505に送信し、そのエントリのアドレスをデータ書込み部507に送信する。   For all four flow data received from the flow table 221, if the flow identifier included in the flow data does not match the flow identifier received from the stored data extraction unit 502 (in other words, the received packet When the flow is a new flow), the data comparison unit 504 selects one entry to be overwritten from the four entries from which the flow data has been read. In this embodiment, an entry in which the smallest number of packets is recorded in the statistical information is selected as an entry to be overwritten. When the entry to be overwritten is selected, the data comparison unit 504 substitutes new data for the flow data of the selected entry. Specifically, the value of the flow identifier received from the stored data extraction unit 502 is substituted for the flow identification information, and “0” is substituted for the number of packets of statistical information. When new flow data is created in this way, the data comparison unit 504 transmits the created flow data to the statistics update unit 505 and transmits the address of the entry to the data writing unit 507.

統計更新部505は、データ比較部504からフローデータを受信し、解析結果受信部501からパケット受信時刻、バイト数、TCPフラグ情報等を受信する。統計更新部505は、これらのデータを受信すると、まず、フローデータのうち、統計情報中のパケット数を1つ、カウントアップする。また、統計更新部505は、統計情報に記録された各値(積算バイト数やフロー開始時刻、最終更新時刻、SYNフラグがセットされているパケットの数)を、解析結果受信部501から受信した情報に基づいて更新する。具体的には、積算バイト数に、今回受信したパケットのバイト数を加算し、最終更新時刻を現在の時刻に更新する。また、受信したパケットのヘッダに、SYNフラグがセットされていれば、SYNフラグがセットされているパケットの数を加算する。統計更新部505は、このようにして更新したフローデータを閾値判定部506へ送信する。   The statistics updating unit 505 receives the flow data from the data comparison unit 504 and receives the packet reception time, the number of bytes, TCP flag information, and the like from the analysis result receiving unit 501. When receiving the data, the statistical updating unit 505 first counts up the number of packets in the statistical information by one from the flow data. Further, the statistical update unit 505 receives each value (the number of accumulated bytes, the flow start time, the last update time, and the number of packets in which the SYN flag is set) recorded in the statistical information from the analysis result receiving unit 501. Update based on information. Specifically, the number of bytes of the packet received this time is added to the accumulated number of bytes, and the last update time is updated to the current time. If the SYN flag is set in the header of the received packet, the number of packets for which the SYN flag is set is added. The statistics update unit 505 transmits the flow data updated in this way to the threshold determination unit 506.

閾値判定部506は、統計更新部505から受信したフローデータ中のパケット数と、所定の閾値とを比較する。この比較の結果、パケット数が閾値を越えている場合には、閾値判定部506は、統計更新部505によって更新されたフローデータをフローデータ出力部508へと出力する。フローデータ出力部508は、閾値判定部506からフローデータを受信すると、そのフローデータを統計情報出力部203に送信する。閾値判定部506は、フローデータをフローデータ出力部508に出力すると、出力対象となったフローデータの統計情報をゼロリセットする。そして、このように更新したフローデータをデータ書込み部507に送信する。パケット数が閾値を越えていない場合には、閾値判定部506は、統計更新部505から受信したフローデータをそのままデータ書込み部507に送信する。上述した閾値は、制御部212を経由して管理者により適宜設定される。   The threshold determination unit 506 compares the number of packets in the flow data received from the statistics update unit 505 with a predetermined threshold. As a result of this comparison, when the number of packets exceeds the threshold, the threshold determination unit 506 outputs the flow data updated by the statistics update unit 505 to the flow data output unit 508. When the flow data output unit 508 receives flow data from the threshold determination unit 506, the flow data output unit 508 transmits the flow data to the statistical information output unit 203. When the threshold value determination unit 506 outputs the flow data to the flow data output unit 508, the threshold value determination unit 506 resets the statistical information of the flow data to be output to zero. Then, the flow data updated in this way is transmitted to the data writing unit 507. When the number of packets does not exceed the threshold, the threshold determination unit 506 transmits the flow data received from the statistics update unit 505 to the data writing unit 507 as it is. The above-described threshold is appropriately set by the administrator via the control unit 212.

データ書込み部507は、閾値判定部506から受信したフローデータを、フローテーブル中の、データ比較部504から受信したメモリアドレスに書き込む。こうすることで、受信パケットが既出のフローであれば、そのフローに対応するエントリのフローデータが更新されてメモリに書き戻され、受信パケットが新規のフローであれば、データ比較部504によって選択されたエントリに、新規のフローデータが上書きされることになる。このように、本実施例の通信データ統計装置104は、メモリ222からフローデータを読み込む際には、連続して複数のフローデータを読み込むが、メモリ222にフローデータを書き込む際には、新規あるいは更新したフローデータのみを書き込むのである。   The data writing unit 507 writes the flow data received from the threshold determination unit 506 to the memory address received from the data comparison unit 504 in the flow table. In this way, if the received packet is an existing flow, the flow data of the entry corresponding to that flow is updated and written back to the memory, and if the received packet is a new flow, the data comparison unit 504 selects it. The new flow data is overwritten on the entered entry. As described above, the communication data statistics device 104 according to the present embodiment reads a plurality of flow data continuously when reading the flow data from the memory 222. Only the updated flow data is written.

続いて、上述したアドレス決定部503とデータ比較部504とで行われる処理を、参考までにフローチャートを用いて詳細に説明する。
図5は、アドレス決定部503とデータ比較部504とで行われる処理のフローチャートである。図示するように、まず、アドレス決定部503は、格納データ抽出部502から、受信パケットのフロー識別子の値を受信すると、そのフロー識別子の値とハッシュ関数とに基づいて、1つのハッシュ値を求め、このハッシュ値にマッピングされたエントリ番号を求める(ステップS100)。エントリ番号を求めると、アドレス決定部503は、そのエントリ番号に対応するメモリアドレスを算出する(ステップS110)。例えば、1エントリに格納されるフローデータの容量がLバイト、フローテーブル221が記憶されているアドレスまでのオフセットアドレスをαとすれば、ここで算出されるアドレスは、(α+エントリ番号*L)となる。アドレス決定部503は、メモリアドレスを算出すると、メモリ222に対して、そのメモリアドレスから4つ分のフローデータをバースト転送させる(ステップS120)。転送されたフローデータは、データ比較部504によって読み込まれる。
Next, processing performed by the address determination unit 503 and the data comparison unit 504 described above will be described in detail using a flowchart for reference.
FIG. 5 is a flowchart of processing performed by the address determination unit 503 and the data comparison unit 504. As shown in the figure, first, when the address determination unit 503 receives the value of the flow identifier of the received packet from the stored data extraction unit 502, the address determination unit 503 obtains one hash value based on the value of the flow identifier and the hash function. The entry number mapped to this hash value is obtained (step S100). When the entry number is obtained, the address determination unit 503 calculates a memory address corresponding to the entry number (step S110). For example, if the capacity of the flow data stored in one entry is L bytes and the offset address to the address where the flow table 221 is stored is α, the calculated address is (α + entry number * L). It becomes. When calculating the memory address, the address determination unit 503 causes the memory 222 to burst transfer four pieces of flow data from the memory address (step S120). The transferred flow data is read by the data comparison unit 504.

続いて、データ比較部504は、メモリ222から4つのフローデータを受信すると、受信したフローデータのうちの最初のフローデータに含まれるフロー識別子の各値と、格納データ抽出部502から受信したフロー識別子の各値(つまり、パケット受信部201がルータ101aから受信したパケットのフロー識別子の各値)とを比較する(ステップS130)。そして、比較の結果、両者のフロー識別子の値がすべて一致するかを判断する(ステップS140)。フロー識別子の値がすべて一致する場合には、受信したパケットのフローは既出のフローであると判断できるため、データ比較部504は、現在参照しているフローデータを統計更新部505に送信し、このフローデータが格納されていたエントリのメモリアドレスをデータ書込み部507に送信する(ステップS200)。こうすることで、データ書込み部507によって、既出のフローの統計情報が更新されることになる。   Subsequently, when the data comparison unit 504 receives four pieces of flow data from the memory 222, each value of the flow identifier included in the first flow data of the received flow data and the flow received from the stored data extraction unit 502 are displayed. Each value of the identifier (that is, each value of the flow identifier of the packet received by the packet receiving unit 201 from the router 101a) is compared (step S130). Then, as a result of the comparison, it is determined whether or not the values of both flow identifiers match (step S140). If all of the flow identifier values match, it can be determined that the flow of the received packet is an existing flow, so the data comparison unit 504 transmits the currently referenced flow data to the statistics update unit 505, The memory address of the entry in which the flow data is stored is transmitted to the data writing unit 507 (step S200). By doing so, the data writing unit 507 updates the statistical information of the flow already described.

上記ステップS140において、フロー識別子の値が一つでも異なると判断された場合には、受信したパケットのフローは新規のフローであると判断できるため、データ比較部504は、現在参照しているフローデータが4つのフローデータのうちの1つ目のフローデータであるか、もしくは、現在参照しているフローデータに記録されたパケット数が、パケット数の最小値を表す変数M(以下、「最小値M」という)よりも少ないかを判断する(ステップS150)。かかるステップにおいて、データ比較部504は、現在参照しているフローデータが4つのフローデータのうちの1つ目のフローデータであるか、もしくは、現在参照しているフローデータに記録されたパケット数が、最小値Mよりも少ないと判断すれば、データ比較部504は、最小値Mに、現在参照しているフローデータのパケット数を代入する(ステップS160)。そして、データ比較部504は、現在参照しているフローデータのエントリ番号を一時的に記憶する(ステップS170)。現在参照しているフローデータが2つ目以降であるか、パケット数が最小値M以上であれば、データ比較部504は、上述したステップS160およびステップS170の処理をスキップする。データ比較部504は、続いて、現在参照しているフローデータが4つのフローデータのうちの最後のフローデータであるかを判断し(ステップS180)、最後のフローデータでなければ、処理をステップS130に戻して、次のフローデータについて、上述した処理を繰り返す。   If it is determined in step S140 that even one flow identifier value is different, the flow of the received packet can be determined to be a new flow. The data is the first flow data of the four flow data, or the number of packets recorded in the currently referenced flow data is a variable M (hereinafter referred to as “minimum”) indicating the minimum number of packets. It is determined whether it is less than (value M ") (step S150). In this step, the data comparison unit 504 determines whether the currently referred flow data is the first flow data of the four flow data, or the number of packets recorded in the currently referenced flow data. However, if it is determined that the value is smaller than the minimum value M, the data comparison unit 504 substitutes the number of packets of the currently referenced flow data for the minimum value M (step S160). Then, the data comparison unit 504 temporarily stores the entry number of the currently referenced flow data (step S170). If the currently referenced flow data is the second or later, or if the number of packets is equal to or greater than the minimum value M, the data comparison unit 504 skips the processing of step S160 and step S170 described above. Subsequently, the data comparison unit 504 determines whether the currently referenced flow data is the last flow data of the four flow data (step S180). Returning to S130, the above-described processing is repeated for the next flow data.

上記ステップS180において、現在参照しているフローデータが最後のフローデータであると判断された場合には、データ比較部504は、4つのフローデータの中で、最も、パケット数の少ないフローデータのエントリ番号を記憶していることになる。そこで、データ比較部504は、このエントリ番号に、新規のフローデータを作成する(ステップS190)。つまり、本実施例では、受信したパケットのフローが新規である場合には、4つのフローデータのうち、記録されたパケット数が最も少ないフローのエントリを上書きするのである。新規のフローデータは、フロー識別情報に、格納データ抽出部502から受信した情報を格納し、統計情報に対して、「0」を代入することで作成する。こうして新規のフローデータを作成すると、データ比較部504は、作成したフローデータと、一時的に記憶していたエントリ番号に対応するメモリアドレスとをデータ書込み部507に送信する(ステップS200)。こうすることで、データ書込み部507によって、パケット数の少ないエントリのフローデータが、新規のフローデータによって上書きされることになる。   If it is determined in step S180 that the currently referenced flow data is the last flow data, the data comparison unit 504 selects the flow data with the smallest number of packets among the four flow data. The entry number is stored. Therefore, the data comparison unit 504 creates new flow data for this entry number (step S190). In other words, in this embodiment, when the flow of the received packet is new, the entry of the flow having the smallest number of recorded packets is overwritten among the four flow data. The new flow data is created by storing the information received from the stored data extraction unit 502 in the flow identification information and substituting “0” into the statistical information. When new flow data is created in this way, the data comparison unit 504 transmits the created flow data and the memory address corresponding to the temporarily stored entry number to the data writing unit 507 (step S200). By doing so, the data writing unit 507 overwrites the flow data of the entry with a small number of packets with the new flow data.

以上で説明した第1実施例の通信データ統計装置104によれば、1つのハッシュ関数によって定まるメモリアドレスから、4つの連続したフローデータ読み出す。そして、この4つのフローデータの中から、更新あるいは上書きの対象となるフローデータを特定する。そのため、ハッシュ関数による演算によって、異なるフロー識別子の値から、同一のエントリ番号が算出されてしまう場合があっても(換言すれば、エントリ番号が衝突する場合があっても)、4つのフローデータの中から、目的のフローデータを効率的に特定することが可能になる。   According to the communication data statistics device 104 of the first embodiment described above, four consecutive flow data are read from a memory address determined by one hash function. Then, the flow data to be updated or overwritten is specified from the four flow data. Therefore, even if the same entry number may be calculated from the values of different flow identifiers by the calculation by the hash function (in other words, the entry numbers may collide), the four flow data The target flow data can be efficiently identified from the list.

また、本実施例では、メモリ222のバースト転送を利用することで、一度に4つの連続したフローデータ読み出すこととしたので、例えば、複数のハッシュ関数を用いることで離散した複数のメモリアドレスからフローデータをそれぞれ読み込むよりも、格段に高速にフローデータを読み出すことが可能になる。この結果、ネットワークの規模が大きい場合や回線速度が高速な場合であっても、メモリ222へのアクセス速度がボトルネックとなって、統計処理のスピードが低下してしまうことを抑制することができる。   Further, in this embodiment, since four continuous flow data are read at a time by using burst transfer of the memory 222, for example, the flow is started from a plurality of discrete memory addresses by using a plurality of hash functions. It is possible to read flow data much faster than reading each data. As a result, even when the scale of the network is large or the line speed is high, it is possible to prevent the access speed to the memory 222 from becoming a bottleneck and reducing the speed of statistical processing. .

また、本実施例の通信データ統計装置104によれば、受信したパケットのフロー毎に、パケット数や積算バイト数などが集計される。そして、集計されたパケットの数が所定の閾値以上になれば、これらの情報が、統計情報として外部の機器に出力される。キャリアやISPは、こうして出力されたフロー毎の統計情報を用いることにより、サービス提供時のデータの伝送品質の状況を確認することが可能となる。また、このような情報を用いることで、ネットワーク資源を有効に活用するためのトラフィック・エンジニアリングが可能になる。さらに、顧客の需要を予測してネットワーク資源を計画的に準備しておき、ユーザの要求(帯域、サービス)に対して迅速にネットワーク資源を提供するプロビジョニングや、アタックの検出・分析、課金などを行うことが可能となる。   Further, according to the communication data statistics device 104 of this embodiment, the number of packets, the number of accumulated bytes, and the like are tabulated for each received packet flow. If the total number of packets reaches a predetermined threshold or more, these pieces of information are output as statistical information to an external device. By using the statistical information for each flow output in this way, the carrier or ISP can check the status of the transmission quality of the data at the time of providing the service. In addition, by using such information, traffic engineering for effectively utilizing network resources becomes possible. In addition, network resources can be prepared systematically by predicting customer demand, and provisioning to quickly provide network resources in response to user requests (bandwidth, service), attack detection / analysis, billing, etc. Can be done.

なお、本実施例では、メモリ222から一度に転送されるフローデータの数を4つとしたが、一度に転送するフローデータの数は、ネットワークの規模に応じて、2以上の任意の数とすることが可能である。一度に読み込むフローデータの数を増加させると、大規模のネットワークにおいて既出のフローデータを検索する精度は高まるが、メモリ222からの読み込み時間が増加し、統計情報の更新速度が遅くなる。このようなトレードオフの関係を考慮して、一度に読み込むフローデータの数を設定することが可能である。   In the present embodiment, the number of flow data transferred from the memory 222 at a time is four, but the number of flow data transferred at a time is an arbitrary number of 2 or more depending on the scale of the network. It is possible. Increasing the number of flow data read at a time increases the accuracy of searching for existing flow data in a large-scale network, but increases the read time from the memory 222 and slows the update rate of statistical information. In consideration of such a trade-off relationship, it is possible to set the number of flow data read at a time.

また、本実施例では、新規のフローが検出された場合には、4つのエントリのうち、記録されたパケット数が最も少ないエントリを上書きの対象としている。しかし、上書きの対象は、最終更新時刻が最も古いエントリや、積算バイト数が最も少ないエントリなど、種々の条件を適用することが可能である。   Further, in this embodiment, when a new flow is detected, the entry having the smallest number of recorded packets among the four entries is to be overwritten. However, various conditions such as an entry having the oldest last update time and an entry having the smallest accumulated number of bytes can be applied to the overwriting target.

B.第2実施例:
続いて、本発明の第2実施例について説明する。上述した第1実施例では、図3に示したように、フローテーブル221には、1つのエントリに対して、1つのフローデータ(フロー識別情報+統計情報)が格納されている。これに対して、第2実施例では、メモリ222をブロックごとに管理し、1つのブロックに対して、複数のフローデータが記録される構成とする。
B. Second embodiment:
Next, a second embodiment of the present invention will be described. In the first embodiment described above, as shown in FIG. 3, the flow table 221 stores one flow data (flow identification information + statistical information) for one entry. On the other hand, in the second embodiment, the memory 222 is managed for each block, and a plurality of flow data is recorded for one block.

図6は、第2実施例におけるフローテーブル221bの構成を示す図である。図示するように、本実施例では、フローテーブル221bには、1つのブロックにつき、連続読み出しの単位である4つのフローデータが格納されている。本実施例のアドレス決定部503は、図5に示すようにフローテーブルを管理するため、フロー識別子のハッシュ値を、ブロック番号にマッピングし、このブロック番号からメモリアドレスを生成する。例えば、1エントリに格納されるフローデータの容量がLバイト、フローテーブル221が記憶されているアドレスまでのオフセットアドレスをαとすれば、ここで算出されるアドレスは、(α+ブロック番号*L*4)となる。   FIG. 6 is a diagram showing the configuration of the flow table 221b in the second embodiment. As shown in the figure, in this embodiment, the flow table 221b stores four flow data, which are units of continuous reading, for each block. In order to manage the flow table as shown in FIG. 5, the address determination unit 503 of the present embodiment maps the hash value of the flow identifier to a block number and generates a memory address from this block number. For example, if the flow data capacity stored in one entry is L bytes and the offset address to the address where the flow table 221 is stored is α, the calculated address is (α + block number * L * 4).

このように構成された第2実施例によれば、1つのブロック番号を特定するだけで、複数のフローデータをまとめて読み出すことができる。この結果、メモリ空間を有効に利用することが可能になる。なお、本実施例では、1つのブロックは4つのフローデータを含むこととしたが、実施例1と同様に、その数に特に限定はない。   According to the second embodiment configured as described above, it is possible to read out a plurality of flow data collectively only by specifying one block number. As a result, the memory space can be used effectively. In the present embodiment, one block includes four flow data, but the number is not particularly limited as in the first embodiment.

C.第3実施例:
続いて、本発明の第3実施例について説明する。上述した第1実施例や第2実施例では、通信データ統計装置104は独立した装置の形態をとっている。これに対して、第3実施例では、上述した通信データ統計装置104が有する機能(以下、「通信データ統計機能」という)を図1に示したルータ101(例えば、ルータ101a)の内部に実装させる構成とする。
C. Third embodiment:
Subsequently, a third embodiment of the present invention will be described. In the first and second embodiments described above, the communication data statistics device 104 takes the form of an independent device. In contrast, in the third embodiment, the function (hereinafter referred to as “communication data statistical function”) of the communication data statistical device 104 described above is implemented in the router 101 (for example, the router 101a) shown in FIG. It is set as the structure made to do.

図7は、通信データ統計機能を内蔵したルータ101の機能ブロック図である。ルータ101は、入力回線に接続された受信パケット処理部701と、出力回線に接続された送信パケット処理部702と、受信パケット処理部701に接続された検索処理部703と、トラフィック統計取得部705と、検索処理部703に付随するルーティングテーブル704と、ルータ制御部711とを備えている。ルータ制御部711は、管理端末211に接続されており、管理端末712の指示に従い、受信パケット処理部701や送信パケット処理部702、検索処理部703に対して、各種の設定を行う。管理端末211とルータ制御部711とは、ネットワークによって接続されてもよいし、RS−232CやUSB等のインタフェースによって接続されてもよい。   FIG. 7 is a functional block diagram of the router 101 incorporating the communication data statistical function. The router 101 includes a reception packet processing unit 701 connected to the input line, a transmission packet processing unit 702 connected to the output line, a search processing unit 703 connected to the reception packet processing unit 701, and a traffic statistics acquisition unit 705. A routing table 704 associated with the search processing unit 703, and a router control unit 711. The router control unit 711 is connected to the management terminal 211, and performs various settings for the reception packet processing unit 701, the transmission packet processing unit 702, and the search processing unit 703 in accordance with instructions from the management terminal 712. The management terminal 211 and the router control unit 711 may be connected by a network or may be connected by an interface such as RS-232C or USB.

受信パケット処理部701は、入力回線から受信したパケットを一旦バッファに蓄積し、蓄積したパケットのヘッダ情報を、検索処理部703とトラフィック統計取得部705とに送信する。   The received packet processing unit 701 temporarily accumulates packets received from the input line in a buffer, and transmits the header information of the accumulated packets to the search processing unit 703 and the traffic statistics acquisition unit 705.

検索処理部703は、受信パケット処理部701からヘッダ情報を受信すると、ルーティングテーブル704を参照して、そのパケットの出力先となる出力回線を検索し、その検索結果を、受信パケット処理部701に通知する。   When the search processing unit 703 receives the header information from the received packet processing unit 701, the search processing unit 703 refers to the routing table 704 to search for an output line as an output destination of the packet, and the search result is sent to the received packet processing unit 701. Notice.

受信パケット処理部701は、検索処理部703から検索結果を受信すると、検索結果に含まれる出力回線が含まれる送信パケット処理部702に、バッファに蓄積されたパケットと検索結果とを転送する。   When receiving the search result from the search processing unit 703, the reception packet processing unit 701 transfers the packet stored in the buffer and the search result to the transmission packet processing unit 702 including the output line included in the search result.

送信パケット処理部は、受信パケット処理部から、パケット情報と検索処理部703による検索結果を受信し、この検索結果に含まれる出力回線にパケットを出力する。   The transmission packet processing unit receives the packet information and the search result by the search processing unit 703 from the reception packet processing unit, and outputs the packet to the output line included in the search result.

トラフィック統計取得部705は、図2に示した通信データ統計装置104が有する機能ブロックをすべて有する。ただし、第1実施例では、図2のパケット受信部は、ルータ101aからパケットを受信しているのに対して、本実施例では、図7に示した受信パケット処理部701からパケットのヘッダ情報を受信する。また、第1実施例では、統計情報出力部203は、所定のインタフェースに対して統計情報を出力するのに対して、本実施例では、図7に示した受信パケット処理部701に統計情報が出力される。統計情報を取得した受信パケット処理部701は、所定のネットワーク機器(例えば、端末103a〜103c)に、統計情報を転送する。また、トラフィック統計取得部705内の制御部212は、ルータ制御部711と接続しており、ルータ制御部711経由でトラフィック統計取得部705を制御することができる。   The traffic statistics acquisition unit 705 has all the functional blocks of the communication data statistics device 104 shown in FIG. However, in the first embodiment, the packet receiving unit in FIG. 2 receives the packet from the router 101a, whereas in this embodiment, the packet header information from the received packet processing unit 701 shown in FIG. Receive. In the first embodiment, the statistical information output unit 203 outputs statistical information to a predetermined interface, whereas in the present embodiment, statistical information is stored in the received packet processing unit 701 shown in FIG. Is output. The received packet processing unit 701 that acquired the statistical information transfers the statistical information to a predetermined network device (for example, the terminals 103a to 103c). Further, the control unit 212 in the traffic statistics acquisition unit 705 is connected to the router control unit 711, and can control the traffic statistics acquisition unit 705 via the router control unit 711.

D.第4実施例:
最後に、本発明の第4実施例について説明する。本実施例では、上述した第3実施例のルータ101が備えるトラフィック統計取得部705(図7参照)を、ルータ外部のネットワーク制御装置601に実装している。
D. Fourth embodiment:
Finally, a fourth embodiment of the present invention will be described. In this embodiment, the traffic statistics acquisition unit 705 (see FIG. 7) included in the router 101 of the third embodiment described above is mounted on the network control device 601 outside the router.

図8は、ネットワーク制御装置601の構成を示す図である。ネットワーク制御装置601は、CPU602、ワークメモリ603、プログラムメモリ604、統計情報データベース605、トラフィック統計取得装置606、通信インタフェース607、バス608、入出力装置621(キーボードやマウス等の入力装置およびディスプレイやプリンタ等の出力装置を含む)から構成される。このネットワーク制御装置601は、第1実施例と同様に、ルータ101aから、ミラーリング技術あるいはRFC3176に規定されたsFlow技術によって転送されたパケット(トラフィック)のコピーを通信インタフェース607によって受信する。   FIG. 8 is a diagram illustrating a configuration of the network control device 601. The network control device 601 includes a CPU 602, a work memory 603, a program memory 604, a statistical information database 605, a traffic statistics acquisition device 606, a communication interface 607, a bus 608, an input / output device 621 (input devices such as a keyboard and a mouse, a display and a printer) Output device). Similar to the first embodiment, the network control apparatus 601 receives a copy of a packet (traffic) transferred from the router 101a by the mirroring technique or the sFlow technique defined in RFC3176 by the communication interface 607.

プログラムメモリ604には、トラフィック統計分析プログラム612と、統計情報受信プログラム611とが記憶されている。CPU602は、ワークメモリ603をワークエリアとして用いつつ、これらのプログラムを実行する。統計情報受信プログラム611は、トラフィック統計取得装置606から出力された統計情報を受信し、受信した統計情報を統計情報データベース605に記録するためのプログラムである。トラフィック統計分析プログラム612は、受信した統計情報を分析して、その分析結果を入出力装置621に出力するためのプログラムである。   The program memory 604 stores a traffic statistical analysis program 612 and a statistical information reception program 611. The CPU 602 executes these programs while using the work memory 603 as a work area. The statistical information reception program 611 is a program for receiving the statistical information output from the traffic statistics acquisition device 606 and recording the received statistical information in the statistical information database 605. The traffic statistical analysis program 612 is a program for analyzing the received statistical information and outputting the analysis result to the input / output device 621.

トラフィック統計取得装置606は、第3実施例のトラフィック統計取得部705に相当するデバイスである。第3実施例と異なるのは、本実施例のトラフィック統計取得装置606は、通信インタフェース607を有し、この通信インタフェース607を経由してネットワークからトラフィックを受信する点である。また、第3実施例のトラフィック統計取得部705と比較して、本実施例のトラフィック統計取得装置606には、通信インタフェース607から受信したパケットのヘッダからフロー識別情報を抽出する機能が追加される。また、第3実施例のトラフィック統計取得部705の統計情報の出力先は、受信パケット処理部111であったのに対して、本実施例のトラフィック統計取得装置606は、バス608に対して統計情報を出力する。   The traffic statistics acquisition device 606 is a device corresponding to the traffic statistics acquisition unit 705 of the third embodiment. The difference from the third embodiment is that the traffic statistics acquisition apparatus 606 of this embodiment has a communication interface 607 and receives traffic from the network via this communication interface 607. Further, compared with the traffic statistics acquisition unit 705 of the third embodiment, the traffic statistics acquisition device 606 of this embodiment has a function of extracting flow identification information from the header of the packet received from the communication interface 607. . Further, the output destination of the statistical information of the traffic statistics acquisition unit 705 of the third embodiment is the reception packet processing unit 111, whereas the traffic statistics acquisition device 606 of this embodiment performs statistics on the bus 608. Output information.

以上、本発明の種々の実施例について説明したが、本発明はこれら実施例に限定されず、その趣旨を逸脱しない範囲で種々の構成を採ることができることはいうまでもない。例えば、ハードウェアによって実現した機能は、CPUが所定のプログラムを実行することでソフトウェア的に実現することとしてもよい。   Although various embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and it goes without saying that various configurations can be adopted without departing from the spirit of the present invention. For example, a function realized by hardware may be realized by software by a CPU executing a predetermined program.

通信データ統計装置104を含むネットワーク構成の一例を示す図である。2 is a diagram illustrating an example of a network configuration including a communication data statistics device 104. FIG. 通信データ統計装置104の概略構成を示すブロック図である。2 is a block diagram showing a schematic configuration of a communication data statistics device 104. FIG. フローテーブル221の構成を示す図である。It is a figure which shows the structure of the flow table. 統計処理部204の詳細な構成を示す図である。3 is a diagram illustrating a detailed configuration of a statistical processing unit 204. FIG. アドレス決定部503とデータ比較部504とで行われる処理のフローチャートである。10 is a flowchart of processing performed by an address determination unit 503 and a data comparison unit 504. 第2実施例におけるフローテーブル221bの構成を示す図である。It is a figure which shows the structure of the flow table 221b in 2nd Example. 通信データ統計機能を内蔵したルータ101の機能ブロック図である。It is a functional block diagram of the router 101 incorporating the communication data statistical function. ネットワーク制御装置601の構成を示す図である。2 is a diagram illustrating a configuration of a network control device 601. FIG.

符号の説明Explanation of symbols

101,101a,101b,101c…ルータ
102a,102b…サーバ
103a,103b,103c…端末装置
104…通信データ統計装置
111…受信パケット処理部
116…フローテーブル
201…パケット受信部
202…パケット解析部
203…統計情報出力部
204…統計処理部
211…管理端末
212…制御部
221,221b…フローテーブル
222…メモリ
501…解析結果受信部
502…格納データ抽出部
503…アドレス決定部
504…データ比較部
505…統計更新部
506…閾値判定部
507…データ書込み部
508…フローデータ出力部
601…ネットワーク制御装置
605…統計情報データベース
606…トラフィック統計取得装置
607…通信インタフェース
608…バス
621…入出力装置
701…受信パケット処理部
702…送信パケット処理部
703…検索処理部
704…ルーティングテーブル
705…トラフィック統計取得部
711…ルータ制御部
101, 101a, 101b, 101c ... Routers 102a, 102b ... Servers 103a, 103b, 103c ... Terminal devices 104 ... Communication data statistics device 111 ... Received packet processing unit 116 ... Flow table 201 ... Packet receiving unit 202 ... Packet analysis unit 203 ... Statistical information output unit 204 ... Statistical processing unit 211 ... Management terminal 212 ... Control unit 221,221b ... Flow table 222 ... Memory 501 ... Analysis result receiving unit 502 ... Stored data extraction unit 503 ... Address determination unit 504 ... Data comparison unit 505 ... Statistic update unit 506 ... Threshold value determination unit 507 ... Data write unit 508 ... Flow data output unit 601 ... Network control device 605 ... Statistics information database 606 ... Traffic statistics acquisition device 607 ... Communication interface 608 ... Bus 621 ... Output device 701 ... received packet processing section 702 ... transmission packet processing unit 703 ... search processing unit 704 ... routing table 705 ... traffic statistics acquisition unit 711 ... router control unit

Claims (7)

ネットワークを流れる通信データの統計をとる通信データ統計装置であって、
パケットのフローを識別可能なフロー識別情報と、該フローに属するパケットの数を示すパケット数とを少なくとも含むフローデータを複数記憶するメモリと、
フロー識別情報を含むパケットを受信する受信部と、
異なるフロー識別情報に対して同一のアドレスが決定されることを許容しつつ、前記受信したパケットのフロー識別情報に基づいて、前記メモリ内のアドレスを一つ決定するアドレス決定部と、
前記メモリの前記決定されたアドレスから連続して複数のフローデータを読み出すデータ読出部と、
前記受信したパケット中のフロー識別情報に一致するフロー識別情報を有するフローデータが前記読み出した複数のフローデータの中に存在する場合に、該フローデータに含まれるパケット数を更新して、前記メモリに該フローデータを書き戻す更新部と
を備える通信データ統計装置。
A communication data statistics device that takes statistics of communication data flowing through a network,
A memory for storing a plurality of flow data including at least flow identification information capable of identifying a flow of packets and a packet number indicating the number of packets belonging to the flow;
A receiving unit for receiving a packet including flow identification information;
An address determination unit that determines one address in the memory based on the flow identification information of the received packet while allowing the same address to be determined for different flow identification information;
A data reading unit for continuously reading a plurality of flow data from the determined address of the memory;
When flow data having flow identification information matching flow identification information in the received packet exists in the plurality of read flow data, the number of packets included in the flow data is updated, and the memory A communication data statistics device comprising: an update unit for writing back the flow data to
請求項1に記載の通信データ統計装置であって、
前記更新部は、前記受信したパケット中のフロー識別情報に一致するフロー識別情報を有するフローデータが前記読み出した複数のフローデータの中に存在しない場合に、前記複数のフローデータの中から、上書きの対象となるフローデータを所定の基準に基づき選択し、該選択されたフローデータを、前記受信したパケット中のフロー識別情報に基づいて上書きする
通信データ統計装置。
The communication data statistics device according to claim 1,
The update unit overwrites the plurality of flow data when there is no flow data having flow identification information that matches the flow identification information in the received packet. A communication data statistic apparatus that selects flow data to be subjected to the above-described processing based on a predetermined criterion and overwrites the selected flow data based on flow identification information in the received packet.
請求項2に記載の通信データ統計装置であって、
前記更新部は、前記複数のフローデータのうち、記録されたパケット数が最も少ないフローデータを、上書きの対象として選択する
通信データ統計装置。
The communication data statistics device according to claim 2,
The update unit is a communication data statistics device that selects, from among the plurality of flow data, flow data having the smallest number of recorded packets as an overwriting target.
請求項1ないし請求項3のいずれかに記載の通信データ統計装置であって、
前記データ読出部は、前記2以上のフローデータをバースト転送によって前記メモリから読み出す
通信データ統計装置。
The communication data statistics device according to any one of claims 1 to 3,
The communication data statistics device, wherein the data reading unit reads the two or more flow data from the memory by burst transfer.
請求項1ないし請求項4のいずれかに記載の通信データ統計装置であって、
前記アドレス決定部は、前記受信したパケットのフロー識別情報のハッシュ値を求め、該ハッシュ値に対応したアドレスを一つ決定する
通信データ統計装置。
The communication data statistics device according to any one of claims 1 to 4,
The address determination unit obtains a hash value of the flow identification information of the received packet and determines one address corresponding to the hash value.
請求項1ないし請求項5のいずれかに記載の通信データ統計装置であって、
前記フローテーブルには、前記所定個数のフローデータを含むブロックの単位で、前記フローデータが記録されており、
前記データ読出部は、前記決定されたアドレスに対応するブロックから、前記所定個数のフローデータをまとめて読み出す
通信データ統計装置。
The communication data statistics device according to any one of claims 1 to 5,
In the flow table, the flow data is recorded in units of blocks including the predetermined number of flow data,
The communication data statistics device, wherein the data reading unit reads the predetermined number of flow data collectively from a block corresponding to the determined address.
通信データ統計装置が、ネットワークを流れる通信データの統計をとる通信データ統計方法であって、
前記通信データ統計装置は、パケットのフローを識別可能なフロー識別情報と、該フローに属するパケットの数を示すパケット数とを少なくとも含むフローデータを複数記憶するメモリを備えており、
フロー識別情報を含むパケットを受信する工程と、
異なるフロー識別情報に対して同一のアドレスが決定されることを許容しつつ、前記受信したパケットのフロー識別情報に基づいて、前記メモリ内のアドレスを一つ決定する工程と、
前記メモリの前記決定されたアドレスから連続して2個以上のフローデータを読み出す工程と、
前記受信したパケット中のフロー識別情報に一致するフロー識別情報を有するフローデータが前記読み出した複数のフローデータの中に存在する場合に、該フローデータに含まれるパケット数を更新して、前記メモリに該フローデータを書き戻す工程と
を含む通信データ統計方法。
A communication data statistics method is a communication data statistics method for taking statistics of communication data flowing through a network,
The communication data statistics device includes a memory for storing a plurality of flow data including at least flow identification information capable of identifying a flow of packets and a packet number indicating the number of packets belonging to the flow,
Receiving a packet including flow identification information;
Determining one address in the memory based on the flow identification information of the received packet while allowing the same address to be determined for different flow identification information;
Reading two or more flow data continuously from the determined address of the memory;
When flow data having flow identification information matching flow identification information in the received packet exists in the plurality of read flow data, the number of packets included in the flow data is updated, and the memory And a step of writing back the flow data to the communication data statistical method.
JP2008145986A 2008-06-03 2008-06-03 Communication data statistical apparatus and communication data statistical method Pending JP2009296158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008145986A JP2009296158A (en) 2008-06-03 2008-06-03 Communication data statistical apparatus and communication data statistical method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008145986A JP2009296158A (en) 2008-06-03 2008-06-03 Communication data statistical apparatus and communication data statistical method

Publications (1)

Publication Number Publication Date
JP2009296158A true JP2009296158A (en) 2009-12-17

Family

ID=41543967

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008145986A Pending JP2009296158A (en) 2008-06-03 2008-06-03 Communication data statistical apparatus and communication data statistical method

Country Status (1)

Country Link
JP (1) JP2009296158A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015052854A1 (en) * 2013-10-07 2015-04-16 日本電気株式会社 Traffic management system and traffic management method
JP2015089014A (en) * 2013-10-31 2015-05-07 富士通株式会社 Analysis program, analysis method and analyzer
CN115174446A (en) * 2022-07-21 2022-10-11 天翼云科技有限公司 Network traffic statistical method and device and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015052854A1 (en) * 2013-10-07 2015-04-16 日本電気株式会社 Traffic management system and traffic management method
JP2015089014A (en) * 2013-10-31 2015-05-07 富士通株式会社 Analysis program, analysis method and analyzer
CN115174446A (en) * 2022-07-21 2022-10-11 天翼云科技有限公司 Network traffic statistical method and device and electronic equipment
CN115174446B (en) * 2022-07-21 2023-11-03 天翼云科技有限公司 Network traffic statistics method and device and electronic equipment

Similar Documents

Publication Publication Date Title
JP5014282B2 (en) Communication data statistics apparatus, communication data statistics method and program
US7609629B2 (en) Network controller and control method with flow analysis and control function
JP4341413B2 (en) PACKET TRANSFER APPARATUS HAVING STATISTICS COLLECTION APPARATUS AND STATISTICS COLLECTION METHOD
US7843827B2 (en) Method and device for configuring a network device
JP4392294B2 (en) Communication statistics collection device
US10097464B1 (en) Sampling based on large flow detection for network visibility monitoring
US8886827B2 (en) Flow cache mechanism for performing packet flow lookups in a network device
US9979624B1 (en) Large flow detection for network visibility monitoring
JP5050781B2 (en) Malware detection device, monitoring device, malware detection program, and malware detection method
US8130767B2 (en) Method and apparatus for aggregating network traffic flows
US10536360B1 (en) Counters for large flow detection
TW201520770A (en) Port mirroring for sampling measurement of network flows
US10003515B1 (en) Network visibility monitoring
US20050018608A1 (en) Progressive and distributed regulation of selected network traffic destined for a network node
JP2009231890A (en) Packet relay device and traffic monitoring system
WO2021098425A1 (en) Qos policy method, device, and computing device for service configuration
JP2017034605A (en) Network system, communication analysis method, and analyzer
US8792366B2 (en) Network packet latency measurement
JP2009296158A (en) Communication data statistical apparatus and communication data statistical method
US8537676B1 (en) Rate limiting for DTCP message transport
US10805206B1 (en) Method for rerouting traffic in software defined networking network and switch thereof
CN111953552B (en) Data flow classification method and message forwarding equipment
JP2016144153A (en) Service monitoring device and service monitoring method
JP4871775B2 (en) Statistical information collection device
JP2009290436A (en) Communication data statistic device, and communication data statistic method