JP2019033333A - Time synchronization method - Google Patents

Time synchronization method Download PDF

Info

Publication number
JP2019033333A
JP2019033333A JP2017152109A JP2017152109A JP2019033333A JP 2019033333 A JP2019033333 A JP 2019033333A JP 2017152109 A JP2017152109 A JP 2017152109A JP 2017152109 A JP2017152109 A JP 2017152109A JP 2019033333 A JP2019033333 A JP 2019033333A
Authority
JP
Japan
Prior art keywords
packet
ptp
transmission
adjustment
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2017152109A
Other languages
Japanese (ja)
Inventor
靖 立石
Yasushi Tateishi
靖 立石
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP2017152109A priority Critical patent/JP2019033333A/en
Publication of JP2019033333A publication Critical patent/JP2019033333A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)
  • Electric Clocks (AREA)

Abstract

To provide a time synchronization method for improving the accuracy of time synchronization to the fluctuation of transmission load.SOLUTION: A PTP packet 3 for time synchronization is made to go back and forth between a master and a slave, a time difference from the master on the slave side is calculated, and the time synchronization is executed based on the calculated time difference. A PTP packet adjustment packet 4 is transmitted before transmission of the PTP packet 3. The priority of the PTP adjustment packet 4 is set to be lower than that of the PTP packet 3 and higher than that of another packet 2a other than the PTP packet 3. The number of PTP adjustment packets 4 is determined according to the number of L2 switches 1 arranged in a transmission section between the master and the slave. When the reception of the PTP packet 3 is completed, the L2 switch 1 transmits the PTP packet 3 after the transmission of the current PTP adjustment packet 4 is completed.SELECTED DRAWING: Figure 6

Description

本発明は、IEEE1588の規格による高精度時刻同期(以下、PTP機能とする。)の方法に関する。   The present invention relates to a method of high-accuracy time synchronization (hereinafter referred to as a PTP function) according to the IEEE 1588 standard.

PTP(PrecisionTime Protocol:高精度時刻プロトコル)は、ネットワーク全体の時刻を同期するために使用される標準プロトコルであり、各ノードの内部時計を基準時計に時刻同期させている。このとき時刻配信を送信するノードをマスターと呼び、マスターから高精度の時刻配信を受け取るノードをスレーブと呼ぶ。   PTP (Precision Time Protocol) is a standard protocol used to synchronize the time of the entire network, and synchronizes the internal clock of each node with a reference clock. At this time, a node that transmits time distribution is called a master, and a node that receives high-precision time distribution from the master is called a slave.

そして、マスター・スレーブ間で時刻同期用のPTPパケットを往復させ、スレーブ側のPTP処理の演算によってマスターの内部時計(基準時計)と自装置の内部時計との時間差を算出する。この時間差に基づきスレーブの内部時計の進む速度を調整して基準時計の時刻と一致させる。   Then, the PTP packet for time synchronization is reciprocated between the master and the slave, and the time difference between the master internal clock (reference clock) and the internal clock of the own apparatus is calculated by the calculation of the slave side PTP processing. Based on this time difference, the speed of the slave internal clock is adjusted to match the time of the reference clock.

ところがPTPパケットの往路と復路とで伝送時間が相違する場合には時刻補正の精度が悪化するため、伝送にかかる時間の変動が問題となる。この点につき特許文献1の発明は、同期パケットの送信完了時刻を無線ネットワークにて配信することで対応しようとしている。   However, when the transmission time is different between the forward path and the backward path of the PTP packet, the accuracy of time correction is deteriorated, so that fluctuation of the time required for transmission becomes a problem. With respect to this point, the invention of Patent Document 1 intends to cope by distributing the transmission completion time of the synchronization packet through the wireless network.

特開2009−111654JP2009-111654A

PTP機能は、PTPパケットをマスター・スレーブ間で往復させて時刻同期を実施するものの、PTPパケットの往路と復路とで伝送遅延が等しいことを前提とするため、PTPパケットの伝送時間が変動すると時刻同期の精度が低下する問題がある。   Although the PTP function performs time synchronization by reciprocating the PTP packet between the master and the slave, the transmission delay of the PTP packet is assumed to be equal between the forward path and the backward path of the PTP packet. There is a problem that the accuracy of synchronization is lowered.

この点につき特許文献1の発明では、同期パケットの送信完了時刻を無線ネットワークにて配信することで対応しようとするものの、この発明は無線通信を前提とするため、有線ネットワークにはなじまない。また、単に同期パケットの送信完了時刻を送信するだけではPTPパケットの伝送時間の変動を根本的に解決することはできない。   With respect to this point, the invention of Patent Document 1 intends to cope by distributing the transmission completion time of the synchronization packet through the wireless network, but since the present invention is premised on wireless communication, it is not compatible with the wired network. Further, it is not possible to fundamentally solve the fluctuation in the transmission time of the PTP packet by simply transmitting the transmission completion time of the synchronization packet.

