JP2009260706A - Accuracy improving method by post-processing time correction in packet measurement, correcting system, and program of same - Google Patents

Accuracy improving method by post-processing time correction in packet measurement, correcting system, and program of same Download PDF

Info

Publication number
JP2009260706A
JP2009260706A JP2008107929A JP2008107929A JP2009260706A JP 2009260706 A JP2009260706 A JP 2009260706A JP 2008107929 A JP2008107929 A JP 2008107929A JP 2008107929 A JP2008107929 A JP 2008107929A JP 2009260706 A JP2009260706 A JP 2009260706A
Authority
JP
Japan
Prior art keywords
time
packet
measurement
ntp
server
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.)
Granted
Application number
JP2008107929A
Other languages
Japanese (ja)
Other versions
JP5053918B2 (en
Inventor
Ginga Kawaguchi
銀河 川口
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 JP2008107929A priority Critical patent/JP5053918B2/en
Publication of JP2009260706A publication Critical patent/JP2009260706A/en
Application granted granted Critical
Publication of JP5053918B2 publication Critical patent/JP5053918B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve, with the accuracy higher than that in the prior art, a problem resulting from low accuracy of a clock for measurement with an ordinary low-price personal computer in view of achieving higher accuracy of time stamp. <P>SOLUTION: A general purpose computer 4 receives first a notifying packet from a network time synchronous protocol (hereinafter, referred to as NTP) server 2 and presets the setting for asynchronization with a built-in clock. The computer 4 also periodically executes the particular command for issuing an inquiry to the NTP server 2 and acquiring time information from a returning packet. In addition, the computer 4 periodically monitors deviation of the time by the packets from the NTP server 2 and statistically evaluates results of the plurality of inquiries started from the first inquiry in order to calculate amount of correction of the time error and correct, based on the amount of correction, a value of time stamp when the communication packets transmitted to a measuring object client terminal 3 from a measuring object server 5 are captured. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、IP通信などのパケット通信ネットワークにおいて、通信パケットをキャプチャすることにより、品質測定を行う際に活用できる方法、すなわち、パケットキャプチャとそのタイムスタンプによるネットワーク品質測定技術に関する。   The present invention relates to a method that can be utilized when performing quality measurement by capturing a communication packet in a packet communication network such as IP communication, that is, a network quality measurement technique using packet capture and its time stamp.

汎用計算機(パソコン)を用いて、パケットキャプチャによるネットワーク計測を行う場合、遅延や遅延ゆらぎといった指標はITU−T Y.1540勧根といった国際標準においても定められている指標で、重要な測定項目である。
この遅延や遅延ゆらぎを計測するためには、パケットキャプチャ時にキャプチャした正確な時刻を記録する、つまりタイムスタンプを付与する必要がある。
この際、典型的には測定対象の遅延・遅延ゆらぎの値がms(ミリ秒)の単位であることから、タイムスタンプにも少なくとも1ms程度、できれば0.1ms程度の精度が必要である。
When performing network measurement by packet capture using a general-purpose computer (personal computer), indices such as delay and delay fluctuation are ITU-T Y. It is an index that is also defined in international standards such as 1540 Kokune and is an important measurement item.
In order to measure this delay and delay fluctuation, it is necessary to record the exact time captured at the time of packet capture, that is, to give a time stamp.
At this time, since the delay value and delay fluctuation value to be measured are typically in units of ms (milliseconds), the time stamp also needs to have an accuracy of at least about 1 ms, preferably about 0.1 ms.

パソコンで計測を行う際には、パケットのタイムスタンプ付与をソフトウェアで行うが、測定用途ではない汎用ハードウェアのパソコンを用いると、一般には精度の良くない時計を内蔵しているため、時計の誤差が計測精度に悪影響をもたらす。
従来は、この点を解決するために、以下のような手法が用いられてきた。
a.計測用パソコンに、GPS電波やCDMA電波による高価な時刻供給源を接続して、計測用パソコンの時刻を時刻供給源と同期させる方法。
b.ネットワーク上の時刻同期サービス(NTPサーバ)と、計測用パソコンを時刻同期させる方法。
c.計測用パソコンの内蔵時計を高精度な時計素子に交換する方法。
When measuring with a personal computer, packet time stamping is performed with software, but if you use a general-purpose hardware computer that is not used for measurement, a clock with inaccurate accuracy is generally built in. Adversely affects measurement accuracy.
Conventionally, in order to solve this point, the following method has been used.
a. A method in which an expensive time supply source using GPS radio waves or CDMA radio waves is connected to a measurement personal computer, and the time of the measurement personal computer is synchronized with the time supply source.
b. A method of synchronizing the time between a time synchronization service (NTP server) on a network and a measurement personal computer.
c. A method of replacing the built-in clock of a measuring PC with a highly accurate clock element.

川口 銀河、織 克典、“パケットキャプチャ精度評価における時刻較正法”2007年電子情報通信学会通信ソサイエティ大会講演論文集2、B−7−46Ginkawa Kawaguchi, Katsunori Ori, “Time Calibration Method for Packet Capture Accuracy Evaluation” 2007 IEICE Communication Society Proceedings 2, B-7-46

前述の従来の手法では、以下のような問題点がある。
*a.およびc.については、高価な特殊機材が必要であること。
*a.については、さらに室内などで電波が届き難い場合などに適用範囲が制限されること。
*b.については、NTP(ネットワーク時刻同期プロトコル)を使用する場合には、常時補正・同期する設定にすると、数分に一度程度のタイミングで時刻補正・修正が実施され、各修正のタイミングの前後でローカルのパソコンの時計がずれたり、変化が安定しなくなるなどの影響があること、および、NTP自体がネットワークの遅延などの影響を受け、常にmsの精度が得られるわけではないこと。
The above-described conventional method has the following problems.
* A. And c. For that, expensive special equipment is required.
* A. In addition, the scope of application shall be restricted when it is difficult to reach the radio wave indoors.
* B. When using NTP (Network Time Synchronization Protocol), if it is set to always correct and synchronize, the time is corrected and corrected at a timing of once every few minutes. There is an influence such as the clock of the personal computer being shifted or the change is not stable, and the NTP itself is affected by the delay of the network and the accuracy of ms is not always obtained.

(目的)
本発明の目的は、このような従来の手法の問題を解消するために、一般の安価なパソコンによる測定について、従来よりも高精度に時計精度の低さからくる問題を解決し、タイムスタンプの高精度化を可能とするパケット測定における後処理時刻補正による精度改善方法および補正システム、ならびにそのプログラムを提供することにある。
(the purpose)
The object of the present invention is to solve the problem of the conventional technique by solving the problem of the clock accuracy with a higher accuracy than in the past with respect to the measurement by a general inexpensive personal computer. An object of the present invention is to provide an accuracy improvement method and correction system by post-processing time correction in packet measurement that enables high accuracy, and a program thereof.

本発明のパケット測定における後処理時刻補正による精度改善方法は、パケットがキャプチャされた時刻を、実際の時刻からの誤差を含むPCの内蔵時計で計測する場合に、PCの内蔵時計を常にNTP(ネットワーク時刻同期プロトコル)サーバと同期させるのではなく、NTPサーバと内蔵時計の誤差を把握し、パケットキャプチャ時のタイムスタンプを補正することにより、タイムスタンプの高精度化を可能にする。
また、本発明の後処理時刻補正システムは、計測時に、測定対象サーバから測定対象クライアント端末への通信パケットを経由させる際に、該通信パケットをミラーポートへコピーして、該ミラーポートを介して接続されている計測用汎用計算機のキャプチャ用ポートに該通信パケットを転送するスイッチ手段と、ネットワークの時刻同期を行うNTPサーバと、該NTPサーバとの間で、NTP通信用ポートを介して通知パケットおよび問い合わせに対する応答パケットを受信して、定期的に該NTPサーバからのパケットによる時刻のズレを監視し、算出した補正量により上記通信パケットキャプチャ時のタイムスタンプの値を修正する計測用汎用計算機とで構成される。
According to the method of improving accuracy by post-processing time correction in packet measurement according to the present invention, when the time when a packet is captured is measured by the internal clock of the PC including an error from the actual time, the internal clock of the PC is always set to NTP ( Network time synchronization protocol) Instead of synchronizing with a server, it is possible to make the time stamp highly accurate by grasping the error between the NTP server and the built-in clock and correcting the time stamp at the time of packet capture.
Further, the post-processing time correction system of the present invention copies the communication packet to the mirror port when passing the communication packet from the measurement target server to the measurement target client terminal at the time of measurement. A switch means for transferring the communication packet to the capture port of the connected general-purpose computer for measurement, an NTP server for synchronizing the time of the network, and a notification packet via the NTP communication port between the NTP server And a general-purpose computer for measurement that receives a response packet to the inquiry, periodically monitors the time lag due to the packet from the NTP server, and corrects the time stamp value at the time of capturing the communication packet with the calculated correction amount; Consists of.

本発明によれば、一般の安価なパソコンによる測定について、従来よりも高精度に時計精度の低さからくる問題を解決し、タイムスタンプの高精度化を可能にする。   According to the present invention, it is possible to solve the problem caused by the low accuracy of the clock with a higher accuracy than before in the measurement by a general inexpensive personal computer, and to make the time stamp highly accurate.

まず、一般のパソコンにおいて、内蔵時計の精度が悪いのは、温度変化などにより精度を維持できないためであって、適切な補正をすれば、数分〜数十分単位では測定に十分なレベルで安定していることが分っている(上記非特許文献1における時刻更正法参照)。なお、ここで言う、十分なレベルでの安定とは、『時計自体に起因するズレは0.1ms以下程度』ということである。   First, the accuracy of the built-in clock in general computers is poor because it cannot be maintained due to temperature changes, etc. If it is corrected appropriately, it is at a level sufficient for measurement in minutes to tens of minutes. It is known that it is stable (see the time correction method in Non-Patent Document 1 above). Here, the stability at a sufficient level means that “the deviation due to the watch itself is about 0.1 ms or less”.

前述のb.のNTPによる補正の問題点は、主として以下の2点である。
1)NTPサーバからのntpパケットがネットワーク上を伝わってくるため、時刻精度が安定しないこと。
2)NTPサーバからntpパケットにより通知された時刻情報による時刻補正をローカル側パソコンの内部時計に対して随時実施することにより、以下の問題点が発生して、内蔵時計の刻む時間が安定しないこと。
*内蔵時計の修正をする瞬間での時刻の飛び
*修正前後での時計の速度の差(時計の自走速度を補正するパラメータをOSに適用 するため)
B. The problems of correction by NTP are mainly the following two points.
1) Since ntp packets from the NTP server are transmitted over the network, the time accuracy is not stable.
2) By performing time correction based on the time information notified from the NTP server by the ntp packet to the internal clock of the local personal computer as needed, the following problems occur and the time stamped by the built-in clock is not stable. .
* Time jump at the moment of correction of the built-in clock * Difference in clock speed before and after correction (to apply a parameter to correct the self-running speed of the clock to the OS)

