JP4950312B2 - Packet sampling device - Google Patents

Packet sampling device Download PDF

Info

Publication number
JP4950312B2
JP4950312B2 JP2010031075A JP2010031075A JP4950312B2 JP 4950312 B2 JP4950312 B2 JP 4950312B2 JP 2010031075 A JP2010031075 A JP 2010031075A JP 2010031075 A JP2010031075 A JP 2010031075A JP 4950312 B2 JP4950312 B2 JP 4950312B2
Authority
JP
Japan
Prior art keywords
packet
sampling
discard
unit
packets
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
JP2010031075A
Other languages
Japanese (ja)
Other versions
JP2011171797A (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 JP2010031075A priority Critical patent/JP4950312B2/en
Publication of JP2011171797A publication Critical patent/JP2011171797A/en
Application granted granted Critical
Publication of JP4950312B2 publication Critical patent/JP4950312B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、サンプリング技術を用いてトラヒック監視を行う装置、特にランダムパケットサンプリングや時間サンプリングを用いて低コストにトラヒック監視を行う装置に関するものである。   The present invention relates to a device that performs traffic monitoring using a sampling technique, and more particularly to a device that performs traffic monitoring at low cost using random packet sampling or time sampling.

サンプリング技術を用いて低コストでトラヒック監視を行う装置としては、nProbe(非特許文献1)を搭載した装置が既知である。   As a device that performs traffic monitoring at low cost using a sampling technique, a device equipped with nProbe (Non-Patent Document 1) is known.

nProbeは、汎用PC上でNetFlow、IPFIXといった、サンプリング機能を動作させることが可能となっており、専用のトラヒックキャプチャ装置を用いることなく、トラヒック監視を実現することが可能である。   The nProbe can operate sampling functions such as NetFlow and IPFIX on a general-purpose PC, and can realize traffic monitoring without using a dedicated traffic capture device.

“nProbe”、[online]、[平成22年1月21日検索]、インターネット<http://www.ntop.org/nProbe.html>“NProbe”, [online], [searched on January 21, 2010], Internet <http://www.ntop.org/nProbe.html>

非特許文献1の方法、つまり、nProbeを搭載したパケットサンプリング装置は、汎用PC上で実現されるために、低コストにトラヒック監視を実現することが可能である。一方で、専用のトラヒックキャプチャ装置ではなく、汎用PCを用いるために、次に示す問題があった。すなわち、ネットワークインタフェース、デバイスドライバ、カーネル部分でのパケット廃棄時に、ネットワーク上のパケット流量を実際よりも少なく測定する、ネットワーク上のパケット廃棄を誤検出するなどの問題があった。   Since the method of Non-Patent Document 1, that is, the packet sampling apparatus equipped with nProbe is realized on a general-purpose PC, traffic monitoring can be realized at low cost. On the other hand, since a general-purpose PC is used instead of a dedicated traffic capture device, there are the following problems. In other words, when discarding packets at the network interface, device driver, and kernel, there are problems such as measuring the packet flow rate on the network to be less than the actual one, and erroneously detecting packet discard on the network.

そこで、本発明は、トラヒック監視を実現する装置において、ネットワーク内のパケット流量やパケット廃棄などのネットワーク内のトラヒックの情報を正確に取得することを目的とする。   SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to accurately acquire traffic information in a network such as packet flow rate and packet discard in a network in an apparatus for realizing traffic monitoring.

本発明においては、前記の課題を解決するために、装置内で発生したパケット廃棄を考慮しながらサンプリング処理やその他の処理を行うことを特徴する。   In order to solve the above-mentioned problems, the present invention is characterized in that sampling processing and other processing are performed in consideration of packet discard occurring in the apparatus.

本明細書において開示される発明のうち、代表的なものの概要を簡単に説明すれば、以下のとおりである。   Of the inventions disclosed in this specification, the outline of typical ones will be briefly described as follows.

第1の発明は、ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された割合でランダムに選択するパケットサンプリング装置において、前記ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその廃棄パケット数を前記サンプリング部に通知する装置内廃棄検出部と、到着したパケット数をカウントし、カウントしたカウンタ値と乱数を用いて、予め設定した第1の個数のパケット周期に予め設定した第2の個数(1≦第2の個数<第1の個数)のパケットを選択し、前記装置内廃棄検出部から通知された廃棄パケット数を前記カウンタ値に加算し、装置内で廃棄されたパケットが前記乱数を用いて選択されたパケットと一致すると判明した場合に、判明以降のパケットから代理の選択パケットを決定するサンプリング部と、前記サンプリング部で選択したパケットの情報を外部装置に通知するエクスポート部とを有することを特徴とする。   According to a first aspect of the present invention, there is provided a packet sampling apparatus that includes a network interface and randomly selects a part of packets received from the network interface at a preset ratio, from the network interface to the sampling unit. The packet discarding unit that monitors packet discarding at one or a plurality of sites and detects the number of discarded packets when the packet discarding is detected, and counts the number of packets that arrived and counts the number of packets that have arrived. Using the value and the random number, a second number of packets (1 ≦ second number <first number) set in advance in the first set number of packet cycles is selected, and the in-device discard detection unit The number of discarded packets notified from the above is added to the counter value and discarded within the device. When it is determined that the received packet matches the packet selected using the random number, the sampling unit that determines the proxy selection packet from the packet after the determination and the information on the packet selected by the sampling unit are notified to the external device And an export unit.

第2の発明は、ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された割合でランダムに選択するパケットサンプリング装置において、前記ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその廃棄パケット数を前記サンプリング部に通知する装置内廃棄検出部と、到着したパケット数をカウントし、カウントしたカウンタ値と乱数を用いて、予め設定した第1の個数のパケット周期に予め設定した第2の個数(1≦第2の個数<第1の個数)のパケットを選択し、選択しなかったパケットの一部もしくは全てをバッファに記憶し、前記装置内廃棄検出部から通知された廃棄パケット数を前記カウンタ値に加算し、装置内で廃棄されたパケットが前記乱数を用いて選択されたパケットと一致すると判明した場合に前記バッファに記憶したパケットから代理の選択パケットを決定するサンプリング部と、前記サンプリング部で選択したパケットの情報を外部装置に通知するエクスポート部とを有することを特徴とする。   According to a second aspect of the present invention, there is provided a packet sampling apparatus that includes a network interface and randomly selects a part of packets received from the network interface at a preset ratio, from the network interface to the sampling unit. The packet discarding unit that monitors packet discarding at one or a plurality of sites and detects the number of discarded packets when the packet discarding is detected, and counts the number of packets that arrived and counts the number of packets that have arrived. Using a value and a random number, a second number of packets (1 ≦ second number <first number) set in advance in the first set number of packet cycles is selected, and packets not selected Store some or all in the buffer and notify from the device discard detection unit The number of discarded packets is added to the counter value, and when it is determined that the packet discarded in the apparatus matches the packet selected using the random number, the proxy selection packet is determined from the packet stored in the buffer. And an export unit for notifying an external device of information on a packet selected by the sampling unit.

第3の発明は、ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された割合でランダムに選択するパケットサンプリング装置において、前記ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその廃棄パケット数をエクスポート部に通知する装置内廃棄検出部と、到着したパケット数をカウントし、カウントしたカウンタ値と乱数を用いて、予め設定した第1の個数のパケット周期に予め設定した第2の個数(1≦第2の個数<第1の個数)のパケットを選択し、第1の個数のパケットを受信した間に前記装置内廃棄検出部から通知された装置内廃棄パケット数をエクスポート部に通知するサンプリング部と、前記パケット選択に用いた第1の個数を本来のそれに前記サンプリング部から通知された装置内廃棄パケット数を加算した値に書き換えた値としたうえで、前記サンプリング部で選択したパケットの情報とを関連付けて外部装置に通知するエクスポート部とを有することを特徴とする。   According to a third aspect of the present invention, there is provided a packet sampling apparatus that includes a network interface and randomly selects a part of packets received from the network interface at a preset ratio, from the network interface to the sampling unit. The device discard detection unit that monitors packet discard at one or more parts of the device and notifies the export unit of the number of discarded packets when packet discard is detected, and counts the number of arrived packets, and the counted counter value And a random number are used to select a second preset number of packets (1 ≦ second number <first number) in a preset first number of packet cycles, and the first number of packets The number of in-device discard packets notified from the in-device discard detector during reception A sampling unit that notifies the sport unit, and the first number used in the packet selection is rewritten to a value obtained by adding the original number of discarded packets in the apparatus notified from the sampling unit to the original number, and the sampling And an export unit that associates the information of the packet selected by the unit and notifies the external device of the information.

第4の発明は、ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された割合でランダムに選択するパケットサンプリング装置において、ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその廃棄パケット数を前記サンプリング部に通知する装置内廃棄検出部と、到着したパケット数をカウントし、カウントしたカウンタ値と乱数を用いて、予め設定した第1の個数のパケット周期に予め設定した第2の個数(1≦第2の個数<第1の個数)のパケットを選択し、前記装置内廃棄検出部から通知された装置内廃棄パケット数に応じて、次周期においてパケット選択に用いるパラメータ{第2の個数,第1の個数}を変更するサンプリング部と、前記次周期においてパケット選択に用いる変更後のパラメータ{第2の個数,第1の個数}と前記サンプリング部で選択したパケットの情報とを関連付けて外部装置に通知するエクスポート部とを有することを特徴とする。   A fourth invention is a packet sampling device comprising a network interface, and randomly selecting a part of the packets received from the network interface at a preset ratio, from the network interface to the sampling unit In-device discard detection unit that monitors packet discard at one or a plurality of parts and notifies the sampling unit of the number of discarded packets when packet discard is detected, and counts the number of packets that have arrived, and the counted counter value And a random number are used to select a second number (1 ≦ second number <first number) of packets set in advance in the first number of packet cycles, and from the in-device discard detection unit Depending on the notified number of discarded packets in the device, packet selection is performed in the next cycle. Selected by the sampling unit for changing the parameter {second number, first number} and the changed parameter {second number, first number} used for packet selection in the next period and the sampling unit And an export unit that associates the information of the packet and notifies the external device.

第5の発明は、ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された時間だけ抽出するパケットサンプリング装置において、前記ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその事実を前記サンプリング部に通知する装置内廃棄検出部と、到着したパケットから、予め設定した時間周期に、予め設定した第1の時間だけパケット抽出を行い、残る第2の時間はパケット抽出を行わず、前記装置内廃棄検出部から装置内廃棄を通知された時に、パケット抽出する時間帯(抽出開始時刻から第1の時間以内)であれば直ちにパケット抽出を停止し、抽出開始時刻からの経過時間Δtをエクスポート部に通知するサンプリング部と、パケット抽出に用いるパラメータ{第1の時間,第2の時間}を前記サンプリング部から通知されたΔtを元に実際にパケット抽出に用いたパラメータ{第1の時間−Δt,第2の時間+Δt}に書き換えたうえで、前記サンプリング部にて抽出したパケットに関する情報と関連付けて外部装置に通知するエクスポート部とを有することを特徴とする。   According to a fifth aspect of the present invention, there is provided a packet sampling apparatus that includes a network interface and extracts a part of packets from packets received from the network interface for a preset time. Alternatively, the packet discarding at a plurality of parts is monitored, and when the packet discarding is detected, the in-device discarding detection unit for notifying the fact to the sampling unit and the packet arrived at a preset time period Packet extraction is performed only for the first time, and packet extraction is not performed for the remaining second time. When the in-device discard is notified from the in-device discard detection unit, a packet extraction time zone (first from the extraction start time) The packet extraction immediately stops and the extraction start time The sampling unit that notifies the elapsed time Δt to the export unit, and the parameters used for packet extraction {first time, second time} were actually used for packet extraction based on Δt notified from the sampling unit. And an export unit that rewrites the parameters {first time−Δt, second time + Δt} and notifies the external device in association with information about the packet extracted by the sampling unit.

第6の発明は、ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された時間だけ抽出するパケットサンプリング装置において、前記ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその廃棄パケット数をネットワーク廃棄検出部に直ちに通知する装置内廃棄検出部と、到着したパケットから、予め設定した時間周期に、予め設定した第1の時間だけパケット抽出を行い、残る第2の時間はパケット抽出を行わないサンプリング部と、前記サンプリング部において抽出したパケットのシーケンス番号を監視し、その抜けからネットワークでのパケット廃棄を検出し、その廃棄パケット数をカウントし、前記装置内廃棄検出部から装置内廃棄を通知されたときに抽出したパケットのシーケンス番号に抜けがある場合は、ネットワークでのパケット廃棄としては検出しないネットワーク廃棄検出部と、前記ネットワーク廃棄検出部にて検出したパケット廃棄に関する情報を外部装置に通知するエクスポート部とを有することを特徴とする。   According to a sixth aspect of the present invention, there is provided a packet sampling apparatus that includes a network interface and extracts a part of the packets received from the network interface for a preset time. Alternatively, it monitors the packet discards at multiple sites, and if it detects packet discards, it immediately notifies the network discard detection unit of the number of discarded packets, and from the arriving packets at a preset time period. The packet extraction is performed for the first time set in advance, and the sampling number is not extracted for the remaining second time, and the sequence number of the packet extracted in the sampling unit is monitored. Detect discards, Network discard detection unit that counts the number of discarded packets and does not detect as packet discard in the network when there is a missing sequence number in the packet that was extracted when the in-device discard was notified from the in-device discard detection unit And an export unit for notifying an external device of information related to packet discard detected by the network discard detection unit.

本発明によれば、装置内で発生したパケット廃棄を考慮しながらサンプリング処理を行うことにより、低コストでありながら、ネットワーク上の流量やパケット廃棄を正確に取得することが可能となる。   According to the present invention, it is possible to accurately acquire the flow rate and packet discard on the network at a low cost by performing the sampling process in consideration of the packet discard generated in the apparatus.

本発明の実施例1に係るパケットサンプリング装置の構成図である。It is a block diagram of the packet sampling apparatus which concerns on Example 1 of this invention. 本発明の実施例1に係るパケットサンプリング装置の処理内容を示す図である。It is a figure which shows the processing content of the packet sampling apparatus which concerns on Example 1 of this invention. 本発明の実施例2に係るパケットサンプリング装置の構成図である。It is a block diagram of the packet sampling apparatus which concerns on Example 2 of this invention. 本発明の実施例2に係るパケットサンプリング装置の処理内容を示す図である。It is a figure which shows the processing content of the packet sampling apparatus which concerns on Example 2 of this invention. 本発明の実施例3に係るパケットサンプリング装置の構成図である。It is a block diagram of the packet sampling apparatus which concerns on Example 3 of this invention. 本発明の実施例3に係るパケットサンプリング装置の処理内容を示す図である。It is a figure which shows the processing content of the packet sampling apparatus which concerns on Example 3 of this invention. 本発明の実施例4に係るパケットサンプリング装置の構成図である。It is a block diagram of the packet sampling apparatus which concerns on Example 4 of this invention. 本発明の実施例4に係るパケットサンプリング装置の処理内容を示す図である。It is a figure which shows the processing content of the packet sampling apparatus which concerns on Example 4 of this invention. 本発明の実施例5に係るパケットサンプリング装置の構成図である。It is a block diagram of the packet sampling apparatus which concerns on Example 5 of this invention. 本発明の実施例5に係るパケットサンプリング装置の処理内容を示す図である。It is a figure which shows the processing content of the packet sampling apparatus which concerns on Example 5 of this invention. 本発明の実施例6に係るパケットサンプリング装置の構成図である。It is a block diagram of the packet sampling apparatus which concerns on Example 6 of this invention. 本発明の実施例6に係るパケットサンプリング装置の処理内容を示す図である。It is a figure which shows the processing content of the packet sampling apparatus which concerns on Example 6 of this invention.

以下、本発明の実施例を図を用いて詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の実施例1に係るパケットサンプリング装置の構成図である。   FIG. 1 is a configuration diagram of a packet sampling apparatus according to Embodiment 1 of the present invention.

図1において、110はUserLand、120はKernel、130はNIC、111はエクスポート部、112はサンプリング部、113は装置内廃棄検出部である。   In FIG. 1, 110 is UserLand, 120 is Kernel, 130 is NIC, 111 is an export unit, 112 is a sampling unit, and 113 is an in-device discard detection unit.

エクスポート部111、サンプリング部112、装置内廃棄検出部113はUserLand110に配置される。ネットワークインタフェース(図示していない)において受信したパケットは、NIC130、カーネル120を通過してサンプリング部112に到達する。   The export unit 111, the sampling unit 112, and the in-device discard detection unit 113 are arranged in the UserLand 110. A packet received at a network interface (not shown) passes through the NIC 130 and the kernel 120 and reaches the sampling unit 112.

図2は、本発明の実施例1に係るパケットサンプリング装置の処理内容を示す図である。   FIG. 2 is a diagram illustrating processing contents of the packet sampling device according to the first embodiment of the present invention.

図2において、201はネットワークインタフェースに到着したパケット、202はサンプリング部に到着したパケット、203はサンプリング部のカウンタ値である。211は装置内廃棄検出部113からサンプリング部112への3パケット廃棄の通知、212は同2パケット廃棄の通知である。   In FIG. 2, 201 is a packet arriving at the network interface, 202 is a packet arriving at the sampling unit, and 203 is a counter value of the sampling unit. 211 is a notification of the discard of three packets from the in-device discard detection unit 113 to the sampling unit 112, and 212 is a notification of the discard of the two packets.

装置内廃棄検出部113は、常時NIC130およびカーネル120を監視し、パケット廃棄の有無を確認する。パケット廃棄が発生した場合は、即座にその事実をその廃棄パケット数innerDroppedPacketsとともにサンプリング部112に通知する。   The in-device discard detection unit 113 constantly monitors the NIC 130 and the kernel 120 and confirms whether or not the packet is discarded. When packet discard occurs, the fact is immediately notified to the sampling unit 112 together with the number of discarded packets innerDroppedPackets.

サンプリング部112は、受信したパケット数をカウンタする。本カウンタは、パケットを受信時に加算されるだけでなく、装置内廃棄検出部113から装置内廃棄を通知された場合にも加算される。装置内廃棄検出部113から装置内廃棄を通知された場合にはその通知された廃棄パケット数innerDroppedPackets分が加算される。図2の例では、サンプリング部のカウンタ値203は、3パケット廃棄の通知211の時に3が加算され、2パケット廃棄の通知212の時に2が加算される。   The sampling unit 112 counts the number of received packets. This counter is added not only when a packet is received, but also when an in-device discard is notified from the in-device discard detection unit 113. When in-device discard is notified from the in-device discard detection unit 113, the notified number of discarded packets, inner Dropped Packets, is added. In the example of FIG. 2, the counter value 203 of the sampling unit is incremented by 3 when a 3 packet discard notification 211 is received, and is added by 2 when a 2 packet discard notification 212 is received.

サンプリング部112は、前記カウンタのsamplingPopulation個(第1の個数)のパケット周期に、1周期毎に予め設定したsamplingSize(1≦samplingSize<<samplingPopulation)個(第2の個数)のパケットをランダムに選択する。具体的には、samplingPopulation個のパケット周期に乱数を用いて1〜samplingPopulationの範囲の異なるsamplingSize個の整数(N1,N2,…,NsamplingSize)を取得する。当該周期では、取得した整数(N1,N2,…,NsamplingSize)番目の受信パケットを選択パケットとして決定する。これを各周期で行う。   The sampling unit 112 randomly selects samplingSize (1 ≦ samplingSize << samplingPopulation) (second number) of packets preset in each sampling period (first number) of packet periods of the counter. To do. Specifically, samplingSize integers (N1, N2,..., NsamplingSize) having different sampling ranges of 1 to SamplingPopulation are obtained using random numbers for samplingPopulation packet periods. In the period, the acquired integer (N1, N2,..., NsamplingSize) -th received packet is determined as a selection packet. This is done at each cycle.

サンプリング部112では、前記カウンタの増分として、装置内廃棄パケット数が含まれているため、samplingPopulation個中samplingSize個の割合でパケットを選択することが可能となる。ただし、乱数から取得した整数(N1,N2,…,NsamplingSize)が示すパケットが装置内廃棄パケットに含まれている場合もありうるため、代理の選択パケットを決定することにより、samplingPopulation個中samplingSize個の割合を守ってパケット選択を行うことが可能となる。代理の選択パケットの決定は、選択すべきパケットが装置内廃棄されたことが判明した以降の非選択パケットから選択する。代理の選択パケットの決定は、判明した直後のパケットとする、もしくは、判明した以降のパケットから再度乱数を用いて決定するものである。   Since the sampling unit 112 includes the number of in-device discarded packets as the increment of the counter, packets can be selected at a sampling size ratio of samplingPopulation. However, since the packet indicated by the integers (N1, N2,..., NsamplingSize) obtained from the random number may be included in the in-device discard packet, by determining the proxy selection packet, the samplingSizing of the samplingPopulations It is possible to perform packet selection while observing the above ratio. The proxy selection packet is selected from non-selected packets after it is determined that the packet to be selected has been discarded in the apparatus. The proxy selection packet is determined as a packet immediately after it is found, or is determined again using a random number from the packet after it is found.

例えば、図2に示すように、{samplingSize,samplingPopulation}={1,20}の場合に、乱数にて14番目を選択することを決定したが、選択すべき14番のパケットは装置内で廃棄されたので、16〜20もしくは以降の周期の中から代理の選択パケットを決定して、最終的な選択パケットを18番のパケットとして、このパケットをサンプリングする。   For example, as shown in FIG. 2, when {samplingSize, samplingPopulation} = {1, 20}, it is decided to select the 14th with a random number, but the 14th packet to be selected is discarded in the apparatus. Therefore, the proxy selection packet is determined from 16 to 20 or subsequent cycles, and this packet is sampled with the final selection packet as the 18th packet.

サンプリング部112で用いるパラメータ{samplingSize,samplingPopulation}は、あらかじめ当該装置のハードウェア、ソフトウェア等の性能を考慮して、決定することが望ましい。例えば、連続で発生しうる装置内パケット廃棄の最悪値からパラメータを決定することがよい。連続のパケット廃棄が1000であれば、例えば{samplingSize,samplingPopulation}={1,1001以上}をパラメータとして採用することが望ましい。これは、1周期内で装置内廃棄されるパケットが多すぎて、選択パケット決定できないケースをあらかじめさけることを目的としている。ただし、これには限定されず、1≦samplingSize(第2の個数)<samplingPopulation(第1の個数)であればよい。   The parameters {samplingSize, samplingPopulation} used in the sampling unit 112 are desirably determined in advance in consideration of the performance of hardware, software, and the like of the device. For example, the parameter may be determined from the worst value of in-device packet discard that can occur continuously. If the continuous packet discard is 1000, for example, {samplingSize, samplingPopulation} = {1,1001 or more} is desirably employed as a parameter. The purpose of this is to avoid a case in which the number of packets discarded in the apparatus in one cycle is too large to determine a selected packet. However, the present invention is not limited to this, and may be 1 ≦ samplingSize (second number) <samplingPopulation (first number).

エクスポート部111は、サンプリング部112で取得したパケットの情報を、NetFlow、sFLow、IPFIX等のプロトコルを用いて外部装置に通知する。ここで、パケット選択に用いたパラメータを関連付けて通知してもよい。   The export unit 111 notifies the external device of the packet information acquired by the sampling unit 112 using a protocol such as NetFlow, sFLow, or IPFIX. Here, the parameter used for packet selection may be associated and notified.

以上説明したように、本実施例は、ランダムサンプリングを行うサンプリング装置において、選択パケットが装置内廃棄された場合は未来の非選択パケットから代理の選択パケットを選ぶことによりサンプリングレートを守るものである。   As described above, in this embodiment, in a sampling device that performs random sampling, when a selected packet is discarded in the device, the sampling rate is protected by selecting a proxy selection packet from future non-selected packets. .

本実施例により、例えば汎用PC上でトラヒック監視を実現する装置において、低コストでありながら、ネットワーク内のパケット流量やパケット廃棄などのネットワーク内のトラヒックの情報を正確に取得することができる。   According to the present embodiment, for example, in a device that realizes traffic monitoring on a general-purpose PC, it is possible to accurately acquire traffic information in the network such as the packet flow rate and packet discard in the network at a low cost.

図3は、本発明の実施例2に係るパケットサンプリング装置の構成図である。   FIG. 3 is a configuration diagram of a packet sampling apparatus according to the second embodiment of the present invention.

図3において、310はUserLand、320はKernel、330はNIC、311はエクスポート部、312はサンプリング部、313は装置内廃棄検出部である。   In FIG. 3, 310 is UserLand, 320 is Kernel, 330 is NIC, 311 is an export unit, 312 is a sampling unit, and 313 is an in-device discard detection unit.

エクスポート部311、サンプリング部312、装置内廃棄検出部313はUserLand310に配置される。ネットワークインタフェース(図示していない)において受信したパケットは、NIC330、カーネル320を通過してサンプリング部312に到達する。   The export unit 311, the sampling unit 312, and the in-device discard detection unit 313 are arranged in the UserLand 310. A packet received at a network interface (not shown) passes through the NIC 330 and the kernel 320 and reaches the sampling unit 312.

図4は、本発明の実施例2に係るパケットサンプリング装置の処理内容を示す図である。   FIG. 4 is a diagram illustrating processing contents of the packet sampling device according to the second embodiment of the present invention.

図4において、401はネットワークインタフェースに到着したパケット、402はサンプリング部に到着したパケット、403はサンプリング部のカウンタ値である。411は装置内廃棄検出部313からサンプリング部312への3パケット廃棄の通知、412は同2パケット廃棄の通知である。   In FIG. 4, 401 is a packet arriving at the network interface, 402 is a packet arriving at the sampling unit, and 403 is a counter value of the sampling unit. Reference numeral 411 denotes a notification of three-packet discard from the in-device discard detection unit 313 to the sampling unit 312. Reference numeral 412 denotes a notification of the two-packet discard.

装置内廃棄検出部313は、常時NIC330およびカーネル320を監視し、パケット廃棄の有無を確認する。パケット廃棄が発生した場合は、即座にその事実をその廃棄パケット数innerDroppedPacketsとともにサンプリング部312に通知する。   The in-device discard detection unit 313 constantly monitors the NIC 330 and the kernel 320 and confirms whether or not the packet is discarded. When packet discard occurs, the fact is immediately notified to the sampling unit 312 together with the number of discarded packets innerDroppedPackets.

サンプリング部312は、受信したパケット数をカウンタする。本カウンタは、パケットを受信時に加算されるだけでなく、装置内廃棄検出部313から装置内廃棄を通知された場合にも加算される。装置内廃棄検出部313から装置内廃棄を通知された場合にはその通知された廃棄パケット数innerDroppedPackets分が加算される。図4の例では、サンプリング部のカウンタ値403は、3パケット廃棄の通知411の時に3が加算され、2パケット廃棄の通知412の時に2が加算される。   The sampling unit 312 counts the number of received packets. This counter is added not only when a packet is received, but also when an in-device discard is notified from the in-device discard detection unit 313. When in-device discard is notified from the in-device discard detection unit 313, the number of discarded packets notified by innerDroppedPackets is added. In the example of FIG. 4, 3 is added to the counter value 403 of the sampling unit when the 3 packet discard notification 411 is received, and 2 is added when the 2 packet discard notification 412 is received.

サンプリング部312は、前記カウンタのsamplingPopulation個(第1の個数)のパケット周期に、1周期毎に予め設定したsamplingSize(1≦samplingSize<<samplingPopulation)個(第2の個数)のパケットをランダムに選択する。具体的には、samplingPopulation個のパケット周期に乱数を用いて1〜samplingPopulationの範囲の異なるsamplingSize個の整数(N1,N2,…,NsamplingSize)を取得する。当該周期では、取得した整数(N1,N2,…,NsamplingSize)番目の受信パケットを選択パケットとして決定する。これを各周期で行う。   The sampling unit 312 randomly selects samplingSize (1 ≦ samplingSize << samplingPopulation) (second number) packets preset for each period in the samplingPopulation (first number) packet period of the counter. To do. Specifically, samplingSize integers (N1, N2,..., NsamplingSize) having different sampling ranges of 1 to SamplingPopulation are obtained using random numbers for samplingPopulation packet periods. In the period, the acquired integer (N1, N2,..., NsamplingSize) -th received packet is determined as a selection packet. This is done at each cycle.

サンプリング部312では、前記カウンタの増分として、装置内廃棄パケット数が含まれているため、samplingPopulation個中samplingSize個の割合でパケットを選択することが可能となる。ただし、乱数から取得した整数(N1,N2,…,NsamplingSize)が示すパケットが装置内廃棄パケットに含まれている場合もありうるため、代理の選択パケットを決定することにより、samplingPopulation個中samplingSizeこの割合を守ってパケット選択を行うことが可能となる。代理の選択パケットの決定は、過去の非選択パケットをバッファしておき、その中から選択する。非選択パケットのバッファは、予め設定した長さのバッファであって、最新の非選択パケットのみを記憶するものとすることで、バッファ容量を低減することが可能である。その場合、バッファの先頭もしくは最後尾のパケットを代理の選択パケットとして決定することができる。もしくは、バッファから乱数を用いて代理の選択パケットを決定することができる。   Since the sampling unit 312 includes the number of in-device discarded packets as the increment of the counter, it is possible to select packets at a sampling size ratio of sampling population. However, since the packet indicated by the integers (N1, N2,..., NsamplingSize) obtained from the random number may be included in the in-device discard packet, by determining the proxy selection packet, the samplingSizing of this number of samplingPopulation Packet selection can be performed while keeping the ratio. In determining the proxy selection packet, past unselected packets are buffered and selected from them. The buffer of the non-selected packet is a buffer having a preset length, and the buffer capacity can be reduced by storing only the latest non-selected packet. In that case, the first or last packet of the buffer can be determined as a proxy selection packet. Alternatively, the proxy selection packet can be determined using a random number from the buffer.

例えば、図4に示すように、{samplingSize,samplingPopulation}={1,20}の場合に、乱数にて14番目を選択することを決定したが、選択すべき14番のパケットが装置内で廃棄されたので、バッファされている1〜4、8〜13の中から代理の選択パケットを決定して、最終的な選択パケットを12番のパケットとして、このパケットをサンプリングする。   For example, as shown in FIG. 4, when {samplingSize, samplingPopulation} = {1, 20}, it is decided to select the 14th with a random number, but the 14th packet to be selected is discarded in the apparatus Therefore, the proxy selection packet is determined from the buffered 1 to 4 and 8 to 13, and this packet is sampled with the final selection packet as the 12th packet.

サンプリング部312で用いるパラメータ{samplingSize,samplingPopulation}は、あらかじめ当該装置のハードウェア、ソフトウェア等の性能を考慮して、決定することが望ましい。例えば、連続で発生しうる装置内パケット廃棄の最悪値からパラメータを決定することがよい。連続のパケット廃棄が1000であれば、例えば{samplingSize,samplingPopulation}={1,1001以上}をパラメータとして採用することが望ましい。これは、1周期内で装置内廃棄されるパケットが多すぎて、選択パケット決定できないケースをあらかじめさけることを目的としている。ただし、これには限定されず、1≦samplingSize(第2の個数)<samplingPopulation(第1の個数)であればよい。   The parameters {samplingSize, samplingPopulation} used in the sampling unit 312 are preferably determined in advance in consideration of the performance of the hardware, software, etc. of the device. For example, the parameter may be determined from the worst value of in-device packet discard that can occur continuously. If the continuous packet discard is 1000, for example, {samplingSize, samplingPopulation} = {1,1001 or more} is desirably employed as a parameter. The purpose of this is to avoid a case in which the number of packets discarded in the apparatus in one cycle is too large to determine a selected packet. However, the present invention is not limited to this, and may be 1 ≦ samplingSize (second number) <samplingPopulation (first number).

エクスポート部311は、サンプリング部312で取得したパケットの情報を、NetFlow、sFLow、IPFIX等のプロトコルを用いて外部装置に通知する。ここで、パケット選択に用いたパラメータを関連付けて通知してもよい。   The export unit 311 notifies the external device of the packet information acquired by the sampling unit 312 using a protocol such as NetFlow, sFLow, or IPFIX. Here, the parameter used for packet selection may be associated and notified.

以上説明したように、本実施例は、ランダムサンプリングを行うサンプリング装置において、選択パケットが装置内廃棄された場合は過去の非選択パケットから代理の選択パケットを選ぶことによりサンプリングレートを守るものである。   As described above, in this embodiment, in a sampling device that performs random sampling, when a selected packet is discarded in the device, the sampling rate is protected by selecting a proxy selection packet from past non-selected packets. .

本実施例により、例えば汎用PC上でトラヒック監視を実現する装置において、低コストでありながら、ネットワーク内のパケット流量やパケット廃棄などのネットワーク内のトラヒックの情報を正確に取得することができる。   According to the present embodiment, for example, in a device that realizes traffic monitoring on a general-purpose PC, it is possible to accurately acquire traffic information in the network such as the packet flow rate and packet discard in the network at a low cost.

図5は、本発明の実施例3に係るパケットサンプリング装置の構成図である。   FIG. 5 is a configuration diagram of a packet sampling apparatus according to the third embodiment of the present invention.

図5において、510はUserLand、520はKernel、530はNIC、511はエクスポート部、512はサンプリング部、513は装置内廃棄検出部である。   In FIG. 5, 510 is UserLand, 520 is Kernel, 530 is NIC, 511 is an export unit, 512 is a sampling unit, and 513 is an in-device discard detection unit.

エクスポート部511、サンプリング部512、装置内廃棄検出部513はUserLand510に配置される。ネットワークインタフェース(図示していない)において受信したパケットは、NIC530、カーネル520を通過してサンプリング部512に到達する。   The export unit 511, the sampling unit 512, and the in-device discard detection unit 513 are arranged in the UserLand 510. A packet received at a network interface (not shown) passes through the NIC 530 and the kernel 520 and reaches the sampling unit 512.

図6は、本発明の実施例3に係るパケットサンプリング装置の処理内容を示す図である。   FIG. 6 is a diagram illustrating processing contents of the packet sampling device according to the third embodiment of the present invention.

図6において、601はネットワークインタフェースに到着したパケット、602はサンプリング部に到着したパケット、603はサンプリング部のカウンタ値、604は装置内廃棄の合算値である。611は装置内廃棄検出部513からエクスポート部511への3パケット廃棄の通知、612は同2パケット廃棄の通知である。   In FIG. 6, 601 is a packet arriving at the network interface, 602 is a packet arriving at the sampling unit, 603 is a counter value of the sampling unit, and 604 is a total value of discard in the apparatus. Reference numeral 611 denotes a three-packet discard notification from the in-device discard detection unit 513 to the export unit 511, and reference numeral 612 denotes a two-packet discard notification.

装置内廃棄検出部513は、常時NIC530およびカーネル520を監視し、パケット廃棄の有無を確認する。パケット廃棄が発生した場合は、即座にその事実をその廃棄パケット数innerDroppedPacketsとともにエクスポート部511に通知する。   The in-device discard detection unit 513 constantly monitors the NIC 530 and the kernel 520 and confirms whether or not a packet is discarded. When the packet discard occurs, the fact is immediately notified to the export unit 511 together with the number of discarded packets innerDroppedPackets.

サンプリング部512は、受信したパケット数をカウンタする。本カウンタは、パケットを受信時に加算されるだけである。   The sampling unit 512 counts the number of received packets. This counter is only added when a packet is received.

サンプリング部512は、前記カウンタのsamplingPopulation個(第1の個数)のパケット周期に、1周期毎に予め設定したsamplingSize(1≦samplingSize<<samplingPopulation)個(第2の個数)のパケットをランダムに選択する。具体的には、samplingPopulation個のパケット周期に乱数を用いて1〜samplingPopulationの範囲の異なるsamplingSize個の整数(N1,N2,…,NsamplingSize)を取得する。当該周期では、取得した整数(N1,N2,…,NsamplingSize)番目の受信パケットを選択パケットとして決定する。これを各周期で行う。   The sampling unit 512 randomly selects samplingSize (1 ≦ samplingSize << samplingPopulation) (second number) packets preset for each period in the samplingPopulation (first number) packet period of the counter. To do. Specifically, samplingSize integers (N1, N2,..., NsamplingSize) having different sampling ranges of 1 to SamplingPopulation are obtained using random numbers for samplingPopulation packet periods. In the period, the acquired integer (N1, N2,..., NsamplingSize) -th received packet is determined as a selection packet. This is done at each cycle.

サンプリング部512で用いるパラメータ{samplingSize,samplingPopulation}は、あらかじめ当該装置のハードウェア、ソフトウェア等の性能を考慮して、決定することが望ましい。例えば、連続で発生しうる装置内パケット廃棄の最悪値からパラメータを決定することがよい。連続のパケット廃棄が1000であれば、例えば{samplingSize,samplingPopulation}={1,1001以上}をパラメータとして採用することが望ましい。これは、1周期内で装置内廃棄されるパケットが多すぎて、選択パケットを決定できないケースをあらかじめさけることを目的としている。ただし、これには限定されず、1≦samplingSize(第2の個数)<samplingPopulation(第1の個数)であればよい。   The parameters {samplingSize, samplingPopulation} used in the sampling unit 512 are preferably determined in advance in consideration of the performance of hardware, software, and the like of the device. For example, the parameter may be determined from the worst value of in-device packet discard that can occur continuously. If the continuous packet discard is 1000, for example, {samplingSize, samplingPopulation} = {1,1001 or more} is desirably employed as a parameter. The purpose of this is to avoid a case in which a selection packet cannot be determined because there are too many packets discarded in the apparatus within one period. However, the present invention is not limited to this, and may be 1 ≦ samplingSize (second number) <samplingPopulation (first number).

エクスポート部511は、装置内廃棄検出部513から通知された装置内廃棄パケット数innerDroppedPacketsを用いて、パケット選択に用いたパラメータ{samplingSize,samplingPopulation}を{samplingSize,samplingPopulation+innerDroppedPackets}に書き換えた上で、サンプリング部512にて選択したパケットの情報と関連付けて、NetFlow、sFLow、IPFIX等のプロトコルを用いて外部装置に通知する。これにより、外部装置は結果としてパケット選択に用いられたパラメータを知ることができるため、正しい割合でトラヒック情報を取得できる。   The export unit 511 uses the in-device discard packet number innerDroppedPackets notified from the in-device discard detection unit 513, and uses the parameters {samplingSize, samplingPopulation} used for packet selection in {samplingSize, samplingPopulation + innerDropped} rewritten sampler In association with the information of the packet selected in 512, the external device is notified using a protocol such as NetFlow, sFlow, and IPFIX. As a result, since the external device can know the parameters used for packet selection as a result, it can acquire traffic information at a correct rate.

例えば、図6に示すように、サンプリング部512のパラメータが{samplingSize,samplingPopulation}={1,15}の場合に、装置内廃棄パケット数innerDroppedPackets=5となったときに、パケット選択に用いたパラメータを{samplingSize,samplingPopulation}={1,15}ではなく、{samplingSize,samplingPopulation}={1,15+5}として外部装置に通知する。   For example, as shown in FIG. 6, when the parameter of the sampling unit 512 is {samplingSize, samplingPopulation} = {1, 15}, the parameters used for packet selection when the number of in-device discarded packets innerDroppedPackets = 5 Is notified to the external device as {samplingSize, samplingPopulation} = {1,15 + 5} instead of {samplingSize, samplingPopulation} = {1,15}.

以上説明したように、本実施例は、ランダムサンプリングを行うサンプリング装置において、装置内廃棄パケット数分だけサンプリングレートの分母を増大させ、外部装置に通知するものである。   As described above, in the present embodiment, in the sampling device that performs random sampling, the denominator of the sampling rate is increased by the number of in-device discarded packets, and the external device is notified.

本実施例により、例えば汎用PC上でトラヒック監視を実現する装置において、低コストでありながら、ネットワーク内のパケット流量やパケット廃棄などのネットワーク内のトラヒックの情報を正確に取得することができる。   According to the present embodiment, for example, in a device that realizes traffic monitoring on a general-purpose PC, it is possible to accurately acquire traffic information in the network such as the packet flow rate and packet discard in the network at a low cost.

図7は、本発明の実施例4に係るパケットサンプリング装置の構成図である。   FIG. 7 is a configuration diagram of a packet sampling apparatus according to Embodiment 4 of the present invention.

図7において、710はUserLand、720はKernel、730はNIC、711はエクスポート部、712はサンプリング部、713は装置内廃棄検出部である。   In FIG. 7, 710 is a UserLand, 720 is a kernel, 730 is a NIC, 711 is an export unit, 712 is a sampling unit, and 713 is an in-device discard detection unit.

エクスポート部711、サンプリング部712、装置内廃棄検出部713はUserLand710に配置される。ネットワークインタフェース(図示していない)において受信したパケットは、NIC730、カーネル720を通過してサンプリング部712に到達する。   The export unit 711, the sampling unit 712, and the in-device discard detection unit 713 are arranged in the UserLand 710. A packet received at a network interface (not shown) passes through the NIC 730 and the kernel 720 and reaches the sampling unit 712.

図8は、本発明の実施例4に係るパケットサンプリング装置の処理内容を示す図である。   FIG. 8 is a diagram illustrating processing contents of the packet sampling device according to the fourth embodiment of the present invention.

図8において、801はネットワークインタフェースに到着したパケット、802はサンプリング部に到着したパケット、803はサンプリング部のカウンタ値、804は装置内廃棄の合算値である。811は装置内廃棄検出部713からサンプリング部712への3パケット廃棄の通知、812は同2パケット廃棄の通知である。   In FIG. 8, 801 is a packet arriving at the network interface, 802 is a packet arriving at the sampling unit, 803 is a counter value of the sampling unit, and 804 is a total value of discard in the apparatus. 811 is a notification of the discard of three packets from the in-device discard detection unit 713 to the sampling unit 712, and 812 is a notification of the discard of the two packets.

装置内廃棄検出部713は、常時NIC730およびカーネル720を監視し、パケット廃棄の有無を確認する。パケット廃棄が発生した場合は、即座にその事実をその廃棄パケット数innerDroppedPacketsとともにエクスポート部711に通知する。   The in-device discard detection unit 713 constantly monitors the NIC 730 and the kernel 720 and confirms whether or not a packet is discarded. When the packet discard occurs, the fact is immediately notified to the export unit 711 together with the number of discarded packets inner DroppedPackets.

サンプリング部712は、受信したパケット数をカウンタする。本カウンタは、パケットを受信時に加算されるだけである。   The sampling unit 712 counts the number of received packets. This counter is only added when a packet is received.

サンプリング部712は、前記カウンタのsamplingPopulation個(第1の個数)のパケット周期に、1周期毎に予め設定したsamplingSize(1≦samplingSize<<samplingPopulation)個(第2の個数)のパケットをランダムに選択する。具体的には、samplingPopulation個のパケット周期に乱数を用いて1〜samplingPopulationの範囲の異なるsamplingSize個の整数(N1,N2,…,NsamplingSize)を取得する。当該周期では、取得した整数(N1,N2,…,NsamplingSize)番目の受信パケットを選択パケットとして決定する。また、サンプリング部712は、装置内廃棄検出部713から通知された装置内廃棄パケット数innerDroppedPacketsを用いて、次周期においてパケット選択にいるパラメータ{samplingSize,samplingPopulation}を{samplingSize,samplingPopulation+innerDroppedPackets}に書き換える。これを各周期で行う。   The sampling unit 712 randomly selects samplingSize (1 ≦ samplingSize << samplingPopulation) (second number) packets preset for each period in the samplingPopulation packet number (first number) of the counter. To do. Specifically, samplingSize integers (N1, N2,..., NsamplingSize) having different sampling ranges of 1 to SamplingPopulation are obtained using random numbers for samplingPopulation packet periods. In the period, the acquired integer (N1, N2,..., NsamplingSize) -th received packet is determined as a selection packet. In addition, the sampling unit 712 uses the in-device discard packet number innerDroppedPackets notified from the in-device discard detection unit 713 to set the parameter {samplingSize, samplingPopulation} in the next cycle to {samplingSize, samplingPopulation} ederDropp + innerDrops}. This is done at each cycle.