一方、有線ネットワークでは、ネットワーク直結あるいはPTP対応の通信機器(スイッチングハブなど)を使用すれば時刻同期の高精度化は可能なものの、通常のレイヤ(Layer)2のスイッチングハブ(以下、L2スイッチとする。)などを使用するとPTPパケットがバッファに格納されて他のパケットの送信完了待ちの後に送信されてしまう。これでは却って伝送時間の変動を生じ、PTP対応ではない一般的なネットワークでは時計の精度が悪化するおそれがある。   On the other hand, in a wired network, although the accuracy of time synchronization can be improved by using a network connection device or a PTP-compatible communication device (such as a switching hub), a normal layer 2 switching hub (hereinafter referred to as an L2 switch). Etc.), the PTP packet is stored in the buffer and transmitted after waiting for the completion of transmission of another packet. In this case, the transmission time fluctuates on the contrary, and the accuracy of the clock may deteriorate in a general network that does not support PTP.

その対応としてPTPパケットの優先度を高くするなどの対策が実施され、優先度が一番高ければ同じ優先度のパケットがない限り最初に送信される。しかしながら、現在送信中のパケットを中断してPTPパケットを優先的に送信するものではなく、優先度の対策が施されていても長いパケットの送信中の場合には該パケットを送信分の待ち時間が発生するおそれがある。   As a countermeasure, measures such as increasing the priority of the PTP packet are implemented. If the priority is the highest, the packet is transmitted first unless there is a packet with the same priority. However, the packet currently being transmitted is not interrupted and the PTP packet is not transmitted preferentially. If a long packet is being transmitted even if priority measures have been taken, the waiting time for the packet is transmitted. May occur.

例えばイーサネット(登録商標)のフレーム長は「1518byte」が最大なので、伝送路が「1Gbps」ならば「12.1μsec」の待ち時間となり、優先度が設定されていても伝送時間は最大「12.1μsec」の変動が生じるおそれがある。   For example, since the maximum frame length of Ethernet (registered trademark) is “1518 bytes”, if the transmission path is “1 Gbps”, the waiting time is “12.1 μsec”. Even if the priority is set, the transmission time is “12. “1 μsec” may occur.

この場合、ネットワークの伝送負荷が低ければ、複数のPTPパケットを送信して伝送時間の小さいデータのみを使用して時刻同期することで精度の向上は可能であるが、伝送負荷が小さい(低い)ことを保障する必要がある。   In this case, if the transmission load of the network is low, the accuracy can be improved by transmitting a plurality of PTP packets and using only data with a short transmission time to synchronize the time, but the transmission load is small (low). It is necessary to ensure that.

一方、伝送負荷が大きい(高い)場合あるいは伝送負荷が不明であれば時刻同期は、理論上のワースト値でしか保証することができない。例えば伝送路が「1Gbps」でフレーム長が最大の「1518byte」の条件下では、L2スイッチ1台の場合に最大「12.1μsec」の変動となり、時計は変動幅「±6μsec」の精度となってしまう。   On the other hand, when the transmission load is large (high) or the transmission load is unknown, time synchronization can be guaranteed only with the theoretical worst value. For example, if the transmission path is “1 Gbps” and the frame length is “1518 bytes”, the maximum fluctuation is “12.1 μsec” with one L2 switch, and the clock has an accuracy of fluctuation range “± 6 μsec”. End up.

また、同じ条件下でL2スイッチが2台の場合には変動幅「±12μsec」の精度となる。このように優先度の設定を使用しても伝送負荷によっては時刻同期を保障できる精度が悪化するという問題があった。   Further, when there are two L2 switches under the same conditions, the accuracy of the fluctuation range “± 12 μsec” is obtained. As described above, there is a problem that the accuracy with which the time synchronization can be ensured is deteriorated depending on the transmission load even if the priority setting is used.

本発明は、このような従来の問題を解決するためになされ、伝送負荷の変動に対する時刻同期の精度の向上を図ることを解決課題としている。   The present invention is made to solve such a conventional problem, and an object of the present invention is to improve the accuracy of time synchronization with respect to fluctuations in transmission load.

本発明は、マスター・スレーブ間で時刻同期用のPTPパケットを往復させ、スレーブ側においてマスター側との時刻差を算出し、算出された時刻差に基づき時刻同期を実行する方法に関する。この方法は、前記PTPパケットの送信前に前記PTPパケットの転送タイミングを調整するためのPTPパケット調整パケットを送信するステップを、有する。   The present invention relates to a method for reciprocating a PTP packet for time synchronization between a master and a slave, calculating a time difference from a master side on a slave side, and executing time synchronization based on the calculated time difference. The method includes a step of transmitting a PTP packet adjustment packet for adjusting a transfer timing of the PTP packet before transmitting the PTP packet.

前記PTP調整パケットの優先度は、前記PTPパケットより低く設定され、かつ前記PTPパケット以外の他のパケットよりも高く設定されていることが好ましい。   The priority of the PTP adjustment packet is preferably set lower than the PTP packet and higher than other packets other than the PTP packet.