上記1)については、NTPサーバからの各NTPパケット個別に評価するのではなく、定期的なNTP時刻通知パケットの時刻情報とローカルの内部時計との差を時間の経過と共に記録して統計的に評価することにより、精度を改善できる。
また、2)にある問題点は、『内蔵時計をNTPにより同期させることを敢えてしない』という設定をすることにより、問題を回避できる。
NTPにより同期をしないことにより時間がずれることについては、上記1)の対策に関連して、時刻データの補正をすることが前提であるため、計測結果に対しては悪影響はない。
なお、誤差評価・処理内容は、NTP時刻同期ソフトウェア(NTPデーモン)が内部で処理している内容とほぼ同様の処理内容であるが、通常、NTPデーモンが内部で処理してしまうと、上記2)の問題点の部分がパケットのキャプチャデータ処理と対比できなくなるため、測定目的に絞る場合には、NTPデーモンの同期処理を回避する方法が有効である。
For the above 1), instead of evaluating each NTP packet from the NTP server individually, the difference between the time information of the periodic NTP time notification packet and the local internal clock is recorded over time and statistically recorded. Evaluation can improve accuracy.
The problem 2) can be avoided by setting "Do not dare to synchronize the built-in clock by NTP".
Regarding the time lag due to the lack of synchronization by NTP, since it is premised on correcting the time data in relation to the measure 1), there is no adverse effect on the measurement result.
The error evaluation / processing contents are substantially the same as the contents processed internally by the NTP time synchronization software (NTP daemon). Normally, when the NTP daemon processes the contents, the above 2 ) Cannot be compared with packet capture data processing. Therefore, a method for avoiding synchronization processing of the NTP daemon is effective when focusing on measurement purposes.