例えば、図8に示すように、サンプリング部712のパラメータが{samplingSize,samplingPopulation}={1,15}の場合に、装置内廃棄の合算値804が5であるとき、次周期においてパケット選択に用いるパラメータを{samplingSize,samplingPopulation}={1,15}ではなく、{samplingSize,samplingPopulation}={1,15+5}に変更する。   For example, as shown in FIG. 8, when the parameter of the sampling unit 712 is {samplingSize, samplingPopulation} = {1, 15}, and the total value 804 of in-device discard is 5, it is used for packet selection in the next period. Change the parameter to {samplingSize, samplingPopulation} = {1,15 + 5} instead of {samplingSize, samplingPopulation} = {1,15}.

サンプリング部712で用いるパラメータ{samplingSize,samplingPopulation}は、あらかじめ当該装置のハードウェア、ソフトウェア等の性能を考慮して、決定することが望ましい。例えば、連続で発生しうる装置内パケット廃棄の最悪値からパラメータを決定することがよい。連続のパケット廃棄が1000であれば、例えば{samplingSize,samplingPopulation}={1,1001以上}をパラメータとして採用することが望ましい。これは、1周期内で装置内廃棄されるパケットが多すぎて、選択パケットを決定できないケースをあらかじめさけることを目的としている。ただし、これには限定されず、1≦samplingSize(第2の個数)<samplingPopulation(第1の個数)であればよい。   The parameters {samplingSize, samplingPopulation} used in the sampling unit 712 are preferably determined in advance in consideration of the performance of hardware, software, etc. of the device. For example, the parameter may be determined from the worst value of in-device packet discard that can occur continuously. If the continuous packet discard is 1000, for example, {samplingSize, samplingPopulation} = {1,1001 or more} is desirably employed as a parameter. The purpose of this is to avoid a case in which a selection packet cannot be determined because there are too many packets discarded in the apparatus within one period. However, the present invention is not limited to this, and may be 1 ≦ samplingSize (second number) <samplingPopulation (first number).