前記PTP調整パケット数は、マスター・スレーブ間の伝送区間に配置された中継装置数に応じて定めることができる。この前記中継装置は、PTP調整パケットをPTPパケットの受信完了まで送信することが好ましい。このとき前記中継装置は、PTPパケットを受信完了すれば現在のPTP調整パケットの送信が完了したあとPTPパケットを送信することができる。   The number of PTP adjustment packets can be determined according to the number of relay apparatuses arranged in the transmission section between the master and the slave. The relay device preferably transmits the PTP adjustment packet until the reception of the PTP packet is completed. At this time, if the relay apparatus completes reception of the PTP packet, the relay apparatus can transmit the PTP packet after the transmission of the current PTP adjustment packet is completed.

本発明によれば、伝送負荷の変動に対する時刻同期の精度を向上させることができる。   ADVANTAGE OF THE INVENTION According to this invention, the precision of the time synchronization with respect to the fluctuation | variation of transmission load can be improved.

従来の時刻同期方法におけるL2スイッチのPTPパケット送受信を示す内部構成図。The internal block diagram which shows the PTP packet transmission / reception of L2 switch in the conventional time synchronization method. 同 パケット送信中にPTPパケットを受信したときのL2スイッチの内部構成図。The internal block diagram of L2 switch when a PTP packet is received during the packet transmission. 実施例の時刻同期方法においてパケット送信中にPTP調整パケットを受信したときのL2スイッチの内部構成図。The internal block diagram of L2 switch when a PTP adjustment packet is received during packet transmission in the time synchronization method of the embodiment. 同 パケット送信完了後にPTP調整パケット送信するL2スイッチの内部構成図。The internal block diagram of L2 switch which transmits a PTP adjustment packet after completion of the packet transmission. 同 PTPパケット受信完了までの間にPTP調整パケットを送信する状況を示すL2スイッチの内部構成図。The internal block diagram of L2 switch which shows the condition which transmits a PTP adjustment packet by the time until the PTP packet reception completion. 同 PTPパケット受信完了後にPTP調整パケットの送信を中止してPTPパケットの送信を開始する状況を示すL2スイッチの内部構成図。The L2 switch internal block diagram which shows the condition which stops transmission of a PTP adjustment packet after the completion of reception of the same PTP packet, and starts transmission of a PTP packet.

以下、本発明の実施形態に係る時刻同期方法を説明する。この時刻同期方法は、IEEE1588の規格による高精度時刻同期(PTP機能)に関し、ネットワーク上のマスター・スレーブ間で時刻同期用のPTPパケットを往復させる。   Hereinafter, a time synchronization method according to an embodiment of the present invention will be described. This time synchronization method relates to high precision time synchronization (PTP function) according to the IEEE 1588 standard, and reciprocates a PTP packet for time synchronization between a master and a slave on a network.

概略を説明すれば、マスター側でPTPパケット(Sync、Pdelay_Req)をスレーブに送信し、スレーブ側で該PTPパケットを受信する。この送信時刻を「t1」,同受信時刻を「t2」とする。   Briefly, the master side transmits a PTP packet (Sync, Pdelay_Req) to the slave, and the slave side receives the PTP packet. The transmission time is “t1”, and the reception time is “t2”.

また、スレーブ側からマスター側にPTPパケット(Delay_Req,Pdelay_Resp)を送信し、該送信時刻を「t3」とする。このPTPパケットの受信後にマスター側からは、PTPパケット(Delay_Resp)トがスレーブ側に送信される。このPTPパケットの受信時刻を「t4」とする。   Also, a PTP packet (Delay_Req, Pdelay_Resp) is transmitted from the slave side to the master side, and the transmission time is set to “t3”. After receiving the PTP packet, the master side transmits a PTP packet (Delay_Resp) to the slave side. The reception time of this PTP packet is “t4”.

この時刻「t1」〜「t4」のタイムスタンプに基づきメッセージ往復の遅延時間と、マスター・スレーブ間の時刻差(クロックのオフセット)とを算出する。この時間差に基づきスレーブ側の内部時計の進む速度を調整し、マスター側の内部時計(基準時計)の時刻と一致させる。   Based on the time stamps of the times “t1” to “t4”, a message round-trip delay time and a time difference (clock offset) between the master and the slave are calculated. Based on this time difference, the traveling speed of the internal clock on the slave side is adjusted to match the time of the internal clock (reference clock) on the master side.

ただし、前記時刻同期方法は、PTPパケットの送信前にPTPパケット調整パケットを送信することにより、L2スイッチなどの通信機器内においてPTPパケットの転送タイミングの調整を図っている。   However, the time synchronization method adjusts the transfer timing of the PTP packet in the communication device such as the L2 switch by transmitting the PTP packet adjustment packet before transmitting the PTP packet.