以下、具体的な実施例を、図面により説明する。
図1は、本発明のパケット測定における後処理時刻補正による精度改善方法の説明図である。
図1において、1は通信を交換するスイッチ、2はNTPサーバ、3は測定対象クライアント端末、4は計測用PC(パソコン)、5は測定対象サーバ、11はスイッチ1におけるミラーポート、41は計測用PC4のNTP通信用ポート、42は同じく計測用PC4のキャプチャ用ポートである。
Hereinafter, specific embodiments will be described with reference to the drawings.
FIG. 1 is an explanatory diagram of a method of improving accuracy by post-processing time correction in packet measurement according to the present invention.
In FIG. 1, 1 is a switch for exchanging communication, 2 is an NTP server, 3 is a measurement target client terminal, 4 is a measurement PC (personal computer), 5 is a measurement target server, 11 is a mirror port in the switch 1, and 41 is measurement. An NTP communication port 42 of the PC for measurement 4 is also a capture port of the measurement PC 4.

ここでは、以下のような構成を例に説明する。
*計測用PC4、
*NTPサーバ2、
*計測対象パケットストリーム(P):p1,p2,p3,・・・・、
*計測対象パケットキャプチャのタイムスタンプ(Θ);τ1,τ2,τ3,・・・、
*NTPサーバ問い合わせ時刻(T):t1,t2,t3,・・・
*NTPサーバ応答にある時刻ズレ回答量(D):d1,d2,d3,・・・、
PCからは、
(1)ネットワークポートを通じて、NTPサーバと通信ができること(NTPパケットのやりとりが可能であること)、
(2)キャプチャ対象パケットストリームがPCのネットワークポートから見えていること、
の2点が前提となる。なお、(1)と(2)は、PCの同じネットワークポートでも良いし、別のネットワークポートを利用することもあるが、どちらでも本発明には影響はない。
また、キャプチャ対象ストリームがPCのネットワークポートから見えるようにしておくには、一般にNWスイッチのミラーポートの設定などにより実施可能であるが、その具体的な手法は本発明の請求範囲から外れている。
Here, the following configuration will be described as an example.
* PC4 for measurement,
* NTP server 2,
* Measurement target packet stream (P): p1, p2, p3,...
* Measurement target packet capture time stamp (Θ); τ1, τ2, τ3, ...
* NTP server inquiry time (T): t1, t2, t3,.
* Time deviation response amount (D) in NTP server response: d1, d2, d3,...
From the PC
(1) It is possible to communicate with an NTP server through a network port (can exchange NTP packets)
(2) The capture target packet stream is visible from the PC network port,
These two points are assumed. It should be noted that (1) and (2) may be the same network port of the PC or may use different network ports, but neither of them affects the present invention.
Further, in order to make the capture target stream visible from the network port of the PC, it can be generally performed by setting the mirror port of the NW switch or the like, but the specific method is outside the scope of the claims of the present invention. .