エクスポート部711は、サンプリング部712が変更した変更後のパラメータ{samplingSize,samplingPopulation}とサンプリング部712にて選択したパケットの情報とを関連付けて、NetFlow、sFLow、IPFIX等のプロトコルを用いて外部装置に通知する。これにより、外部装置は結果としてパケット選択に用いられたパラメータを知ることができるため、正しい割合でトラヒック情報を取得できる。   The export unit 711 associates the changed parameter {samplingSize, samplingPopulation} changed by the sampling unit 712 with the information of the packet selected by the sampling unit 712, and uses the protocol such as NetFlow, sFlow, IPFIX, etc. Notice. As a result, since the external device can know the parameters used for packet selection as a result, it can acquire traffic information at a correct rate.

以上説明したように、本実施例は、ランダムサンプリングを行うサンプリング装置において、装置内廃棄パケット数分だけサンプリングレートを変更するものである。   As described above, the present embodiment changes the sampling rate by the number of in-device discarded packets in a sampling device that performs random sampling.

本実施例により、例えば汎用PC上でトラヒック監視を実現する装置において、低コストでありながら、ネットワーク内のパケット流量やパケット廃棄などのネットワーク内のトラヒックの情報を正確に取得することができる。   According to the present embodiment, for example, in a device that realizes traffic monitoring on a general-purpose PC, it is possible to accurately acquire traffic information in the network such as the packet flow rate and packet discard in the network at a low cost.