≪ネットワーク構成≫
まず、前記時刻同期方法を実行するネットワーク構成例を説明する。ここではネットワーク上のマスター・スレーブ間で高精度時刻同期(PTP機能)が実行され、マスター・スレーブ間の伝送路(伝送区間)には優先度機構を備えた1台のL2スイッチが配置されているものとする。
≪Network configuration≫
First, a network configuration example for executing the time synchronization method will be described. Here, high-precision time synchronization (PTP function) is executed between the master and slave on the network, and one L2 switch equipped with a priority mechanism is arranged on the transmission path (transmission section) between the master and slave. It shall be.

このL2スイッチの優先度は、「0〜7」の範囲で設定でき、優先度「7」が最高値となっている。ここではPTPパケットなどの一部のパケットのみが優先度「7」に設定されているものとする。   The priority of the L2 switch can be set in the range of “0 to 7”, and the priority “7” is the highest value. Here, it is assumed that only some packets such as PTP packets are set to the priority “7”.

このネットワーク構成の下、PTPパケットの送信前に優先度「6」のPTPパケット調整パケット(64byte)を送信する。このとき19個のPTP調整パケットがネットワークの伝送速度にて連続送信される。   Under this network configuration, a PTP packet adjustment packet (64 bytes) with a priority “6” is transmitted before transmission of the PTP packet. At this time, 19 PTP adjustment packets are continuously transmitted at the transmission rate of the network.

この連続送信の方法としては、LANドライバにて送信を停止した状態でLANチップの送信バッファに複数の送信パケットをセットして最後に送信を再開させるなどの方法があげられる。このPTP調整パケットは、前記伝送区間だけを流れ、受信側にて廃棄されるものとする。   As a continuous transmission method, there is a method in which a plurality of transmission packets are set in the transmission buffer of the LAN chip while transmission is stopped by the LAN driver, and transmission is finally restarted. This PTP adjustment packet flows only in the transmission section and is discarded on the receiving side.

(1)優先度の値について
ここではPTPパケットの優先度「7」が設定されているものの、優先度「6」または「7」の長い一般パケットと送信タイミングが一致すると時刻同期の精度が悪化するおそれがあった。
(1) Regarding the priority value Although the priority “7” of the PTP packet is set here, the accuracy of time synchronization deteriorates when the transmission timing coincides with a general packet having a high priority “6” or “7”. There was a risk.

そこで、このような事情を考慮してPTP調整パケットをPTPパケットより低い優先度で、かつ他の一般パケットよりも高い優先度に設定する。ここではPTPパケットについて優先度「7」が設定されているため、PTP調整パケットは優先度「6」に設定される。   Therefore, in consideration of such circumstances, the PTP adjustment packet is set with a lower priority than the PTP packet and with a higher priority than other general packets. Here, since the priority “7” is set for the PTP packet, the PTP adjustment packet is set to the priority “6”.

このとき前記伝送路に流れる他の一般パケットは、優先度「6」未満に設定されことが好ましい。これによりPTPパケットおよびPTP調整パケットに優先して他の一般パケットがL2スイッチで送信開始されることが阻止される。   At this time, it is preferable that other general packets flowing in the transmission path are set to a priority level lower than “6”. This prevents other general packets from starting to be transmitted by the L2 switch in preference to the PTP packet and the PTP adjustment packet.

(2)PTP調整パケットの個数について
PTP調整パケットの個数は、ネットワーク構成に応じて調整される。ここではマスター・スレーブ間の伝送区間に1台のL2スイッチが配置されているため、前述のように16個のPTP調整パケットが送信される。
(2) Number of PTP adjustment packets The number of PTP adjustment packets is adjusted according to the network configuration. Here, since one L2 switch is arranged in the transmission section between the master and the slave, 16 PTP adjustment packets are transmitted as described above.

詳細を説明すれば、L2スイッチは、パケット(1518byte)の1bit目を送信開始した直後にPTPパケットを受信完了しても、該受信完了したPTPパケットを送信することができず待ち状態となる。   More specifically, even if the L2 switch completes reception of the PTP packet immediately after starting transmission of the first bit of the packet (1518 bytes), the LTP switch cannot transmit the received PTP packet and enters a waiting state.

したがって、パケット(1518byte)の最後の1bitを送信完了する少し前にPTPパケットを受信完了していることが望ましい。ここでPTP調整パケット(64byte)の送信は、パケット間ギャップがあるので「84byte」相当となる。   Therefore, it is desirable that the reception of the PTP packet is completed shortly before the transmission of the last 1 bit of the packet (1518 bytes). Here, the transmission of the PTP adjustment packet (64 bytes) corresponds to “84 bytes” because there is an inter-packet gap.