図1における計測時には、測定対象サーバ5から測定対象クライアント端末3への通信パケットを、接続しているスイッチ1の設定によりミラーポート11へコピーして、計測用PC4のキャプチャ用ポート42をミラーポート11に接続して、上記通信パケットをキャプチャして評価する。
また、計測用PC4は、別途、NTPサーバ2とも通信する必要があり、計測用PC4の別のNTP通信用ポート41を利用して、NTPサーバ2との間でNTP通信を行っている。
At the time of measurement in FIG. 1, a communication packet from the measurement target server 5 to the measurement target client terminal 3 is copied to the mirror port 11 according to the setting of the connected switch 1, and the capture port 42 of the measurement PC 4 is set to the mirror port. 11 to capture and evaluate the communication packet.
In addition, the measurement PC 4 needs to communicate with the NTP server 2 separately, and performs NTP communication with the NTP server 2 using another NTP communication port 41 of the measurement PC 4.

計測用PC4の動作について説明する。
計測時に同時に動作させておくプロセスは、2種類必要である。
a.『時刻取得・記録プロセス』について、一般的なLinux OSでの実施方法を以下に示す。ここでは、10秒毎にIPアドレスが192.168.0.123であるNTPサーバ2に問い合わせを繰り返し、“ntpdate−query.log”ファイルに記録する場合を例にとる。
The operation of the measurement PC 4 will be described.
Two types of processes are required to be operated simultaneously during measurement.
a. An implementation method for a general Linux OS for the “time acquisition / recording process” is shown below. In this example, an inquiry is repeatedly made to the NTP server 2 whose IP address is 192.168.0.123 every 10 seconds and recorded in the “ntpdate-query.log” file.

%touch ntpdate−query.log
%while true;do ntpdate −q 192.168.0.123>>ntpdate−query.log;sleep 10;done(上記コマンドにより、強制終了するまで時刻取得を続ける)
これで、“ntpdate−query.log”ファイルには以下のようなデータが記録される。
% Touch ntpdate-query. log
% While true; don tpdate -q 192.168.0.123 >> ntpdate-query. log; sleep 10; done (continues time acquisition until forced termination by the above command)
Thus, the following data is recorded in the “ntpdate-query.log” file.

server 192.168.0.123,stratum 1,offset−0.000276,delay 0.02618
19Mar 14:13:47 ntpdate[69715]:adjust time server 192.168.0.123 offset−0.000276sec
server 192.168.0.123,stratum 1,offset−0.000252,delay 0.02617
19 Mar 14:13:57 ntpdate[69717]:adjust time server 192.168.0.123 offset−0.000252 sec
server 192。168。0。123、stratum 1, offset−0.000326,delay 0.02620
19 Mar 14:14:07 ntpdate[69719]:adjust time server 192.168.0.123 offset−0.000326 sec
server 192.168.0.123,stratum 1,offset−0.0264,delay 0.02620
19 Mar 14:14:17ntpdate[69721]:adjust time server192.168.0.123 offset−0.000264sec・・・
server 192.168.0.123, stratum 1, offset-0.000276, delay 0.02618
19Mar 14:13:47 ntpdate [69715]: adjust time server 192.168.0.123 offset-0.000276 sec
server 192.168.0.123, stratum 1, offset-0.000252, delay 0.02617
19 Mar 14:13:57 ntpdate [69717]: adjust time server 192.168.0.123 offset-0.000252 sec
server 192.168.0.0.123, stratum 1, offset-0.000326, delay 0.02620
19 Mar 14:14:07 ntpdate [69719]: adjust time server 192.168.0.123 offset-0.000326 sec
server 192.168.0.123, stratum 1, offset-0.0264, delay 0.02620
19 Mar 14:14:17 ntpdate [67921]: adjust time server 192.168.0.123 offset-0.000264 sec ...

ここで、serverで始まる行のうち、offsetの次の値が各々の時点でのNTP−serverとの時刻のズレを表す(ローカル時刻が遅れているとき、(補正すべき)正の値を示す)。
上記の例では、例えば、19Mar 14:14:17時点でのズレは−0.000264秒である(内蔵時計がNTP−server の伝えてくる時間より0.000264秒進んでいることを表す)。
Here, in the line starting with “server”, the next value of “offset” indicates a time lag with the NTP-server at each time point (when the local time is delayed, it indicates a positive value). ).
In the above example, for example, the deviation at the time of 19 Mar 14:14:17 is −0.000264 seconds (indicating that the internal clock has advanced 0.000264 seconds from the time reported by NTP-server).

時計の誤差は、ほぼ一定の幅でズレが増えていく傾向を持つ。よって、上記の誤差(△τとする)を時刻Tの関数として、一定時間ごと(例えば、60分毎)に統計的に回帰してやれば、各時点での補正量が計算可能である(一定時間ごとに区切っているのは、より長期的には温度変化などによる1次以上の誤差要因が無視できなくなるためである)。
すなわち、誤差推定量(△τ)は時刻Tの関数f(T)として表現でき、
△τ=f(T):(TはローカルPC内蔵時計の示す現在時刻)
よって、真の時刻の推定値はT+f(T)となる。
The error of the clock tends to increase the deviation with a substantially constant width. Therefore, if the above error (Δτ) is used as a function of time T and statistically regressed every fixed time (for example, every 60 minutes), the correction amount at each time can be calculated (fixed time). This is because the first and higher order error factors due to temperature changes cannot be ignored in the longer term).
That is, the error estimation amount (Δτ) can be expressed as a function f (T) at time T,
Δτ = f (T): (T is the current time indicated by the local PC built-in clock)
Therefore, the estimated value of the true time is T + f (T).