図9は、本発明の実施例5に係るパケットサンプリング装置の構成図である。   FIG. 9 is a configuration diagram of a packet sampling apparatus according to the fifth embodiment of the present invention.

図9において、910はUserLand、920はKernel、930はNIC、911はエクスポート部、912はサンプリング部、913は装置内廃棄検出部である。   In FIG. 9, 910 is UserLand, 920 is Kernel, 930 is NIC, 911 is an export unit, 912 is a sampling unit, and 913 is an in-device discard detection unit.

エクスポート部911、サンプリング部912、装置内廃棄検出部913はUserLand910に配置される。ネットワークインタフェース(図示していない)において受信したパケットは、NIC930、カーネル920を通過してサンプリング部912に到達する。   The export unit 911, the sampling unit 912, and the in-device discard detection unit 913 are arranged in the UserLand 910. A packet received at a network interface (not shown) passes through the NIC 930 and the kernel 920 and reaches the sampling unit 912.

図10は、本発明の実施例5に係るパケットサンプリング装置の処理内容を示す図である。   FIG. 10 is a diagram illustrating processing contents of the packet sampling device according to the fifth embodiment of the present invention.

図10において、1001はネットワークインタフェースに到着したパケット、1002はサンプリング部に到着したパケットである。1011は装置内廃棄検出部913からサンプリング部912への3パケット廃棄時の通知、1012は同2パケット廃棄時の通知である。   In FIG. 10, 1001 is a packet arriving at the network interface, and 1002 is a packet arriving at the sampling unit. Reference numeral 1011 is a notification when the three packets are discarded from the in-device discard detection unit 913 to the sampling unit 912, and 1012 is a notification when the two packets are discarded.