そうすると「(1518/84=18.1」となり、PTP調整パケットは19個以上と算出される。ただし、PTP調整パケットは、19個以上であればよく、例えば20個あるいは21個であってもよいものとする。一方、前記伝送区間に2台のL2スイッチが配置されている場合には38個以上のPTP調整パケットを送信する。   Then, “(1518/84 = 18.1)” is obtained and the number of PTP adjustment packets is calculated to be 19 or more.However, the number of PTP adjustment packets may be 19 or more, for example, 20 or 21. On the other hand, when two L2 switches are arranged in the transmission section, 38 or more PTP adjustment packets are transmitted.

また、前記伝送区間の途中で通信速度が変化する場合や帯域調整機構のある場合には、PTP調整パケットの送信タイミングと送信個数とを調整する。このときPTP調整パケットの個数が足りない場合には時刻同期の精度が悪化するものの、PTP調整パケットの送信個数が多すぎても他の通信制限時間が若干増加するにすぎない。なお、PTP調整パケットは、前記伝送区間における伝送時間の最大変動時間と同じ時間となるように調整されるものとする。   Further, when the communication speed changes in the middle of the transmission interval or when there is a band adjustment mechanism, the transmission timing and the number of transmissions of the PTP adjustment packet are adjusted. At this time, if the number of PTP adjustment packets is insufficient, the accuracy of time synchronization deteriorates, but even if the number of transmissions of PTP adjustment packets is too large, the other communication time limit is only slightly increased. Note that the PTP adjustment packet is adjusted to be the same time as the maximum fluctuation time of the transmission time in the transmission section.

≪実施例≫
以下、前記時刻同期方法の実施例を説明する。ここでPTPパケットによる時刻同期においては、前記伝送路の往路と復路との伝送時間が等しいことが理想である。
<< Example >>
Hereinafter, an embodiment of the time synchronization method will be described. Here, in the time synchronization by the PTP packet, it is ideal that the transmission times of the forward path and the backward path of the transmission path are equal.

そうすると前記伝送時間の差は小さいことが望ましいので優先度による機構を使用するが、該優先度は現在送信中のパケットを中断して高い優先度のパケットを送信するわけではない。その結果、最長のパケットの送信中にPTPパケットを受信すると送信待ちが最も大きく時刻精度が悪化するおそれがある。   Then, since the difference in the transmission time is preferably small, a mechanism based on priority is used. However, the priority does not interrupt a packet currently being transmitted and does not transmit a high priority packet. As a result, if a PTP packet is received during transmission of the longest packet, there is a possibility that the waiting time for transmission is the largest and the time accuracy is deteriorated.

例えばイーサネットの最大パケットが「1518byte」であり、伝送速度が「1Gbps」のときには「12.1μsec」の待ち時間を発生させる。そこで本実施例では、PTPパケットを送信する前にPTP調整パケットを19個送信することとした(L2スイッチは1個とする。)。これにより次の送受信が実行される。   For example, when the maximum packet of Ethernet is “1518 bytes” and the transmission rate is “1 Gbps”, a waiting time of “12.1 μsec” is generated. Therefore, in this embodiment, 19 PTP adjustment packets are transmitted before transmitting the PTP packet (the number of L2 switches is one). As a result, the next transmission / reception is executed.

(1)すなわち、前記伝送路に配置されたL2スイッチのバッファが空の場合、該L2スイッチは1個目のPTP調整パケットの受信を完了すれば2個目のPTP調整パケットの受信中に1個目のPTP調整パケットを送信する。この送受信を19回繰り返した後にPTPパケットを受信して送信する。   (1) That is, if the buffer of the L2 switch arranged in the transmission path is empty, the L2 switch will receive 1 during reception of the second PTP adjustment packet if the reception of the first PTP adjustment packet is completed. The PTP adjustment packet of the number is transmitted. After this transmission / reception is repeated 19 times, a PTP packet is received and transmitted.

このときPTP調整パケットによりパケット間ギャップを含めて「12.8μsec」の送信時間が発生するものの、PTPパケットの送信元からL2スイッチを経由して転送されるまでの時間はPTPパケットの長さ分だけで済む。   At this time, although the transmission time of “12.8 μsec” including the inter-packet gap is generated by the PTP adjustment packet, the time until the packet is transferred from the source of the PTP packet via the L2 switch is equal to the length of the PTP packet. Just do it.

(2)一方、前記伝送路に配置されたL2スイッチが、優先度「0」の「1518byte」のパケットを送信開始した時点では、L2スイッチはPTP調整パケットを受信しても「1518byte」のパケットを送信中なので、PTP調整パケットをバッファに格納する。   (2) On the other hand, when the L2 switch arranged in the transmission line starts transmitting the packet “1518 bytes” with the priority “0”, the packet “1518 bytes” is received even if the L2 switch receives the PTP adjustment packet. Is being transmitted, the PTP adjustment packet is stored in the buffer.

ここで19個のPTP調整パケットの受信完了後にPTPパケットの受信を完了するのは「12.8μsec」後となる。また、「1518byte」のパケットの送信完了は「12.1μsec」後なので、PTP調整パケットを1つ送信したあとにPTPパケットが送信される。   Here, the reception of the PTP packet is completed after “12.8 μsec” after the reception of the 19 PTP adjustment packets is completed. Since the transmission completion of the “1518 byte” packet is after “12.1 μsec”, the PTP packet is transmitted after one PTP adjustment packet is transmitted.

すなわち、PTP調整パケットの用いていない従来の時刻同期方法によれば、最大「12.1μsec」の待ち時間が発生する。一方、PTP調整パケットを事前に送信する本実施例によれば、「PTPパケット受信時間+待ち時間(0〜0.672μsec)」に抑制され、伝送時間の変動を約「1/18」まで削減できる。   That is, according to the conventional time synchronization method that does not use the PTP adjustment packet, a waiting time of a maximum “12.1 μsec” occurs. On the other hand, according to the present embodiment in which the PTP adjustment packet is transmitted in advance, the “PTP packet reception time + waiting time (0 to 0.672 μsec)” is suppressed, and the fluctuation of the transmission time is reduced to about “1/18”. it can.

これにより特に伝送路が高負荷あるいは瞬間的に高負荷なときも安定して時刻同期の高精度を保証することが可能となる。以下、図1〜図6に基づき詳細を説明する。   As a result, it is possible to stably guarantee high accuracy of time synchronization even when the transmission line is heavily loaded or momentarily heavily loaded. Details will be described below with reference to FIGS.

(3)まず、図1および図2に基づき前記従来の時刻同期方法を説明する。ここでは図1に示すように、L2スイッチ1は優先度の機構を備え、パケット2の優先度を「0〜7」の範囲で設定することができる。このL2スイッチ1は、パケット2を「0〜7」の優先度別に並べて格納し、優先度の高い順に送信する。   (3) First, the conventional time synchronization method will be described with reference to FIGS. Here, as shown in FIG. 1, the L2 switch 1 has a priority mechanism, and the priority of the packet 2 can be set in the range of “0 to 7”. The L2 switch 1 stores the packets 2 arranged in order of priority of “0 to 7”, and transmits them in descending order of priority.

図1中では、L2スイッチ1は、1個のパケット2の受信を完了すれば、他のパケット2が無いため、受信完了したパケット2の送信を開始する。この場合の伝送上の時間の遅れは、パケット2の受信にかかる時間なので、パケット2の長さの影響を受ける。   In FIG. 1, when the reception of one packet 2 is completed, the L2 switch 1 starts transmission of the packet 2 that has been received because there is no other packet 2. In this case, the delay in transmission time is the time taken to receive the packet 2, and is affected by the length of the packet 2.

すなわち、L2スイッチ1のバッファが空の場合、PTPパケットにはその長さ分の待ち時間が発生するものの、該待ち時間はPTPパケットの長さに応じた固定的であり、往復するPTPパケットとしては時刻同期の精度への影響は少ない。   That is, when the buffer of the L2 switch 1 is empty, a waiting time corresponding to the length of the PTP packet is generated, but the waiting time is fixed according to the length of the PTP packet, Has little effect on the accuracy of time synchronization.

一方、図2では、長いパケット2aの送信開始時点でPTPパケット3を受信した状態が示されている。このときPTPパケット3は最も高い優先度、即ち優先度「7」に設定されているものの、優先度「0」の長いパケット2aの送信を中断することができず、長いパケット2aの送信完了まで待機させられる。   On the other hand, FIG. 2 shows a state in which the PTP packet 3 is received at the start of transmission of the long packet 2a. At this time, although the PTP packet 3 is set to the highest priority, that is, the priority “7”, the transmission of the long packet 2 a having the priority “0” cannot be interrupted, and the transmission of the long packet 2 a is completed. It is made to wait.

したがって、PTPパケット3の長さだけではなく、現在送信中の長いパケット2aの残りの長さの影響を受ける。この点で従来はPTPパケット3の受信タイミングにより待ち時間が変動し、時刻同期の精度が悪化するおそれがあった。   Therefore, it is influenced not only by the length of the PTP packet 3, but also by the remaining length of the long packet 2a currently being transmitted. In this regard, conventionally, the waiting time varies depending on the reception timing of the PTP packet 3, and the accuracy of time synchronization may be deteriorated.

(4)つぎに図3〜図6に基づき本実施例の前記時刻同期方法、即ちPTPパケットの送信に先だって19個のPTP調整パケットを送信する方法を説明する。   (4) Next, the time synchronization method of this embodiment, that is, a method of transmitting 19 PTP adjustment packets prior to transmission of PTP packets will be described with reference to FIGS.

ここでは図1および図2と同様にPTPパケット3は最も高い優先度、即ち優先度「7」に設定されているものとする。また、PTP調整パケット4は優先度「6」に設定され、両パケット3,4以外の他のパケット2aはPTP調整パケット4の優先度よりも低い値に設定されているものとする。   Here, as in FIGS. 1 and 2, it is assumed that the PTP packet 3 is set to the highest priority, that is, the priority “7”. It is assumed that the PTP adjustment packet 4 is set to the priority “6”, and the other packets 2 a other than the packets 3 and 4 are set to a value lower than the priority of the PTP adjustment packet 4.

図3は、優先度「0」の長いパケット2aの送信中に「64byte」のPTP調整パケット4を受信した状態を示している。このときPTP調整パケット4は、バッファ中の優先度「6」に順次に格納されるものの、長いパケット2aの送信中なため、送信待ちの状態となる。この長いパケット2aの送信の進行に応じてPTP調整パケット4の受信が進行する。   FIG. 3 shows a state in which the PTP adjustment packet 4 of “64 bytes” is received during the transmission of the packet 2 a having a long priority “0”. At this time, although the PTP adjustment packet 4 is sequentially stored at the priority “6” in the buffer, since the long packet 2a is being transmitted, the PTP adjustment packet 4 is in a transmission waiting state. As the transmission of the long packet 2a progresses, the reception of the PTP adjustment packet 4 proceeds.

図4は、優先度「0」の長いパケット2aの送信が完了した状態を示し、該パケット2aの送信完了後に優先度「6」のPTP調整パケット4が1個送信されている。   FIG. 4 shows a state in which the transmission of the packet 2a having the long priority “0” is completed, and one PTP adjustment packet 4 having the priority “6” is transmitted after the transmission of the packet 2a is completed.

図5は、優先度「7」のPTPパケット3の受信完了の状態を示している。この受信完了後はPTP調整パケット4の送信中であり、その送信が完了するとPTPパケット3の送信に移行する。   FIG. 5 shows a state in which the reception of the PTP packet 3 with the priority “7” is completed. After completion of the reception, the PTP adjustment packet 4 is being transmitted. When the transmission is completed, the process shifts to transmission of the PTP packet 3.

図6は、PTPパケット3の送信開始の状態を示している。このPTPパケット3の送信完了後に残りのPTP調整パケット4の送信が再開されるが、すべてのPTP調整パケット4は受信側で廃棄されるため、特に意味は無い。   FIG. 6 shows a state where transmission of the PTP packet 3 is started. The transmission of the remaining PTP adjustment packet 4 is resumed after the transmission of this PTP packet 3 is completed, but since all the PTP adjustment packets 4 are discarded at the receiving side, there is no particular meaning.

このように優先度「0」の長いパケット2aの送信後、PTPパケット3の受信完了後まで優先度「6」のPTP調整パケット4を送信することにより、低い優先度(優先度「6」未満)のパケット送信が開始されることを阻止する。   As described above, by transmitting the PTP adjustment packet 4 with the priority “6” after the transmission of the packet 2a with the long priority “0” until the completion of the reception of the PTP packet 3, the low priority (less than the priority “6”) is transmitted. ) Packet transmission is prevented from starting.