前記のb.測定対象パケットをパケットキャプチャする『キャプチャプロセス』については、再度、一般的なLinux PCでのコマンド例を示すと
%tcpdump −I eth0 −w packet−capture.pcap
ここで、以下のものは説明の都合上、仮の名称を利用している:
eth0:キャプチャPCでのキャプチャ用ネットワークI/FのI/F名
packet−capture.pcap :キャプチャデータ保存用のファイル名
B. Regarding the “capture process” for capturing a packet to be measured, a command example in a general Linux PC is shown again as follows:% tcpdump −I eth0 −w packet-capture. pcap
Here, for convenience of explanation, the following uses temporary names:
eth0: I / F name of the network I / F for capture on the capture PC packet-capture. pcap: File name for saving captured data

このキャプチャデータ(packet−capture.pcap)には、時刻補正前のローカルPC内蔵時計によるタイムスタンプが付与されており、不正確な時刻による記録となっているが、後に解析する際に前述で求めたf(T)による時刻補正をかける(各パケットに付与されたタイムスタンプtをt+f(t)で読み替える)ことにより、正確なタイムスタンプを推定可能である。   This capture data (packet-capture.pcap) is given a time stamp by the local PC built-in clock before time correction, and is recorded with an incorrect time. In addition, an accurate time stamp can be estimated by performing time correction by f (T) (reading the time stamp t given to each packet by t + f (t)).

(誤差評価方法の例)
NTPサーバへの問い合わせの時刻を、(ローカルのPC内蔵時計上での時刻で)t,またNTPサーバから応答で報告されるズレの量をdとする:
*NTP問い合わせ時刻(T):t1,t2,t3,・・・
*誤差量(D):d1,d2,d3,・・・
すなわち、統計的に評価する前の段階では、PCの内蔵時計がt1と示している時刻は、実際には(t1−d1)と推定される。なお、この推定値には、毎回のNTP問い合わせの誤差が含まれるため、あまり正確ではない。
(Example of error evaluation method)
The time of inquiry to the NTP server is t (as the time on the local PC clock), and the amount of deviation reported in the response from the NTP server is d:
* NTP inquiry time (T): t1, t2, t3, ...
* Error amount (D): d1, d2, d3, ...
That is, in the stage before statistical evaluation, the time indicated by the internal clock of the PC as t1 is actually estimated as (t1-d1). Note that this estimated value is not very accurate because it includes errors in each NTP inquiry.

ここで、通常では、数列Tと数列Dの間には、ほぼ線形の相関があるので、例えば一般的な最小自乗回帰法による評価を行うと、以下の一次回帰式のパラメータ(a,b)が求まり、任意の時刻tにおける誤差の推定値dがf(t)という関数として評価できる:
d=f(t)
=a*t+b
なお、数時間以上にわたって計測を実施する場合には、統計的に評価と言っても、単なる直線的にずれていく一次の変化(係数aの効果)だけでなく、温度変化などの影響を受けて内蔵時計の刻む速度自体が変化して2次以上の誤差についても評価する必要が出てくる。これについては、1時間など適切な時間単位で区切っての折線評価などをすれば対応可能である。
この際の具体的な評価手法は、上記非特許文献1の[時刻更正法]をそのまま利用すればよい。
Here, since there is usually a substantially linear correlation between the sequence T and the sequence D, for example, when evaluation is performed by a general least square regression method, parameters (a, b) of the following linear regression equations And the estimated error d at any time t can be evaluated as a function f (t):
d = f (t)
= A * t + b
When measuring over several hours or more, even if it is statistically evaluated, it is affected not only by a linear change (the effect of the coefficient a) but also by a temperature change. As a result, the speed of the built-in clock itself changes, and it is necessary to evaluate the second and higher order errors. This can be dealt with by evaluating the broken line by dividing it in an appropriate time unit such as one hour.
As a specific evaluation method at this time, the [time correction method] of Non-Patent Document 1 may be used as it is.

計測対象ストリームのキャプチャは、前記の定期的時刻チェックを実施しながら、同時に行うunix系osであれば、tcpdumpコマンド,window系であれば、windum.exeなどで可能である。
キャプチャしたパケットにパソコンのPSが付与するタイムスタンプは、そのままでは不正確である。
The measurement target stream is captured by executing the tpdump command if the unix system os is performed simultaneously with the periodic time check described above, and by using the window. exe is possible.
The time stamp given by the PS of the personal computer to the captured packet is inaccurate as it is.

そこで、キャプチャしたデータを前述の誤差評価の結果を利用して真の時刻の推定値に変換する。
*キャプチャパケット(p):p1,p2,p3,・・・
*キャプチャタイムスタンプ(Θ):τ1,τ2,τ3,・・・

変換すると、以下のようにキャプチャ時間の推定時刻が求まる:
*キャプチャの真の時間の推定値:f(τ1),f(τ2),f(τ3),・・・
=(1−a)*τ1−b,(1−a)*τ2−b,(1−a)*τ3−b,・・・
なお、前述のように、本手法では、一次回帰式に限る必要はなく、より高精度な回帰式・統計評価手法を利用すれば、それについてもそのまま適用可能である。
Therefore, the captured data is converted into an estimated value of the true time using the result of the error evaluation described above.
* Capture packet (p): p1, p2, p3, ...
* Capture time stamp (Θ): τ1, τ2, τ3, ...