装置内廃棄検出部913は、常時NIC930およびカーネル920を監視し、パケット廃棄の有無を確認する。パケット廃棄が発生した場合は、即座にその事実をサンプリング部912に通知する。   The in-device discard detection unit 913 constantly monitors the NIC 930 and the kernel 920 to check whether there is a packet discard. When packet discard occurs, the fact is immediately notified to the sampling unit 912.

サンプリング部912は、ネットワークインタフェースから受信したパケットから、予め設定した時間周期に、予め設定したsamplingTimeInterval時間(第1の時間)だけパケット抽出を行い、残るsamplingTimeSpace時間(第2の時間)はパケット抽出を行わず、装置内廃棄検出部913から装置内廃棄を通知された時に、パケット抽出する時間帯(抽出開始時刻からsamplingTimeInterval時間以内)であれば直ちにパケット抽出を停止し、抽出開始時刻からの経過時間Δtをエクスポート部に通知する。これを各周期で行う。   The sampling unit 912 performs packet extraction from a packet received from the network interface for a preset samplingTimeInterval time (first time) in a preset time period, and performs packet extraction for the remaining samplingTimeSpace time (second time). If the discard within the apparatus is notified from the in-apparatus discard detection unit 913, the packet extraction is immediately stopped if the packet is extracted (within samplingTimeInterval time from the extraction start time), and the elapsed time from the extraction start time Informs the export unit of Δt. This is done at each cycle.