このときPTP調整パケット4は、「64byte」という最小サイズなため、その伝送時間の変動は最大で「パケット間ギャップを含めて84byte」の送信時間となる。   At this time, since the PTP adjustment packet 4 has a minimum size of “64 bytes”, the variation of the transmission time is a maximum of “84 bytes including the interpacket gap”.

例えば図2中の長いパケット2aのサイズが「1518byte」であれば従来の時刻同期方法では最大「1518byte」の送信時間の変動となる。一方、本実施例の前記時刻同期方法によれば、前述のように「パケット間ギャップを含めて84byte」の送信時間の変動に抑えることができ、この点で時刻同期の精度を約18倍に向上させることができる。   For example, if the size of the long packet 2a in FIG. 2 is “1518 bytes”, the transmission time varies up to “1518 bytes” in the conventional time synchronization method. On the other hand, according to the time synchronization method of the present embodiment, as described above, it is possible to suppress the variation in the transmission time of “84 bytes including the inter-packet gap”, and in this respect, the accuracy of time synchronization is increased by about 18 times. Can be improved.

特に「TCP/IP」などを適用したネットワークシステムでは、パケット長が長く、往復における片方の帯域を使いつくすことが多い。そのため、従来の時刻同期方法では精度がワースト値に近くなるが、本実施例の前記時刻同期方法であれば精度のワースト値を「1/18」に抑えることが可能である。この意味で伝送負荷の変動に対する時刻同期の精度を向上させることができる。   In particular, in a network system to which “TCP / IP” or the like is applied, the packet length is long, and often one band in the round trip is used up. Therefore, in the conventional time synchronization method, the accuracy is close to the worst value, but in the time synchronization method of the present embodiment, the accuracy worst value can be suppressed to “1/18”. In this sense, it is possible to improve the accuracy of time synchronization with respect to fluctuations in transmission load.