After conversion, the estimated capture time is obtained as follows:
* Estimated true time of capture: f (τ1), f (τ2), f (τ3), ...
= (1-a) * τ1-b, (1-a) * τ2-b, (1-a) * τ3-b,...
As described above, the present method need not be limited to the linear regression equation, and can be applied as it is if a more accurate regression equation / statistical evaluation method is used.

図2は、本発明による後処理時刻補正の手順を示すフローチャートである。
まず、計測時に、測定対象サーバ5から測定対象クライアント端末3への通信パケットを、接続しているスイッチ1の設定によりミラーポート11へコピーし、計測用PC4のキャプチャ用ポート42をミラーポート11に接続して、上記通信パケットがキャプチャされたことを確認する(ステップ101)。
次に、計測用PC4は、ミラーポートからキャプチャするのと同じ時間帯に、別のNTP通信用ポート41を利用して、NTPサーバ2との間でNTP通信を行い、一定期間毎にNTPサーバ2に問い合わせコマンドを送信して、NTPサーバからの時刻補正データを収集したか否かを確認する(ステップ102)。例えば、10秒毎にNTPサーバ2に問い合わせを繰り返し、NTPサーバ2から受信したパケットと内蔵時計との時刻ズレを記録する。時計の誤差は、ほぼ一定の幅でズレが増えていく傾向を持つので、例えば、60分毎に統計的に回帰してやることにより、各時点での補正量が計算可能となる。すなわち、パケットを受信した各時刻毎に補正量を計算する(ステップ104)。
補正量によって修正することにより、上記通信パケットキャプチャ時の正確なタイムスタンプを得る(ステップ105)。
FIG. 2 is a flowchart showing a procedure of post-processing time correction according to the present invention.
First, at the time of measurement, a communication packet from the measurement target server 5 to the measurement target client terminal 3 is copied to the mirror port 11 according to the setting of the connected switch 1, and the capture port 42 of the measurement PC 4 is changed to the mirror port 11. Connect to confirm that the communication packet has been captured (step 101).
Next, the measurement PC 4 performs NTP communication with the NTP server 2 by using another NTP communication port 41 in the same time zone as when capturing from the mirror port, and the NTP server every fixed period. An inquiry command is transmitted to 2 to confirm whether time correction data from the NTP server has been collected (step 102). For example, the inquiry is repeated to the NTP server 2 every 10 seconds, and the time difference between the packet received from the NTP server 2 and the internal clock is recorded. Since the error of the clock tends to increase the deviation with a substantially constant width, for example, the correction amount at each time can be calculated by statistically regressing every 60 minutes. That is, the correction amount is calculated at each time when the packet is received (step 104).
By correcting with the correction amount, an accurate time stamp at the time of capturing the communication packet is obtained (step 105).

図2に示すフローチャートのステップをプログラム化することにより、このプログラムをCD−ROMなどの記録媒体に記録した後、この記録媒体を計算用PC4に装着することにより、プログラムをPC4にインストールして実行させれば、容易に本発明を実現することができる。また、このPC4からインターネットを経由して他のPCにこのプログラムのダウンロードを繰り返すことにより、プログラムの汎用化も可能である。   By programming the steps of the flowchart shown in FIG. 2 and recording the program on a recording medium such as a CD-ROM, the program is installed on the PC 4 and executed by mounting the recording medium on the PC 4 for calculation. Then, the present invention can be easily realized. Further, the program can be generalized by repeatedly downloading the program from the PC 4 to another PC via the Internet.

本発明による後処理時刻補正システムの構成図である。It is a block diagram of the post-processing time correction system by this invention. 本発明による後処理時刻補正による精度改善方法に係るフローチャートである。5 is a flowchart according to a method for improving accuracy by post-processing time correction according to the present invention.

符号の説明Explanation of symbols

1 スイッチ
2 NTPサーバ
3 測定対象クライアント端末
4 計測用PC
5 測定対象サーバ
11 ミラーポート
41 NTP通信用ポート
42 キャプチャ用ポート
1 switch 2 NTP server 3 client terminal to be measured 4 PC for measurement
5 Measurement target server 11 Mirror port 41 NTP communication port 42 Capture port

Claims (4)