例えば、図10に示すように、{samplingTimeInterval,samplingTimeSpace}={500ms,500ms}の場合に、samplingTimeInterval時間(500ms)だけパケット抽出を行い、残るsamplingTimeSpace時間(500ms)はパケット抽出を行わないように予め設定されていたが、パケットを抽出する時間帯に装置内廃棄検出部913から3パケット廃棄時の通知1011を通知されたため、直ちにパケット抽出を停止し、抽出開始時刻からの経過時間Δt(230ms)をエクスポート部911に通知する。   For example, as shown in FIG. 10, when {samplingTimeInterval, samplingTimeSpace} = {500 ms, 500 ms}, packet extraction is performed only for samplingTimeInterval time (500 ms), and packet sampling is not performed for the remaining samplingTimeSpace time (500 ms). Although it is set, since the notification 1011 at the time of discarding three packets is notified from the in-device discard detection unit 913 during the time period for extracting the packet, the packet extraction is immediately stopped and the elapsed time Δt (230 ms) from the extraction start time Is notified to the export unit 911.

サンプリング部912で用いるパラメータ{samplingTimeInterval,samplingTimeSpace}は、あらかじめ当該装置のハードウェア、ソフトウェア等の性能を考慮して、決定することが望ましい。   The parameters {samplingTimeInterval, samplingTimeSpace} used in the sampling unit 912 are desirably determined in advance in consideration of the performance of hardware, software, and the like of the device.

エクスポート部911は、パケット抽出に用いるパラメータ{samplingTimeInterval,samplingTimeSpace}をサンプリング部912から通知されたΔtを元に実際にパケット抽出に用いたパラメータ{samplingTimeInterva−Δt,samplingTimeSpace+Δt}に書き換えたうえで、サンプリング部912にて抽出したパケットに関する情報と関連付けて、NetFlow、sFLow、IPFIX等のプロトコルを用いて外部装置に通知する。   The export unit 911 rewrites the parameters {samplingTimeInterval, samplingTimeSpace} used for packet extraction into the parameters {samplingTimeInterva-Δt, samplingTimeSpace + Δt} actually used for packet extraction based on Δt notified from the sampling unit 912. In association with the information about the packet extracted in 912, the external device is notified using a protocol such as NetFlow, sFlow, and IPFIX.

図10の例では、エクスポート部911は、{samplingTimeInterval,samplingTimeSpace}を{230ms,670ms}として外部装置に通知する。   In the example of FIG. 10, the export unit 911 notifies {sampling TimeInterval, samplingTimeSpace} to {230 ms, 670 ms} to the external device.

以上説明したように、本実施例は、時間サンプリングを行うサンプリング装置において、装置内廃棄が発生した時間以降を非抽出時間とするものである。   As described above, in the present embodiment, in the sampling device that performs time sampling, the time after the occurrence of the in-device discarding is set as the non-extraction time.

本実施例により、例えば汎用PC上でトラヒック監視を実現する装置において、低コストでありながら、ネットワーク内のパケット流量やパケット廃棄などのネットワーク内のトラヒックの情報を正確に取得することができる。   According to the present embodiment, for example, in a device that realizes traffic monitoring on a general-purpose PC, it is possible to accurately acquire traffic information in the network such as the packet flow rate and packet discard in the network at a low cost.

図11は、本発明の実施例6に係るパケットサンプリング装置の構成図である。   FIG. 11 is a configuration diagram of a packet sampling apparatus according to Embodiment 6 of the present invention.

図11において、1110はUserLand、1120はKernel、1130はNIC、1111はエクスポート部、1112はサンプリング部、1113は装置内廃棄検出部、1114はネットワーク廃棄検出部である。   In FIG. 11, 1110 is UserLand, 1120 is Kernel, 1130 is NIC, 1111 is an export unit, 1112 is a sampling unit, 1113 is an in-device discard detection unit, and 1114 is a network discard detection unit.

エクスポート部1111、サンプリング部1112、装置内廃棄検出部1113、ネットワーク廃棄検出部114はUserLand1110に配置される。ネットワークインタフェース(図示していない)において受信したパケットは、NIC1130、カーネル1120を通過してサンプリング部1112に到達する。   The export unit 1111, the sampling unit 1112, the in-device discard detection unit 1113, and the network discard detection unit 114 are arranged in the UserLand 1110. A packet received at a network interface (not shown) passes through the NIC 1130 and the kernel 1120 and reaches the sampling unit 1112.

図12は、本発明の実施例6に係るパケットサンプリング装置の処理内容を示す図である。   FIG. 12 is a diagram illustrating processing contents of the packet sampling device according to the sixth embodiment of the present invention.

図12において、1201はネットワークインタフェースに到着したパケット、1202はサンプリング部に到着したパケット、1203はサンプリング部において抽出したパケットのシーケンス番号である。1211は装置内廃棄検出部1113からネットワーク廃棄検出部1114への3パケット廃棄の通知、1212は同2パケット廃棄の通知である。   In FIG. 12, 1201 is a packet arriving at the network interface, 1202 is a packet arriving at the sampling unit, and 1203 is a sequence number of the packet extracted at the sampling unit. Reference numeral 1211 denotes a notification of three-packet discard from the in-device discard detection unit 1113 to the network discard detection unit 1114, and 1212 denotes a notification of the two-packet discard.

装置内廃棄検出部1113は、常時NIC1130およびカーネル1120を監視し、パケット廃棄の有無を確認する。パケット廃棄が発生した場合は、即座にその事実をその廃棄パケット数innerDroppedPacketsとともにネットワーク廃棄検出部1114に通知する。   The in-device discard detection unit 1113 constantly monitors the NIC 1130 and the kernel 1120 to check whether there is any packet discard. When packet discard occurs, the fact is immediately notified to the network discard detection unit 1114 together with the number of discarded packets inner DroppedPackets.

サンプリング部1112は、ネットワークインタフェースから受信したパケットから、予め設定した時間周期に、予め設定したsamplingTimeInterval時間(第1の時間)だけパケット抽出を行い、残るsamplingTimeSpace時間(第2の時間)はパケット抽出を行わない。これを各周期で行う。   The sampling unit 1112 performs packet extraction for a preset samplingTimeInterval time (first time) in a preset time period from a packet received from the network interface, and performs packet extraction for the remaining samplingTimeSpace time (second time). Not performed. This is done at each cycle.

例えば、図12に示すように、{samplingTimeInterval,samplingTimeSpace}={500ms,500ms}の場合に、samplingTimeInterval時間(500ms)だけパケット抽出を行い、残るsamplingTimeSpace時間(500ms)はパケット抽出を行わない。   For example, as shown in FIG. 12, when {samplingTimeInterval, samplingTimeSpace} = {500 ms, 500 ms}, packet extraction is performed only for samplingTimeInterval time (500 ms), and packet extraction is not performed for the remaining samplingTimeSpace time (500 ms).

サンプリング部1112で用いるパラメータ{samplingTimeInterval,samplingTimeSpace}は、あらかじめ当該装置のハードウェア、ソフトウェア等の性能を考慮して、決定することが望ましい。   The parameters {samplingTimeInterval, samplingTimeSpace} used in the sampling unit 1112 are desirably determined in advance in consideration of the performance of the hardware, software, and the like of the device.

ネットワーク廃棄検出部1114はサンプリング部1112において抽出したパケットのシーケンス番号1203を監視し、その抜けからネットワークでのパケット廃棄を検出し、その廃棄パケット数をカウントし、装置内廃棄検出部1113から装置内廃棄を通知されたときに抽出したパケットのシーケンス番号に抜けがある場合は、ネットワークでのパケット廃棄としては検出しない。ネットワーク廃棄検出部1114は、検出したネットワークでのパケット廃棄(パケットロス)に関する情報をエクスポート部1111に通知する。   The network discard detection unit 1114 monitors the sequence number 1203 of the packet extracted by the sampling unit 1112, detects the packet discard in the network from the omission, counts the number of discarded packets, and the in-device discard detection unit 1113 If there is a missing sequence number in the packet extracted when notified of discard, it is not detected as packet discard in the network. The network discard detection unit 1114 notifies the export unit 1111 of information related to packet discard (packet loss) in the detected network.