なお、本発明は、上記実施形態に限定されるものではなく、各請求項に記載された範囲内で変形して実施することができる。特にPTP調整パケット4の優先度はPTPパケット3よりも低く、かつ他のパケット2aよりも高い値であればよく、L2スイッチ1の優先度設定範囲に応じて設定することができる。   In addition, this invention is not limited to the said embodiment, It can deform | transform and implement within the range described in each claim. In particular, the priority of the PTP adjustment packet 4 may be a value lower than that of the PTP packet 3 and higher than that of the other packets 2a, and can be set according to the priority setting range of the L2 switch 1.

例えば優先度設定範囲が「1〜10」の場合には、PTPパケット3の優先度を「10」に設定し、PTP調整パケットの優先度を「9」に設定し、他のパケット2aの優先度を「9」未満に設定すればよい。   For example, when the priority setting range is “1 to 10”, the priority of the PTP packet 3 is set to “10”, the priority of the PTP adjustment packet is set to “9”, and the priority of the other packet 2a is set. The degree may be set to less than “9”.

1…L2スイッチ(中継装置)
2…パケット
2a…長いパケット
3…PTPパケット
4…PTP調整パケット
1 ... L2 switch (relay device)
2 ... Packet 2a ... Long packet 3 ... PTP packet 4 ... PTP adjustment packet

Claims (5)

マスター・スレーブ間で時刻同期用のPTPパケットを往復させ、スレーブ側においてマスター側との時刻差を算出し、算出された時刻差に基づき時刻同期を実行する方法であって、
前記PTPパケットの送信前に前記PTPパケットの転送タイミングを調整するためのPTPパケット調整パケットを送信するステップを、
有することを特徴とする時刻同期方法。
A method for reciprocating a PTP packet for time synchronization between a master and a slave, calculating a time difference from the master side on the slave side, and performing time synchronization based on the calculated time difference,
Transmitting a PTP packet adjustment packet for adjusting a transfer timing of the PTP packet before transmitting the PTP packet;
A time synchronization method comprising:
前記PTP調整パケットの優先度は、前記PTPパケットより低く設定され、かつ前記PTPパケット以外の他のパケットよりも高く設定されている
ことを特徴とする請求項1記載の時刻同期方法。
The time synchronization method according to claim 1, wherein the priority of the PTP adjustment packet is set lower than the PTP packet and higher than other packets other than the PTP packet.
前記PTP調整パケット数は、マスター・スレーブ間の伝送区間に配置された中継装置数に応じて定められる
ことを特徴とする請求項1または2記載の時刻同期方法。
The time synchronization method according to claim 1 or 2, wherein the number of PTP adjustment packets is determined according to the number of relay apparatuses arranged in a transmission section between a master and a slave.
前記中継装置は、PTP調整パケットをPTPパケットの受信完了まで送信することを特徴とする請求項3記載の時刻同期方法。   4. The time synchronization method according to claim 3, wherein the relay apparatus transmits a PTP adjustment packet until reception of the PTP packet is completed. 前記中継装置は、PTPパケットを受信完了すれば現在のPTP調整パケットの送信が完了したあとPTPパケットを送信する
ことを特徴とする請求項4記載の時刻同期方法。
5. The time synchronization method according to claim 4, wherein the relay apparatus transmits the PTP packet after the transmission of the current PTP adjustment packet is completed when the reception of the PTP packet is completed.
JP2017152109A 2017-08-07 2017-08-07 Time synchronization method Pending JP2019033333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017152109A JP2019033333A (en) 2017-08-07 2017-08-07 Time synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017152109A JP2019033333A (en) 2017-08-07 2017-08-07 Time synchronization method

Publications (1)

Publication Number Publication Date
JP2019033333A true JP2019033333A (en) 2019-02-28

Family

ID=65524484

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017152109A Pending JP2019033333A (en) 2017-08-07 2017-08-07 Time synchronization method

Country Status (1)

Country Link
JP (1) JP2019033333A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518420A (en) * 2020-04-09 2021-10-19 华为技术有限公司 Communication method and communication device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518420A (en) * 2020-04-09 2021-10-19 华为技术有限公司 Communication method and communication device
CN113518420B (en) * 2020-04-09 2023-04-07 华为技术有限公司 Communication method and communication device

Similar Documents

Publication Publication Date Title
US10862601B1 (en) Bridges including physical layer devices for indicating transmission times of synchronization frames by modifying previously generated corresponding follow up frames
US11057136B1 (en) Time correction using extension fields
EP2801162B1 (en) Method and apparatus for communicating time information between time-aware devices
EP2817902B1 (en) Method and network node for processing a precision time protocol
KR20050025582A (en) A system and method for correcting the clock drift and maintaining the synchronization in wireless networks
CN111357318B (en) Method and device for synchronizing between different data packet flows
US20110134766A1 (en) Method and apparatus for finding latency floor in packet networks
US11522801B2 (en) Reducing packet delay variation of time-sensitive packets
US20170288802A1 (en) Time Synchronization Method and Apparatus
US10764201B2 (en) System and method for scheduling communications
WO2015117501A1 (en) Time synchronization method, programmable logic device, single board and network element
US9651984B2 (en) Feed-forward time transfer mechanism for time synchronization
JP5675703B2 (en) Communication device, control device, and program
JP2018155679A (en) Time correction method
JP2019033333A (en) Time synchronization method
Diarra et al. Improved clock synchronization start-up time for Ethernet AVB-based in-vehicle networks
US10462818B2 (en) Method of transmitting data between network devices over a non-deterministic network
JP7435281B2 (en) Network device detection method, communication control method, time synchronization method
JP2017103755A (en) Network based timing system and method to adapt network timing compensation about same
CN110933713B (en) Communication implementation method of industrial wireless sensor network
JP5969424B2 (en) Communications system