汎用計算機のネットワークインタフェースを用いて、パケットキャプチャによるネットワーク品質計測を行う際に、該汎用計算機によって付与されたパケットキャプチャ時刻を精度良く較正する方法であって、
該汎用計算機は、まずネットワーク時刻同期プロトコル(以下、NTP)サーバからの通知パケットを受信し、内蔵時計との同期をしない設定にしておき、
該汎用計算機は、特定コマンドを定期的に実行することにより、該NTPサーバへの問い合わせを行い、返送パケットから時刻情報を取得し、
該汎用計算機は、定期的にNTPサーバからのパケットによる時刻のズレを監視し、1回から複数回の問い合わせ結果を統計的に評価することにより、時刻誤差の補正量を算出し、
パケットキャプチャ時のタイムスタンプの値を上記補正量により修正することを特徴とするパケット測定における後処理時刻補正による精度改善方法。
A method of accurately calibrating the packet capture time given by the general-purpose computer when performing network quality measurement by packet capture using the network interface of the general-purpose computer,
The general purpose computer first receives a notification packet from a network time synchronization protocol (hereinafter referred to as NTP) server, and is set not to synchronize with the internal clock.
The general-purpose computer makes an inquiry to the NTP server by periodically executing a specific command, acquires time information from a return packet,
The general-purpose computer periodically monitors a time lag due to a packet from an NTP server, and statistically evaluates a query result from one to a plurality of times, thereby calculating a correction amount of a time error,
A method for improving accuracy by correcting post-processing time in packet measurement, wherein a time stamp value at the time of packet capture is corrected by the correction amount.
汎用計算機のネットワークインタフェースを用いて、パケットキャプチャによるネットワーク品質計測を行う際に、該汎用計算機によって付与されたパケットキャプチャ時刻を精度良く較正する方法であって、
まず、計測時に、測定対象サーバから測定対象クライアント端末への通信パケットを、接続しているスイッチのミラーポートへコピーし、計測用の汎用計算機のキャプチャ用ポートを介して、該通信パケットをキャプチャし、
該汎用計算機は、ミラーポートからのキャプチャをするのと同じ時間帯に、別のNTP通信用ポートを利用して、NTPサーバとの間でNTP通信を行い、一定期間毎にNTPサーバに問い合わせコマンドを送信して、該NTPサーバからの時刻補正データを収集し、
該汎用計算機は、該NTPサーバから受信したパケットと内蔵時計との時刻ズレを記録し、
パケット受信の各時点での補正量を計算し、
該補正量によって内蔵時計の時刻を修正することにより、正確なキャプチャ時のタイムスタンプ値を得ることを特徴とするパケット測定における後処理時刻補正による精度改善方法。
A method of accurately calibrating the packet capture time given by the general-purpose computer when performing network quality measurement by packet capture using the network interface of the general-purpose computer,
First, during measurement, the communication packet from the measurement target server to the measurement target client terminal is copied to the mirror port of the connected switch, and the communication packet is captured via the capture port of the general-purpose computer for measurement. ,
The general-purpose computer performs NTP communication with an NTP server using another NTP communication port in the same time zone as capturing from the mirror port, and sends an inquiry command to the NTP server at regular intervals. To collect time correction data from the NTP server,
The general purpose computer records a time shift between the packet received from the NTP server and the internal clock,
Calculate the correction amount at each point of packet reception,
An accuracy improvement method by post-processing time correction in packet measurement, wherein an accurate time stamp value at the time of capture is obtained by correcting the time of the built-in clock by the correction amount.
汎用計算機のネットワークインタフェースを用いて、パケットキャプチャによるネットワーク品質計測を行う際に、該汎用計算機によって付与されたパケットキャプチャ時刻を精度良く較正するシステムであって、
計測時に、測定対象サーバから測定対象クライアント端末への通信パケットを経由させる際に、該通信パケットをミラーポートへコピーして、該ミラーポートを介して接続されている計測用汎用計算機のキャプチャ用ポートに該通信パケットを転送するスイッチ手段と、
ネットワークの時刻同期を行うNTPサーバと、
該NTPサーバとの間で、NTP通信用ポートを介して通知パケットおよび問い合わせに対する応答パケットを受信して、定期的に該NTPサーバからのパケットによる時刻のズレを監視し、算出した補正量により上記通信パケットキャプチャ時のタイムスタンプの値を修正する計測用汎用計算機と
を有することを特徴とするパケット測定における後処理時刻補正システム。
When performing network quality measurement by packet capture using a network interface of a general-purpose computer, a system for accurately calibrating the packet capture time given by the general-purpose computer,
At the time of measurement, when passing a communication packet from the measurement target server to the measurement target client terminal, the communication packet is copied to the mirror port, and the capture port of the general-purpose computer for measurement connected via the mirror port Switch means for forwarding the communication packet to
An NTP server that performs network time synchronization;
A notification packet and a response packet to the inquiry are received via the NTP communication port with the NTP server, and a time shift due to the packet from the NTP server is periodically monitored, and the above correction amount is used to calculate the above A post-processing time correction system in packet measurement, comprising: a measurement general-purpose computer that corrects a time stamp value at the time of capturing a communication packet.
パケット測定における後処理時刻補正用プログラムであって、
汎用計算機に、測定対象サーバから測定対象クライアント端末への通信パケットを、接続しているスイッチのミラーポートを介して、キャプチャ用ポートから該通信パケットをキャプチャする手順、ミラーポートからキャプチャするのと同じ時間帯に、別のNTP通信用ポートを利用して、NTPサーバとの間でNTP通信を行い、一定期間毎にNTPサーバに問い合わせコマンドを送信して、該NTPサーバからの時刻補正データを収集する手順、NTPサーバから受信したパケットと内蔵時計との時刻ズレを記録する手順、受信した各時刻毎に補正量を計算する手順、補正量によって上記通信パケットのキャプチャ時のタイムスタンプの値を修正する手順を、それぞれ実行させるためのパケット測定における後処理時刻補正用プログラム。
A post-processing time correction program for packet measurement,
Procedure for capturing communication packets from the measurement target server to the measurement target client terminal to the general purpose computer from the capture port via the mirror port of the connected switch, the same as capturing from the mirror port NTP communication is performed with an NTP server using another NTP communication port during a time period, an inquiry command is transmitted to the NTP server at regular intervals, and time correction data from the NTP server is collected. A procedure for recording a time difference between the packet received from the NTP server and the internal clock, a procedure for calculating a correction amount at each received time, and correcting the time stamp value at the time of capturing the communication packet by the correction amount Program for post-processing time correction in packet measurement to execute each procedure
JP2008107929A 2008-04-17 2008-04-17 Accuracy improvement method by post-processing time correction in packet measurement, correction system, and program thereof Expired - Fee Related JP5053918B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008107929A JP5053918B2 (en) 2008-04-17 2008-04-17 Accuracy improvement method by post-processing time correction in packet measurement, correction system, and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008107929A JP5053918B2 (en) 2008-04-17 2008-04-17 Accuracy improvement method by post-processing time correction in packet measurement, correction system, and program thereof

Publications (2)

Publication Number Publication Date
JP2009260706A true JP2009260706A (en) 2009-11-05
JP5053918B2 JP5053918B2 (en) 2012-10-24

Family

ID=41387549

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008107929A Expired - Fee Related JP5053918B2 (en) 2008-04-17 2008-04-17 Accuracy improvement method by post-processing time correction in packet measurement, correction system, and program thereof

Country Status (1)

Country Link
JP (1) JP5053918B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011250364A (en) * 2010-05-31 2011-12-08 Fujitsu Ltd Packet capture device, packet capture method, and computer program
CN114978401A (en) * 2022-05-25 2022-08-30 南京国电南自维美德自动化有限公司 Time keeping precision compensation method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1125057A (en) * 1997-07-03 1999-01-29 Nec Corp Inter-subsystem time correction system
JPH1127269A (en) * 1997-07-01 1999-01-29 Nippon Telegr & Teleph Corp <Ntt> Clock synchronization method, device and recording medium
JP2003110562A (en) * 2001-09-27 2003-04-11 Nec Eng Ltd System and method for time synchronization
JP2003248073A (en) * 2002-02-26 2003-09-05 Konami Co Ltd Terminal apparatus and program
JP2006285875A (en) * 2005-04-04 2006-10-19 Hitachi Ltd Computer system, log collection method and computer program
JP2007166453A (en) * 2005-12-16 2007-06-28 Fujitsu Ltd Program, device, and method for analyzing packet data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1127269A (en) * 1997-07-01 1999-01-29 Nippon Telegr & Teleph Corp <Ntt> Clock synchronization method, device and recording medium
JPH1125057A (en) * 1997-07-03 1999-01-29 Nec Corp Inter-subsystem time correction system
JP2003110562A (en) * 2001-09-27 2003-04-11 Nec Eng Ltd System and method for time synchronization
JP2003248073A (en) * 2002-02-26 2003-09-05 Konami Co Ltd Terminal apparatus and program
JP2006285875A (en) * 2005-04-04 2006-10-19 Hitachi Ltd Computer system, log collection method and computer program
JP2007166453A (en) * 2005-12-16 2007-06-28 Fujitsu Ltd Program, device, and method for analyzing packet data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011250364A (en) * 2010-05-31 2011-12-08 Fujitsu Ltd Packet capture device, packet capture method, and computer program
CN114978401A (en) * 2022-05-25 2022-08-30 南京国电南自维美德自动化有限公司 Time keeping precision compensation method

Also Published As

Publication number Publication date
JP5053918B2 (en) 2012-10-24

Similar Documents

Publication Publication Date Title
US7454648B2 (en) System and method for calibrating a time of day clock in a computing system node provided in a multi-node network
Ferrari et al. Experimental characterization of uncertainty sources in a software-only synchronization system
JP5636093B2 (en) Method and apparatus for performing clock synchronization between devices
WO2014199729A1 (en) Distribution device, distribution system, and distribution method
Mani et al. A system for clock synchronization in an internet of things
CN105577348B (en) Frequency deviation monitoring method and device based on time synchronization network
CN102480350A (en) Method and device for time synchronization and maintaining based on frequency deviation estimation
Ridoux et al. The case for feed-forward clock synchronization
Volgyesi et al. Time synchronization services for low-cost fog computing applications
EP4044466A1 (en) Synchronization method and device
WO2009066114A1 (en) Oscillator calibration
US9588544B2 (en) Time synchronization across computers in a distributed system
US9430501B1 (en) Time sanitization of network logs from a geographically distributed computer system
JP5053918B2 (en) Accuracy improvement method by post-processing time correction in packet measurement, correction system, and program thereof
Ferrari et al. Evaluation of timestamping uncertainty in a software-based IEEE1588 implementation
JP5625500B2 (en) Packet capture device, packet capture method, and computer program
Levine Timing in telecommunications networks
EP2627040A1 (en) Method for eliminating systematical error components in a set of one-way delay measurement results for communications between two or more computing systems in a communication network, apparatus for performing the method and computer program product
JP2012113504A (en) Communication terminal, control method and program thereof
KR102064575B1 (en) Method, apparatus, system and computer program for enhancing the accuracy of Time Synchronization between devices
Sudhakaran et al. Measurement method for end-to-end Time synchronization of wired and wireless TSN
JP4331702B2 (en) One-way transfer delay time estimation apparatus, method, and program
Ridoux et al. A methodology for clock benchmarking
JP2008118270A (en) Delay measurement system and method
Andrich et al. Measurement of drift and jitter of network synchronized distributed clocks

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100714

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20110608

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20110608

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20110616

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20110704

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20110719

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111004

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111205

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20120605

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20120629

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

Free format text: PAYMENT UNTIL: 20150803

Year of fee payment: 3

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