図12の例では、シーケンス番号1203が1007の時に4パケット廃棄を検出するが、装置内廃棄検出部1113から3パケット廃棄の通知1211を通知されているため、ネットワークの廃棄は1パケットとして検出する。   In the example of FIG. 12, the discard of 4 packets is detected when the sequence number 1203 is 1007, but the discard of the network is detected as 1 packet because the in-device discard detection unit 1113 is notified of the discard of 3 packets 1211. .

エクスポート部1111は、ネットワーク廃棄検出部1114にて検出したパケット廃棄(パケットロス)に関する情報を、サンプリング部1112にて抽出したパケットに関する情報と関連付けて、NetFlow、sFLow、IPFIX等のプロトコルを用いて外部装置に通知する。   The export unit 1111 associates the information about the packet discard (packet loss) detected by the network discard detection unit 1114 with the information about the packet extracted by the sampling unit 1112, and uses an external protocol such as NetFlow, sFlow, or IPFIX. Notify the device.

図12の例では、エクスポート部1111はネットワーク廃棄パケット数=1として外部装置に通知する。   In the example of FIG. 12, the export unit 1111 notifies the external device that the number of discarded network packets = 1.

以上説明したように、本実施例は、時間サンプリングを行うサンプリング装置において、ネットワークで発生した廃棄と装置内で発生した廃棄とを区別するものである。   As described above, the present embodiment distinguishes between discards generated in the network and discards generated in the apparatus in the sampling apparatus that performs time sampling.

本実施例により、例えば汎用PC上でトラヒック監視を実現する装置において、低コストでありながら、ネットワーク内のパケット流量やパケット廃棄などのネットワーク内のトラヒックの情報を正確に取得することができる。   According to the present embodiment, for example, in a device that realizes traffic monitoring on a general-purpose PC, it is possible to accurately acquire traffic information in the network such as the packet flow rate and packet discard in the network at a low cost.

以上、本発明者によってなされた発明を、前記実施例に基づき具体的に説明したが、本発明は、前記実施例に限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは勿論である。   As mentioned above, the invention made by the present inventor has been specifically described based on the above embodiments. However, the present invention is not limited to the above embodiments, and various modifications can be made without departing from the scope of the invention. Of course.

110、310、510、710、910、1110…UserLand、120、320、520、720、920、1120…Kernel、130、330、530、730、930、1130…NIC、111、311、511、711、911、1111…エクスポート部、112、312、512、712、912、1112…サンプリング部、113、313、513、713、913、1113…は装置内廃棄検出部、1114…ネットワーク廃棄検出部、201、401、601、801、1001、1201…ネットワークインタフェースに到着したパケット、202、402、602、802、1002、1202…サンプリング部に到着したパケット、203、403、603、803…サンプリング部のカウンタ値、604、804…装置内廃棄の合算値、1203…シーケンス番号、211、411、811…装置内廃棄検出部からサンプリング部への3パケット廃棄の通知、212、412、812…同2パケット廃棄の通知、611…装置内廃棄検出部からエクスポート部への通知、612…同2パケット廃棄の通知、1011…装置内破棄検出からサンプリング部への3パケット廃棄時の通知、1012…同2パケット廃棄時の通知、1211…装置内破棄検出部からネットワーク廃棄検出部への3パケット廃棄の通知、1212…同2パケット廃棄の通知 110, 310, 510, 710, 910, 1110 ... UserLand, 120, 320, 520, 720, 920, 1120 ... Kernel, 130, 330, 530, 730, 930, 1130 ... NIC, 111, 311, 511, 711, 911, 1111, ... Export unit, 112, 312, 512, 712, 912, 1112 ... Sampling unit, 113, 313, 513, 713, 913, 1113 ... are in-device discard detection units, 1114 ... network discard detection unit, 201, 401, 601, 801, 1001, 1201... Packet arriving at the network interface, 202, 402, 602, 802, 1002, 1202... Arriving at the sampling unit, 203, 403, 603, 803. , 604, 804... Sum of discards within the device, 1203... Sequence number, 211, 411, 811... Notification of discard of 3 packets from the discard unit within the device to the sampling unit, 212, 412, 812. Notification, 611... Notification from the in-device discard detection unit to the export unit, 612... Notification of discard of the two packets. 1011... Notification of discard of three packets from the in-device discard detection to the sampling unit. 1211 ... Notification of 3 packet discard from the in-device discard detection unit to the network discard detection unit, 1212 ... Notification of 2 packet discard

Claims (10)

ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された割合でランダムに選択するパケットサンプリング装置において、
前記ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその廃棄パケット数を前記サンプリング部に通知する装置内廃棄検出部と、
到着したパケット数をカウントし、カウントしたカウンタ値と乱数を用いて、予め設定した第1の個数のパケット周期に予め設定した第2の個数(1≦第2の個数<第1の個数)のパケットを選択し、前記装置内廃棄検出部から通知された廃棄パケット数を前記カウンタ値に加算し、装置内で廃棄されたパケットが前記乱数を用いて選択されたパケットと一致すると判明した場合に、判明以降のパケットから代理の選択パケットを決定するサンプリング部と、
前記サンプリング部で選択したパケットの情報を外部装置に通知するエクスポート部と
を有することを特徴とするパケットサンプリング装置。
In a packet sampling device comprising a network interface and randomly selecting a part of the packets received from the network interface at a preset rate,
An in-device discard detection unit that monitors packet discard at one or a plurality of parts from the network interface to the sampling unit, and notifies the sampling unit of the number of discarded packets when packet discard is detected;
The number of packets that arrived is counted, and a second number (1 ≦ second number <first number) that is preset in a first number of packet cycles that is preset using the counted counter value and a random number. When a packet is selected, the number of discarded packets notified from the in-device discard detection unit is added to the counter value, and it is found that the packet discarded in the device matches the packet selected using the random number A sampling unit for determining a proxy selection packet from the packets after the discovery,
A packet sampling device, comprising: an export unit that notifies an external device of information on the packet selected by the sampling unit.
ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された割合でランダムに選択するパケットサンプリング装置において、
前記ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその廃棄パケット数を前記サンプリング部に通知する装置内廃棄検出部と、
到着したパケット数をカウントし、カウントしたカウンタ値と乱数を用いて、予め設定した第1の個数のパケット周期に予め設定した第2の個数(1≦第2の個数<第1の個数)のパケットを選択し、選択しなかったパケットの一部もしくは全てをバッファに記憶し、前記装置内廃棄検出部から通知された廃棄パケット数を前記カウンタ値に加算し、装置内で廃棄されたパケットが前記乱数を用いて選択されたパケットと一致すると判明した場合に前記バッファに記憶したパケットから代理の選択パケットを決定するサンプリング部と、
前記サンプリング部で選択したパケットの情報を外部装置に通知するエクスポート部と
を有することを特徴とするパケットサンプリング装置。
In a packet sampling device comprising a network interface and randomly selecting a part of the packets received from the network interface at a preset rate,
An in-device discard detection unit that monitors packet discard at one or a plurality of parts from the network interface to the sampling unit, and notifies the sampling unit of the number of discarded packets when packet discard is detected;
The number of packets that arrived is counted, and a second number (1 ≦ second number <first number) that is preset in a first number of packet cycles that is preset using the counted counter value and a random number. Select a packet, store some or all of the unselected packets in the buffer, add the number of discarded packets notified from the in-device discard detection unit to the counter value, and A sampling unit that determines a proxy selection packet from the packet stored in the buffer when it is found to match the packet selected using the random number;
A packet sampling device, comprising: an export unit that notifies an external device of information on the packet selected by the sampling unit.
ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された割合でランダムに選択するパケットサンプリング装置において、
前記ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその廃棄パケット数をエクスポート部に通知する装置内廃棄検出部と、
到着したパケット数をカウントし、カウントしたカウンタ値と乱数を用いて、予め設定した第1の個数のパケット周期に予め設定した第2の個数(1≦第2の個数<第1の個数)のパケットを選択し、第1の個数のパケットを受信した間に前記装置内廃棄検出部から通知された装置内廃棄パケット数をエクスポート部に通知するサンプリング部と、
前記パケット選択に用いた第1の個数を本来のそれに前記サンプリング部から通知された装置内廃棄パケット数を加算した値に書き換えた値としたうえで、前記サンプリング部で選択したパケットの情報とを関連付けて外部装置に通知するエクスポート部と
を有することを特徴とするパケットサンプリング装置。
In a packet sampling device comprising a network interface and randomly selecting a part of the packets received from the network interface at a preset rate,
An in-device discard detection unit that monitors packet discard at one or a plurality of parts from the network interface to the sampling unit, and notifies the export unit of the number of discarded packets when packet discard is detected;
The number of packets that arrived is counted, and a second number (1 ≦ second number <first number) that is preset in a preset first number of packet cycles using the counted counter value and a random number. A sampling unit that selects a packet and notifies the export unit of the number of in-device discarded packets notified from the in-device discard detection unit while receiving the first number of packets;
The first number used for the packet selection is changed to a value obtained by adding the number of discarded packets in the apparatus notified from the sampling unit to the original number, and information on the packet selected by the sampling unit A packet sampling device comprising: an export unit that associates and notifies an external device.
ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された割合でランダムに選択するパケットサンプリング装置において、
ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその廃棄パケット数を前記サンプリング部に通知する装置内廃棄検出部と、
到着したパケット数をカウントし、カウントしたカウンタ値と乱数を用いて、予め設定した第1の個数のパケット周期に予め設定した第2の個数(1≦第2の個数<第1の個数)のパケットを選択し、前記装置内廃棄検出部から通知された装置内廃棄パケット数に応じて、次周期においてパケット選択に用いるパラメータ{第2の個数,第1の個数}を変更するサンプリング部と、
前記次周期においてパケット選択に用いる変更後のパラメータ{第2の個数,第1の個数}と前記サンプリング部で選択したパケットの情報とを関連付けて外部装置に通知するエクスポート部と
を有することを特徴とするパケットサンプリング装置。
In a packet sampling device comprising a network interface and randomly selecting a part of the packets received from the network interface at a preset rate,
An in-device discard detection unit that monitors packet discard in one or more parts from the network interface to the sampling unit, and notifies the sampling unit of the number of discarded packets when packet discard is detected,
The number of packets that arrived is counted, and a second number (1 ≦ second number <first number) that is preset in a preset first number of packet cycles using the counted counter value and a random number. A sampling unit that selects a packet and changes a parameter {second number, first number} used for packet selection in the next period in accordance with the number of in-device discarded packets notified from the in-device discard detection unit;
An export unit for associating the changed parameter {second number, first number} used for packet selection in the next period with the information of the packet selected by the sampling unit, and notifying the external device; Packet sampling device.
ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された時間だけ抽出するパケットサンプリング装置において、
前記ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその事実を前記サンプリング部に通知する装置内廃棄検出部と、
到着したパケットから、予め設定した時間周期に、予め設定した第1の時間だけパケット抽出を行い、残る第2の時間はパケット抽出を行わず、前記装置内廃棄検出部から装置内廃棄を通知された時に、パケット抽出する時間帯(抽出開始時刻から第1の時間以内)であれば直ちにパケット抽出を停止し、抽出開始時刻からの経過時間Δtをエクスポート部に通知するサンプリング部と、
パケット抽出に用いるパラメータ{第1の時間,第2の時間}を前記サンプリング部から通知されたΔtを元に実際にパケット抽出に用いたパラメータ{第1の時間−Δt,第2の時間+Δt}に書き換えたうえで、前記サンプリング部にて抽出したパケットに関する情報と関連付けて外部装置に通知するエクスポート部と
を有することを特徴とするパケットサンプリング装置。
In a packet sampling apparatus comprising a network interface and extracting a part of packets from packets received from the network interface for a preset time,
An in-device discard detection unit that monitors packet discard at one or more parts from the network interface to the sampling unit and notifies the sampling unit of the fact when packet discard is detected,
The packet is extracted from the arriving packet for a preset first time in the preset time period, and the packet is not extracted for the remaining second time, and the in-device discard is notified from the in-device discard detection unit. A sampling unit that immediately stops packet extraction if it is a time zone for packet extraction (within a first time from the extraction start time), and notifies the export unit of an elapsed time Δt from the extraction start time;
Parameters {first time−Δt, second time + Δt} actually used for packet extraction based on Δt notified from the sampling unit of parameters used for packet extraction {first time, second time} A packet sampling device comprising: an export unit that rewrites the information to the external device in association with information about the packet extracted by the sampling unit.
ネットワークインタフェースを備え、該ネットワークインタフェースから受信したパケットの中から一部のパケットを予め設定された時間だけ抽出するパケットサンプリング装置において、
前記ネットワークインタフェースからサンプリング部にいたるまでの単数もしくは複数の部位でのパケット廃棄を監視し、パケット廃棄を検出した場合にその廃棄パケット数をネットワーク廃棄検出部に直ちに通知する装置内廃棄検出部と、
到着したパケットから、予め設定した時間周期に、予め設定した第1の時間だけパケット抽出を行い、残る第2の時間はパケット抽出を行わないサンプリング部と、
前記サンプリング部において抽出したパケットのシーケンス番号を監視し、その抜けからネットワークでのパケット廃棄を検出し、その廃棄パケット数をカウントし、前記装置内廃棄検出部から装置内廃棄を通知されたときに抽出したパケットのシーケンス番号に抜けがある場合は、ネットワークでのパケット廃棄としては検出しないネットワーク廃棄検出部と、
前記ネットワーク廃棄検出部にて検出したパケット廃棄に関する情報を外部装置に通知するエクスポート部と
を有することを特徴とするパケットサンプリング装置。
In a packet sampling apparatus comprising a network interface and extracting a part of packets from packets received from the network interface for a preset time,
An in-device discard detection unit that monitors packet discard in one or more parts from the network interface to the sampling unit, and immediately notifies the network discard detection unit of the number of discarded packets when packet discard is detected;
A sampling unit that performs packet extraction for a first time set in advance in a preset time period and does not perform packet extraction for the remaining second time;
The sequence number of the packet extracted in the sampling unit is monitored, the packet discard in the network is detected from the omission, the number of discarded packets is counted, and the in-device discard is notified from the in-device discard detection unit If there is a missing sequence number in the extracted packet, a network discard detection unit that does not detect packet discard in the network,
A packet sampling device comprising: an export unit that notifies an external device of information related to packet discard detected by the network discard detection unit.
請求項1に記載のパケットサンプリング装置において、
サンプリング部は、判明以降のパケットからの代理の選択パケットの決定は、判明直後に受信したパケットを代理の選択パケットと決定するものであることを特徴とするパケットサンプリング装置。
The packet sampling device according to claim 1,
The packet sampling apparatus, wherein the sampling unit determines a proxy selection packet from a packet after the determination to determine a packet received immediately after the determination as a proxy selection packet.
請求項1に記載のパケットサンプリング装置において、
サンプリング部は、代理の選択パケットの決定は、判明以降のパケットから乱数を用いて決定するものであることを特徴とするパケットサンプリング装置。
The packet sampling device according to claim 1,
The packet sampling apparatus, wherein the sampling unit determines the proxy selection packet by using a random number from a packet after the determination.
請求項2に記載のパケットサンプリング装置において、
サンプリング部は、選択しなかったパケットのバッファへの記憶は、最新の非選択パケットから予め設定した数だけを記憶し、予め設定した数を越えるものは古いパケットから削除するものであって、代理の選択パケットの決定は、前記バッファに記憶したパケットのうち最新のパケットもしくは最古のパケットを代理の選択パケットとして決定するものであることを特徴とするパケットサンプリング装置。
The packet sampling device according to claim 2, wherein
The sampling unit stores only the preset number from the latest non-selected packet in the buffer of the unselected packet, and deletes the packet exceeding the preset number from the old packet. The selection packet is determined by determining the latest packet or the oldest packet among the packets stored in the buffer as a proxy selection packet.
請求項2に記載のパケットサンプリング装置において、
サンプリング部は、代理の選択パケットの決定は、前記バッファに記憶したパケットから乱数を用いて選択したパケットを代理の選択パケットとして決定するものであることを特徴とするパケットサンプリング装置。
The packet sampling device according to claim 2, wherein
The sampling unit determines a proxy selection packet by determining, as a proxy selection packet, a packet selected using a random number from the packets stored in the buffer.
JP2010031075A 2010-02-16 2010-02-16 Packet sampling device Expired - Fee Related JP4950312B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010031075A JP4950312B2 (en) 2010-02-16 2010-02-16 Packet sampling device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010031075A JP4950312B2 (en) 2010-02-16 2010-02-16 Packet sampling device

Publications (2)

Publication Number Publication Date
JP2011171797A JP2011171797A (en) 2011-09-01
JP4950312B2 true JP4950312B2 (en) 2012-06-13

Family

ID=44685497

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010031075A Expired - Fee Related JP4950312B2 (en) 2010-02-16 2010-02-16 Packet sampling device

Country Status (1)

Country Link
JP (1) JP4950312B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008219127A (en) * 2007-02-28 2008-09-18 Nec Corp Network quality measuring instrument, network quality measuring method, and network quality measuring program
JP4911046B2 (en) * 2008-01-21 2012-04-04 富士通株式会社 Communication quality measuring apparatus, communication terminal apparatus, communication quality measuring method, and computer program

Also Published As

Publication number Publication date
JP2011171797A (en) 2011-09-01

Similar Documents

Publication Publication Date Title
JP4512196B2 (en) Abnormal traffic detection method and packet relay apparatus
CN106416171B (en) Characteristic information analysis method and device
CN106471778B (en) Attack detection device and attack detection method
WO2002087276A2 (en) Method and device for robust real-time estimation of bottleneck bandwidth
US9923870B2 (en) Method and system for analyzing a data flow
JP2008136012A (en) Traffic analyzing device and analyzing method
WO2017133014A1 (en) Method and system for network performance detection based on receiving end in tcp transmission stream
WO2018120915A1 (en) Ddos attack detection method and device
JP5963974B2 (en) Information processing apparatus, information processing method, and program
JP2003244238A (en) Traffic monitoring device and method, and computer program
JP4950312B2 (en) Packet sampling device
JP5180247B2 (en) Packet sampling apparatus and method and program
JP6455135B2 (en) Packet extraction apparatus, packet extraction program, and packet extraction method
JP5199224B2 (en) Flow communication quality estimation method, apparatus and program
JP5396999B2 (en) Packet loss frequency estimation system, packet loss frequency estimation method and program
CN106603335B (en) Private software traffic monitoring method and device
CN106817268B (en) DDOS attack detection method and system
JP5437194B2 (en) Flow communication quality estimation method, apparatus and program
JP2015195511A (en) Packet analysis program, packet analysis device, and packet analysis method
JP5798530B2 (en) Packet processing apparatus and packet processing method
JP4282556B2 (en) Flow level communication quality management apparatus and method and program
WO2023112173A1 (en) Traffic monitoring device, traffic monitoring method, and program
JP7238993B2 (en) Burst traffic detection device and method
JP4898648B2 (en) High packet rate flow online detection method, system therefor, and program therefor
JP5316318B2 (en) Congestion detection device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120224

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120308

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

Free format text: PAYMENT UNTIL: 20150316

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4950312

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees