JP6805938B2 - Virtual LAN time synchronization method - Google Patents
Virtual LAN time synchronization method Download PDFInfo
- Publication number
- JP6805938B2 JP6805938B2 JP2017071381A JP2017071381A JP6805938B2 JP 6805938 B2 JP6805938 B2 JP 6805938B2 JP 2017071381 A JP2017071381 A JP 2017071381A JP 2017071381 A JP2017071381 A JP 2017071381A JP 6805938 B2 JP6805938 B2 JP 6805938B2
- Authority
- JP
- Japan
- Prior art keywords
- master
- packet
- ptp
- message
- slave
- 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.)
- Active
Links
Images
Description
本発明は、仮想LAN(Virtual LAN:以下、VLANとする。)において、IEEE1588規格のPTP(PrecisionTime Protocol)の時刻同期方法に関する。 The present invention relates to a method of synchronizing the time of PTP (Precision Time Protocol) of the IEEE1588 standard in a virtual LAN (hereinafter referred to as a VLAN).
周知のようにパーソナルコンピュータ(いわゆるパソコン)などの情報処理装置やインターネットの普及により、多くの企業や大学においてイーサネット(登録商標)方式の社内ネットワーク・学内ネットワークが構築され、種々の業務に利用されている。 As is well known, with the spread of information processing devices such as personal computers (so-called personal computers) and the Internet, many companies and universities have constructed Ethernet (registered trademark) in-house networks and on-campus networks, which are used for various tasks. There is.
特に大企業においては、社内ネットワークが大規模なため、ネットワークを部署毎やプロジェクト毎にグループ化が可能なVLANの技術が広く利用されている。このVLANは、物理的なケーブル配線や情報処理装置の設置場所などに依存せずにLAN上の情報処理装置を仮想的にグループ化する技術に関し、IEEE802.1Qにおいて標準化されている。 Especially in large companies, since the in-house network is large, the VLAN technology that can group the network by department or project is widely used. This VLAN is standardized in IEEE802.1Q regarding a technique for virtually grouping information processing devices on a LAN without depending on physical cable wiring or an installation location of the information processing device.
現在では、VLAN機能を備えたスイッチングハブが数多く市販され、VLAN機能を使えば、スイッチングハブは1台のままでポート毎に論理的にネットワークを分割可能となる。 At present, many switching hubs having a VLAN function are commercially available, and if the VLAN function is used, the network can be logically divided for each port while keeping one switching hub.
したがって、VLAN機能によれば、同じスイッチングハブに接続されている情報処理装置を異なるグループに分類し、異なるスイッチングに接続されている情報処理装置を同じグループに分類することができる。このとき情報処理装置群で構成されたネットワークシステムを管理するためには、情報処理装置同士の時刻を同期させておくことが重要になる。 Therefore, according to the VLAN function, the information processing devices connected to the same switching hub can be classified into different groups, and the information processing devices connected to different switching can be classified into the same group. At this time, in order to manage the network system composed of the information processing device group, it is important to synchronize the times of the information processing devices.
この点につき従来の時刻同期用プロトコル、即ちNTP(Network Time Protocol)は、WAN(Wide Area Network)環境でも機能するように作られ、ミリ秒RMSの同期精度のために作られた。このNTPを使用した時刻同期については、例えば特許文献1が公知となっている。
In this regard, the conventional time synchronization protocol, namely NTP (Network Time Protocol), was made to work in a WAN (Wide Area Network) environment and was made for the synchronization accuracy of millisecond RMS. For example,
ところが、従来のNTPは、高精度な時刻同期(マイクロ秒RMS以下のタイプスタンプ精度)には対応できず、厳密な時刻管理が難しい。このため、より時刻精度の高い時刻同期プロトコルが求められ、非特許文献1のPTP(Precision Time Protocol:高精度時刻プロトコル)が開発された。
However, the conventional NTP cannot support highly accurate time synchronization (type stamp accuracy of microsecond RMS or less), and strict time management is difficult. Therefore, a time synchronization protocol with higher time accuracy is required, and PTP (Precision Time Protocol: high-precision time protocol) of Non-Patent
PTPは、ネットワーク全体の時刻を同期させるために使用される標準プロトコルであり、PTPの仕様はIEEE1588として規定されている。ここではGM(Grand master)が高精度な時刻の配信を実行し、スレーブが配信された時刻を受け取る。 PTP is a standard protocol used to synchronize the time of the entire network, and the specification of PTP is specified as IECEE1588. Here, the GM (Grand master) executes highly accurate time delivery, and the slave receives the delivered time.
また、PTPでは、ネットワークインターフェースのMAC(Media Access Control:メディアアクセス制御)やPHY(PHYsical Layer Chip)に実装されたハードウェアタイムスタンプ機能を使って高精度な時刻同期(マイクロ秒RMS以下のタイプスタンプ精度)を実現している。 In PTP, high-precision time synchronization (type stamp of microsecond RMS or less) is performed by using the hardware time stamp function implemented in MAC (Media Access Control) of the network interface and PHY (PHYSical Layer Chip). Accuracy) is realized.
IEEE1588の規格による高精度時刻同期の機能(以下、PTP機能とする。)を実行するスイッチングハブ(以下、PTPハブとする。)では、VLAN機能との同時使用が求められているものの、PTP機能の仕様においてVLAN機能が実装されることが考慮されていない。 A switching hub (hereinafter referred to as a PTP hub) that executes a high-precision time synchronization function (hereinafter referred to as a PTP function) according to the IEEE1588 standard is required to be used simultaneously with a VDC function, but the PTP function is required. The specification does not take into account the implementation of the WLAN function.
図9に基づき詳細を説明する。ここで図9中の10は、L2レベルのPTPハブを示している。このPTPハブ10は、矢印Pに示すように、VLAN1〜3毎にPTPタスク12を生成し、内部のデータをVLAN1〜3毎に保存している。
Details will be described with reference to FIG. Here, 10 in FIG. 9 indicates an L2 level PTP hub. As shown by the arrow P, the
このPTPハブによれば、VLAN処理の対応は可能なものの、これを動作させるためにはVLAN毎に使用するCPU使用量やメモリ(RAM)などの資源(リソース)がVLAN数の2倍の量が必要となってしまう。このようにPTP機能のタスク1つあたりで相当のハードウェア資源を使用するため、VLAN毎にPTPタスクを生成する方法は、一つの機能で使用できる資源(リソース)が限定される組み込み系の機器にとっては現実的ではない。 According to this PTP hub, although it is possible to support VLAN processing, the amount of CPU usage and resources such as memory (RAM) used for each VLAN to operate it is twice the number of VLANs. Will be required. In this way, since a considerable amount of hardware resources are used for each task of the PTP function, the method of generating a PTP task for each VLAN is an embedded device in which the resources that can be used for one function are limited. Not realistic for.
本発明は、このような従来の問題を解決するためになされ、単一のPTP処理タスクで最大限度のVLAN処理を実行可能なPTPの時刻同期方法を提供することを解決課題としている。 The present invention has been made to solve such a conventional problem, and an object of the present invention is to provide a PTP time synchronization method capable of executing the maximum degree of VLAN processing in a single PTP processing task.
(1)本発明は、仮想LANにおいてPTP(PrecisionTime Protocol)によりスレーブをマスターに時刻同期させる方法に関する。この発明の一態様は、以下のステップA〜Dを有する。
A:前記マスターにおいて前記PTPの処理に関連するパケットを受信し、かつ該パケットの所属する仮想LANについて透過処理が必要であれば、該仮想LANが所属する受信ポート以外の全ポートに前記パケットを転送するパケット転送ステップ
B:前記パケットが「announceメッセージ」のときに実行されるマスター選出の条件に前記仮想LANの情報を加えるマスター選出処理ステップ
C:前記「announceメッセージ」の情報が自身のマスター情報よりも優位であれば、前記マスターにおいて前記「announce」メッセージを受信したポートの所属する仮想LANについて透過処理を有効に設定し、該仮想LANに所属する全ポートに前記「announceメッセージ」のパケットを転送するメッセージ転送ステップ
D:前記メッセージ転送ステップ後に前記「announceメッセージ」を受信したポートの所属する仮想LANと全ポートとについて透過処理が有効となれば、前記マスターがスレーブに遷移し、前記マスター選出処理で選出された新たなマスターと時刻同期を実行するマスター状態遷移ステップ
(2)本発明の他の態様は、以下のステップ(a)〜(d)を有する。
a:前記スレーブにおいて前記PTPの処理に関連するパケットを受信し、かつ該パケットについて透過処理する必要があれば、前記パケットを受信したポートのVLANに所属する受信ポート以外の全ポートに前記パケットを転送するスレーブ側のパケット転送ステップ
b:前記パケットが「announceメッセージ」のときに実行されるマスター選出の条件に前記仮想LANの情報を加えるマスター選出処理ステップ
c:前記パケットの送信元が前記マスター側であれば、前記スレーブにおいて「announceメッセージ」についての受信タイムアウト用のタイマーを再登録する第1のタイマー再登録ステップ
d:前記パケットの送信元が前記マスターでなければ、前記スレーブにおいてマスター選出処理の結果、新たなマスターが選出されているか否かを確認し、新たなマスターが選出されているときは前記受信タイムアウト用のタイマーを再登録する第2のタイマー再登録ステップ
(1) The present invention relates to a method of synchronizing the time of a slave with a master by PTP (Precision Time Protocol) in a virtual LAN. One aspect of the present invention comprises the following steps A to D.
A: If the master receives a packet related to the PTP processing and transparent processing is required for the virtual LAN to which the packet belongs, the packet is sent to all ports other than the receiving port to which the virtual LAN belongs. Packet transfer step B to be forwarded: Master selection process step C: adding the virtual LAN information to the master selection condition executed when the packet is an "announcing message" Step C: The information in the "announcing message" is its own master information. If it is superior to the above, the transparent processing is enabled for the virtual LAN to which the port that received the "announce" message belongs in the master, and the packet of the "announce message" is sent to all the ports belonging to the virtual LAN. Message transfer step D to be transferred: If the transparency process is enabled for all the ports and the virtual LAN to which the port that received the "packet message" belongs after the message transfer step, the master transitions to the slave and the master is elected. Master state transition step of executing time synchronization with a new master selected in the process (2) Another aspect of the present invention includes the following steps (a) to (d).
a: If the slave receives a packet related to the processing of the PTP and needs to perform transparent processing on the packet, the packet is sent to all ports other than the receiving port belonging to the VLAN of the port that received the packet. Packet transfer step b on the slave side to be transferred: Master selection process step c: the source of the packet is the master side, which adds the information of the virtual LAN to the condition of master selection executed when the packet is an "announcing message". If so, the first timer re-registration step d of re-registering the timer for the reception timeout for the "acknowledgement message" in the slave: If the source of the packet is not the master, the master selection process in the slave As a result, it is confirmed whether or not a new master has been elected, and if a new master has been elected, the second timer re-registration step of re-registering the timer for the reception timeout.
本発明によれば、単一のPTP処理タスクで最大限度のVLAN処理を実行可能なPTPの時刻同期方法を提供することができる。 According to the present invention, it is possible to provide a PTP time synchronization method capable of executing the maximum degree of VLAN processing in a single PTP processing task.
以下、本発明の実施形態に係る仮想LANの時刻同期方法を説明する。この仮想LAN(VLAN)の時刻同期方法は、複数の図1に示すPTPハブ(L2レベル/L3レベル)20により実行される。このPTPハブ20は、VLAN機能を備え、イーサネット方式の社内・学内ネットワークの構築などに用いられ、情報処理装置(パーソナルコンピュータなど)が接続される。
Hereinafter, the time synchronization method of the virtual LAN according to the embodiment of the present invention will be described. This virtual LAN (VLAN) time synchronization method is executed by a plurality of PTP hubs (L2 level / L3 level) 20 shown in FIG. The
このPTPハブ20によれば、LAN上の情報処理装置をVLAN機能により仮想的にグループ化することができ、情報処理装置同士の時刻がPTP機能により同期される。このときPTPハブ20は、矢印Qに示すように、単一のPTP処理タスク21にてVLAN1〜3を処理することができる。
According to the
≪全体処理≫
図2に基づき前記仮想LANの時刻同期方法の全体処理(処理ステップ)を説明する。ここではPTPハブ20は、自動でマスター(時刻同期元)とスレーブ(時刻同期先)とが切り替え可能であり、スレーブとマスターとでは動作が相違する。
≪Overall processing≫
The entire process (processing step) of the time synchronization method of the virtual LAN will be described with reference to FIG. Here, the
すなわち、LAN上にPTPハブ20が複数台接続され、マスター選出(best master clock:bmc)処理により一台のPTPハブ20がマスターに選出される。一方、マスター以外のPTPハブは、スレーブとしてマスターから同期情報(時刻情報)を取得し、該同期情報に基づきマスターと時刻同期する。
That is, a plurality of
したがって、前記仮想LANの時刻同期方法によれば、まずPTP処理タスク21は、PTPハブ20がマスター状態か否かを確認する(S01)。つぎにPTP処理タスク21は、S01の確認の結果、PTPハブ20がマスター状態であればマスター状態処理を実行する(S02)一方、PTPハブ20がマスター状態でなければスレーブ状態か否かを確認する(S03)。
Therefore, according to the time synchronization method of the virtual LAN, the
また、PTP処理タスク21は、S02の確認の結果、PTPハブ20がスレーブ状態であればスレーブ状態処理を実行する(S04)を実行する一方、PTPハブ20がスレーブ状態でなければその他状態処理(例えば時刻同期関係に無い場合の処理など)を実行する(S05)。
Further, as a result of the confirmation in S02, the
ただし、前記仮想LANの時刻同期方法では、PTP処理タスク21の実行するS02のマスター状態処理(マスター側の処理)と、S04のスレーブ状態処理(スレーブ側の処理)とにVLAN対応処理が追加されている。
However, in the virtual LAN time synchronization method, VLAN-compatible processing is added to the master state processing (master side processing) of S02 and the slave state processing (slave side processing) of S04 executed by the
以下では、マスターとなるPTPハブ20をマスター20aと示し、スレーブとなるPTPハブ20をスレーブ20bと示すこととする。また、S02のマスター状態処理とS04のスレーブ状態処理とに大別し、それぞれの処理に追加されたVLAN対応処理を中心に説明する。
In the following, the
≪マスター状態処理(S02)≫
図3に基づきS02のマスター状態処理(マスター側の処理)を説明する。ここではマスターとなるPTPハブ(以下、マスターと省略する。)20の基本的なマスター状態処理A1と、タイマー処理B1とに大別して説明する。
<< Master state processing (S02) >>
The master state processing (processing on the master side) of S02 will be described with reference to FIG. Here, the basic master state processing A1 of the PTP hub (hereinafter abbreviated as master) 20 as the master and the timer processing B1 will be roughly classified.
(1)マスター状態処理A1
S11〜S13:マスター20aは、受信したパケット(以下、受信パケットとする。)がPTPの時刻処理に関連するか否か、即ちIEEE1588に規定するPTPパケットが否かを判断する(S11)。
(1) Master state processing A1
S11 to S13: The master 20a determines whether or not the received packet (hereinafter referred to as a received packet) is related to the time processing of PTP, that is, whether or not the PTP packet specified in IEEE1588 is present (S11).
この判断の結果、PTPパケットでなければマスター状態処理A1は開始されない(S12)一方、PTPパケットであればS13に進みマスター状態処理A1を開始する。 As a result of this determination, the master state processing A1 is not started unless it is a PTP packet (S12), while if it is a PTP packet, the process proceeds to S13 and the master state processing A1 is started.
S13:マスター20aは、受信パケットの所属するVLANについて、透過処理(transparent)をする必要があるか否かを判断する(S13)。その結果、必要がなければそのままS15に進む一方、必要があればVLAN単位の透過情報D1に基づき対象のVLANが所属する受信ポート以外の全ポートに受信パケットを転送し(S14)、S15に進む。 S13: The master 20a determines whether or not it is necessary to perform transparent processing (transparent) on the VLAN to which the received packet belongs (S13). As a result, if it is not necessary, the process proceeds to S15 as it is, and if necessary, the received packet is transferred to all ports other than the receiving port to which the target VLAN belongs based on the transparency information D1 of the VLAN unit (S14), and the process proceeds to S15. ..
S15〜S17:マスター20aは、受信パケットの種別が「announceメッセージ」であるか否かを確認し(S15)、「Announceメッセージ」でなければ従来と同様のPTP時刻同期を実行する(S16)。 S15 to S17: The master 20a confirms whether or not the type of the received packet is an "announcing message" (S15), and if it is not an "Announce message", executes the same PTP time synchronization as before (S16).
すなわち、マスター20aは、スレーブ20bとの間において「Syncメッセージ(同期メッセージ)」,「Delay_requestメッセージ(遅延要求メッセージ)」,「Delay_responsメッセージ(遅延応答メッセージ)」を交換し、タイマー処理B1に移行する。 That is, the master 20a exchanges a "Sync message (synchronous message)", a "Delay_request message (delay request message)", and a "Delay_respons message (delay response message)" with the slave 20b, and shifts to the timer process B1. ..
一方、受信パケットの種別が「announceメッセージ」であれば、マスター選出処理が実行され(S17)、「bmc情報」D3を出力する。このときマスター選出の条件(bmcアルゴリズム)にVLAN情報D2を加える。例えばポートベースVLANであれば、接続ポート番号などのVLANグループを識別するための情報を付加することができる。これにより同一のPTPハブからの「announceメッセージ」の情報であっても別情報として扱えることが可能となる。 On the other hand, if the type of the received packet is "announcing message", the master selection process is executed (S17), and "bmc information" D3 is output. At this time, the VLAN information D2 is added to the master selection condition (bmc algorithm). For example, in the case of a port-based VLAN, information for identifying a VLAN group such as a connection port number can be added. This makes it possible to handle the information of the "announce message" from the same PTP hub as different information.
S18〜S22:新たなマスターが検出されたか否かを確認する(S18)。すなわち、「bmc情報」D3の情報を参照して受信パケットに含まれる「announceメッセージ」の情報が、自身のマスター情報より優位であるか否かを確認する。 S18 to S22: It is confirmed whether or not a new master has been detected (S18). That is, it is confirmed whether or not the information of the "announce message" included in the received packet is superior to the own master information by referring to the information of the "bmc information" D3.
この確認の結果、自身のマスター情報より優位であれば、VLAN情報D2を参照して「announce情報」を含む受信パケットの受信ポートが所属するVLANを判定する(S19)。 As a result of this confirmation, if it is superior to its own master information, it determines the VLAN to which the receiving port of the received packet including the "announcement information" belongs by referring to the VLAN information D2 (S19).
ここで判定されたVLANに所属する全ポートについて透過処理を有効に設定し、該VLANに所属する全ポートに「announceメッセージ」を含む受信パケットを転送する(S20)。なお、S18にて自身のマスター情報より優位な情報が確認できなければ、タイマー処理B1に進む。 The transparency process is effectively set for all the ports belonging to the VLAN determined here, and the received packet including the "announce message" is transferred to all the ports belonging to the VLAN (S20). If information superior to its own master information cannot be confirmed in S18, the process proceeds to timer processing B1.
S21,S22:S20の処理後、S19で透過処理を有効設定されたポートが1つでも所属するVLANの全ポートについて透過処理が有効となったか否かを判定する(S21)。 After the processing of S21 and S22: S20, it is determined whether or not the transparency processing is enabled for all the ports of the VLAN to which even one port to which the transparency processing is enabled is set in S19 (S21).
この判定の結果、前記全ポートについて透過処理が有効となった場合には、タイマー情報D4から「announceメッセージ」に関連するタイマー削除して(S22)、既存のスレーブ状態処理A2へ移行し(S23)、マスター状態処理A1を終了する。 As a result of this determination, when the transparent processing is enabled for all the ports, the timer related to the "announcing message" is deleted from the timer information D4 (S22), and the process shifts to the existing slave state processing A2 (S23). ), The master state process A1 is terminated.
一方、前記全ポートについて透過処理が有効となっていない場合には、対象のVLANの「announceメッセージ」受信タイムアウト用のタイマーを再登録し(S24)、タイマー処理B1に移行する。 On the other hand, when the transparency processing is not enabled for all the ports, the timer for the "announce message" reception timeout of the target VLAN is re-registered (S24), and the process proceeds to the timer processing B1.
(2)タイマー処理B1
S30〜S32:マスター20aは、タイマー情報D4に基づき登録タイマーがタイムアウト状態か否かを確認し(S30)、タイムアウト状態であればタイマー処理B1を終了する。一方、登録タイマーがタイムアウト状態でなければ、タイマー種別が「announceメッセージ」の送信か否かを確認する(S31)。
(2) Timer processing B1
S30 to S32: The master 20a confirms whether or not the registration timer is in the time-out state based on the timer information D4 (S30), and if it is in the time-out state, terminates the timer process B1. On the other hand, if the registration timer is not in the timeout state, it is confirmed whether or not the timer type is the transmission of the "announce message" (S31).
この確認の結果、タイマー種別が「announceメッセージ」の送信であれば、透過対象VLAN以外のポート、即ち透過処理が無効なVLANの所属する全ポート(S24の全ポート)に「announceメッセージ」のパケットを送信する(S32)。なお、タイマー種別が「announceメッセージ」の送信でなければS33に進む。 As a result of this confirmation, if the timer type is "announce message" transmission, the "announce message" packet is sent to the ports other than the transparent target VLAN, that is, all the ports to which the transparent processing is disabled VLAN (all ports of S24). Is transmitted (S32). If the timer type is not "announce message", the process proceeds to S33.
S33:マスター20aは、タイマー種別が「syncメッセージ」の送信か否かを確認する。この確認の結果、タイマー種別が「syncメッセージ」の送信であれば、透過対象VLAN以外のポート、即ち透過処理が無効なVLANの所属する全ポート(S24の全ポート)に「syncメッセージ」のパケットを送信する(S32)。なお、タイマー種別が「syncメッセージ」の送信でなければS34に進む。 S33: The master 20a confirms whether or not the timer type is "sync message" transmission. As a result of this confirmation, if the timer type is "sync message" transmission, the "sync message" packet is sent to the port other than the transparent target VLAN, that is, all the ports to which the transparent processing is disabled VLAN (all ports of S24). Is transmitted (S32). If the timer type is not "sync message" transmission, the process proceeds to S34.
S34,S35:マスター20aは、タイマー種別が「announceメッセージ」の受信か否かを確認する(S34)。この確認の結果、タイマー種別が「announceメッセージ」の受信であれば、対象のVLANの透過処理を無効として(S35)、タイマー処理を終了する。一方、タイマー種別が「announceメッセージ」の受信でなければ、従来のPTP処理を実行する(S16)。 S34, S35: The master 20a confirms whether or not the timer type is "announcing message" (S34). As a result of this confirmation, if the timer type is "announcing message", the transparency processing of the target VLAN is invalidated (S35), and the timer processing is terminated. On the other hand, if the timer type is not the reception of the "announce message", the conventional PTP process is executed (S16).
≪スレーブ状態処理(S04)≫
図4に基づきS04のスレーブ状態処理(スレーブ側の処理)を説明する。ここではスレーブとなるPTPハブ(以下、マスターと省略する。)20の基本的なスレーブ状態処理A2と、タイマー処理B2とに大別して説明する。
<< Slave state processing (S04) >>
The slave state processing (processing on the slave side) of S04 will be described with reference to FIG. Here, the basic slave state processing A2 of the PTP hub (hereinafter abbreviated as master) 20 as a slave and the timer processing B2 will be roughly described.
(1)スレーブ状態処理A2
S41〜S43:スレーブ20bは、受信したパケット(以下、受信パケットとする。)がPTPの時刻処理に関連するか否か、即ちIEEE1588に規定するPTPパケットが否かを判断する(S41)。
(1) Slave state processing A2
S41 to S43: The slave 20b determines whether or not the received packet (hereinafter referred to as a received packet) is related to the time processing of PTP, that is, whether or not the PTP packet specified in IEEE1588 is present (S41).
この判断の結果、PTPパケットでなければスレーブ状態処理A2が開始されない(S42)一方、PTPパケットであればS43に進んでスレーブ状態処理A2を開始する。 As a result of this determination, the slave state processing A2 is not started unless it is a PTP packet (S42), while if it is a PTP packet, it proceeds to S43 and starts the slave state processing A2.
S43:スレーブ20bは、透過処理する必要性を判断し(S43)、必要があればVLAN情報D2を参照して透過処理後(S44)、受信パケットを受信したポートのVLANに所属する受信パケット以外の全ポートに受信パケットを転送し(S45)、S46に進む。なお、透過処理の必要がなければS45の転送をすることなく、S46に進む。 S43: The slave 20b determines the necessity of transparent processing (S43), and if necessary, refers to the VLAN information D2 to perform transparent processing (S44), and the slave 20b other than the received packet belonging to the VLAN of the port that received the received packet. The received packet is forwarded to all the ports of (S45), and the process proceeds to S46. If there is no need for transparent processing, the process proceeds to S46 without transferring S45.
S46:スレーブ20bは、受信パケットの種別が「announceメッセージ」であるか否かを確認し、「announceメッセージ」でなければS47に進む一方、「announceメッセージ」であればS51に進む。 S46: The slave 20b confirms whether or not the type of the received packet is "announcing message", and proceeds to S47 if it is not "announcing message", while proceeding to S51 if it is "anknown message".
S47〜S50:スレーブ20bは、受信パケットがマスター20aを送信元とする「syncメッセージ」であるか否かを確認する(S47)。この確認の結果、マスター20aからの「syncメッセージ」でなければ、従来のPTP処理を実行する(S50)。 S47 to S50: The slave 20b confirms whether or not the received packet is a "sync message" originating from the master 20a (S47). As a result of this confirmation, if it is not a "sync message" from the master 20a, the conventional PTP process is executed (S50).
一方、マスター20aからの「syncメッセージ」であれば、スレーブ20bはsync処理を実行する(S48)。ここではスレーブ20bは、受信した「syncメッセージ」の受信時刻t1を記憶し、該「syncメッセージ」の送信時刻t2を抽出して記憶する。 On the other hand, if it is a "sync message" from the master 20a, the slave 20b executes the sync process (S48). Here, the slave 20b stores the reception time t1 of the received "sync message", and extracts and stores the transmission time t2 of the "sync message".
その後、スレーブ20bは「syncメッセージ」の送信元(要求元)のマスター20aに「Delay_requestメッセージ」を送信し(S49)、従来のPTP処理を実行する(S50)。 After that, the slave 20b transmits a "Delay_request message" to the master 20a of the source (request source) of the "sync message" (S49), and executes the conventional PTP process (S50).
すなわち、スレーブ20bは、「Delay_requestメッセージ」の送信時刻t3と、「Delay_requestメッセージ」に対する「Delay_responsメッセージ」の受信時刻t4とを記憶し、時刻t1〜t4に基づきマスター20aとの時刻同期処理を実行する。ここでは時刻t1〜t4のタイムスタンプに基づきメッセージ往復の遅延時間と、マスター・スレーブ間の時刻差(クロックのオフセット)を算出し、スレーブ20bの時刻を補正する。 That is, the slave 20b stores the transmission time t3 of the "Delay_request message" and the reception time t4 of the "Delay_respons message" for the "Delay_request message", and executes the time synchronization process with the master 20a based on the times t1 to t4. .. Here, the delay time of the message round trip and the time difference (clock offset) between the master and slave are calculated based on the time stamps of times t1 to t4, and the time of the slave 20b is corrected.
S51:マスター選出処理が実行され、「bmc情報」D3を出力する。このときマスター選出の条件(bmcアルゴリズム)にVLAN情報D2を加えて、同一のPTPハブからの「announceメッセージ」の情報であっても別情報として扱えるようにする。 S51: The master selection process is executed, and the "bmc information" D3 is output. At this time, the VLAN information D2 is added to the master selection condition (bmc algorithm) so that even the information of the "announce message" from the same PTP hub can be treated as different information.
S52:スレーブ20bは、今回の「announceメッセージ」、即ち受信パケットがマスター20aから送信されているか否かを確認する。ここでは受信パケットの送信元が、S51のマスター検出処理前の旧マスター20aか否かを確認する。 S52: The slave 20b confirms whether or not the current "announcing message", that is, the received packet is transmitted from the master 20a. Here, it is confirmed whether or not the source of the received packet is the old master 20a before the master detection process of S51.
S53:スレーブ20bは、S52の確認の結果、受信パケットの送信元がマスター20aであれば、スレーブ20bは「announceメッセージ」の受信タイムアウト用のタイマーをタイマー情報D5に再登録し(S53)、処理を終了する。 S53: As a result of the confirmation of S52, if the source of the received packet is the master 20a, the slave 20b re-registers the timer for the reception timeout of the "announce message" in the timer information D5 (S53) and processes it. To finish.
S54,S55:スレーブ20bは、S52の確認の結果、受信パケットの送信元がマスター20aでなければ、スレーブ20bはS51のマスター選出処理の結果、新マスター20aが選出されているか否かを確認する(S54)。 S54, S55: As a result of the confirmation of S52, the slave 20b confirms whether or not the new master 20a is selected as a result of the master selection process of S51 if the source of the received packet is not the master 20a. (S54).
この確認の結果、新マスターが選出されていれば、「announceメッセージ」受信タイムアウト用のタイマーを再登録し(S55)、その後にタイマー処理B2を行って処理を終了する。なお、新マスターが選出されていなければ、前記タイマー再登録(S22)をすることなく、タイマー処理B2に移行する。 If a new master is selected as a result of this confirmation, the timer for the "announce message" reception timeout is re-registered (S55), and then the timer process B2 is performed to end the process. If the new master has not been selected, the process proceeds to timer processing B2 without re-registering the timer (S22).
(2)タイマー処理B2
スレーブ20bは、登録タイマーがタイムアウト状態か否かを確認する(S60)。この確認の結果、タイムアウト状態でなければ、スレーブ20bは従来のPTPのタイマー処理を実行する(S61)。
(2) Timer processing B2
The slave 20b confirms whether or not the registration timer is in the timeout state (S60). As a result of this confirmation, if it is not in the timeout state, the slave 20b executes the conventional PTP timer processing (S61).
一方、タイムアウト状態であれば、スレーブ20bはタイマー種別について「announceメッセージ」の受信か否かを確認する(S62)。この確認の結果、「announceメッセージ」の受信であれば、マスター情報をクリアして「bmc情報」D3に出力し(S63)、マスター判定状態へ遷移する(S64)。 On the other hand, if it is in the time-out state, the slave 20b confirms whether or not the "announce message" is received for the timer type (S62). As a result of this confirmation, if the "announce message" is received, the master information is cleared and output to the "bmc information" D3 (S63), and the state transitions to the master determination state (S64).
すなわち、「announceメッセージ」の送受信によりマスター/スレーブ階層が確立され、その後の時刻転送プロセスによりSyncメッセージ」,「Follow_upメッセージ」,「Delay_requestメッセージ」,「Delay_responsメッセージ」が交換される。なお、S62の確認の結果、「announceメッセージ」の受信でなければ、S61に進んで従来のPTP処理が実行される。 That is, the master / slave hierarchy is established by sending and receiving the "announce message", and the "Sync message", "Follow_up message", "Delay_request message", and "Delay_respons message" are exchanged by the subsequent time transfer process. As a result of the confirmation in S62, if the "announce message" is not received, the process proceeds to S61 and the conventional PTP process is executed.
このように前記仮想LANの時刻同期方法によれば、PTP処理タスク21によってマスター状態処理(S11〜S35)とスレーブ状態処理(S41〜S64)が実行される。したがって、単一のPTP処理タスク21で最大限度のVLAN処理を実行可能なPTPの時刻同期方法を提供することが可能となる。
As described above, according to the time synchronization method of the virtual LAN, the master state processing (S11 to S35) and the slave state processing (S41 to S64) are executed by the
≪作用・動作の説明≫
前記仮想LANの時刻同期方法によれば、簡易VLAN対応のPTPを使用することでVLANを使った幅広いネットワーク構成が可能となる。以下、代表的な実施例を説明する。
≪Explanation of action / operation≫
According to the virtual LAN time synchronization method, a wide range of network configurations using a VLAN can be made by using a simple VLAN-compatible PTP. A typical example will be described below.
(1)実施例1
図5に基づき実施例1を説明する。この実施例1は、PTPハブ20の冗長化接続例を示している(PTPハブの冗長化接続が可能)。
(1) Example 1
The first embodiment will be described with reference to FIG. This Example 1 shows a redundant connection example of the PTP hub 20 (redundant connection of the PTP hub is possible).
図5中のPTPハブ1,2はスレーブ(slave)となるPTPハブ20を示し、同PTPハブ3はマスター(master)となるPTPハブ20を示し、PTPハブ1,2とPTPハブ3とが、VLAN10,20により重複接続されている。
The
これにより回線A,Bの一方が維持されれば、他の回線のいずれかに異常が発生しても、PTPハブ1,2とPTPハブ3との時刻同期が可能となる。
As a result, if one of the lines A and B is maintained, the time can be synchronized between the
なお、PTPハブ3から送信される「announceメッセージ」は、VLAN10,20の両方を流れ続けるので、通常よりVLAN10,20の切替時間を短縮することができる。
Since the "announce message" transmitted from the
(2)実施例2
図6に基づき実施例2を説明する。この実施例2は、単一VLAN同士の接続例を示している(単一VLAN同士の接続が可能)。
(2) Example 2
The second embodiment will be described with reference to FIG. The second embodiment shows an example of connection between single VLANs (connection between single VLANs is possible).
図6中のPTPハブ1,4は、VLAN20,10の各グループについてマスターとなるPTPハブ20を示している。また、図6中のPTPハブ2,3は、PTPハブ1をマスターとするスレーブのPTPハブ20を示し、同PTPハブ5,6は、PTPハブ4をマスターとするスレーブのPTPハブ20を示している。
さらにVLAN10グループのPTPハブ4とVLAN20グループのPTPハブ3とが接続され、PTPハブ1,4については「PTPハブ1>PTPハブ4」の優先度が設定されているものとする。
Further, it is assumed that the PTP hub 4 of the
このときVLANグループ20,10のマスター、即ちPTPハブ1,4の優先度によっては一方がマスター状態処理(S02)を維持し、他方がスレーブ状態処理(S04)に移行する(図3のS23)。すなわち、図6のVLAN構成によれば、PTPハブ1,4の優先度が「PTPハブ1>PTPハブ4」と設定されているため、PTPハブ4がスレーブ状態処理(S04)に移行し、PTPハブ2〜4がPTPハブ1に時刻同期する。
At this time, depending on the priority of the masters of the
(3)実施例3
図7に基づき実施例3を説明する。この実施例3は、複数VLAN同士の接続例を示している(複数VLAN同士の接続が可能)。
(3) Example 3
Example 3 will be described with reference to FIG. 7. This Example 3 shows a connection example between a plurality of VLANs (a plurality of VLANs can be connected to each other).
図7中のPTPハブ2は、VLAN10,20が重複接続され、PTPハブ1,3をスレーブとするマスターを示している。また、図7中のPTPハブ4は、VLAN20,30が重複接続され、PTPハブ5,6をスレーブとするマスターを示している。このPTPハブ2,4については「PTPハブ2>PTPハブ4」の優先度が設定されているものとする。
The PTP hub 2 in FIG. 7 shows a master in which the
このようなVLAN構成において、PTPハブ1をPTPハブ4に接続すれば、PTPハブ4は、VLAN20についてマスター状態処理(S02)を停止し、透過処理となるため、PTPハブ5の時刻同期元がPTPハブ4からPTPハブ2へと切り替わる(S13〜S23)。一方、PTPハブ4は、VLAN30についてマスター状態処理(S02)をそのまま維持し(S16)、PTPハブ6がPTPハブ4に時刻同期したままとなる。
In such a VLAN configuration, if the
なお、PTPハブ1とPTPハブ4との接続を開放すれば、VLAN20についてPTPハブ4は、S55のタイマー再登録後に元の状態、即ちVLAN20のマスター状態処理(S02)に戻ることができる。
If the connection between the
(4)実施例4
図8に基づき実施例4を説明する。この実施例4は、遠隔地の複数VLAN接続の中継接続を示している(遠隔地の複数VLAN接続の中継が可能)。図8中のPTPハブ1〜3は拠点Aに配置されたマスターのPTPハブ20を示し、同PTPハブ6〜8は拠点Bに配置されたスレーブのPTPハブ20を示し、PTPハブ1〜3の優先度についてはPTPハブ1が最も高く設定されている。
(4) Example 4
Example 4 will be described with reference to FIG. This Example 4 shows a relay connection of a plurality of VLAN connections in a remote place (relay of a plurality of VLAN connections in a remote place is possible).
また、図8中のPTPハブ4,5は、PTPハブ1〜3・PTPハブ6〜8間のVLAN10〜30の接続をタグVLANにて中継するPTPハブ20を示している。ここではPTPハブ4,5間を1本の光ファイバーケーブルCで接続し、PTPハブ1〜3・PTPハブ6〜8間を時刻同期させている。
Further, PTP hubs 4 and 5 in FIG. 8 indicate a
このときPTPハブ4,5は、PTPハブ1〜3中で最も優先度の高いものと時刻同期するため、PTPハブ1と時刻同期を実行し(S41〜S53,S60,S61)、他のVLAN20,30(PTPハブ2,3)については透過処理のみとなる(S44〜S50)。
At this time, the PTP hubs 4 and 5 execute time synchronization with the PTP hub 1 (S41 to S53, S60, S61) in order to synchronize the time with the one having the highest priority among the
20…PTPハブ
21…PTP処理タスク
20 ...
Claims (5)
前記マスターにおいて前記PTPの処理に関連するパケットを受信し、かつ該パケットの所属する仮想LANについて透過処理が必要であれば、該仮想LANが所属する受信ポート以外の全ポートに前記パケットを転送するパケット転送ステップと、
前記パケットが「announceメッセージ」のときに実行されるマスター選出の条件に前記仮想LANの情報を加えるマスター選出処理ステップと、
前記「announceメッセージ」の情報が自身のマスター情報よりも優位であれば、前記マスターにおいて前記「announce」メッセージを受信したポートの所属する仮想LANについて透過処理を有効に設定し、該仮想LANに所属する全ポートに前記「announceメッセージ」のパケットを転送するメッセージ転送ステップと、
前記メッセージ転送ステップ後に前記「announceメッセージ」を受信したポートの所属する仮想LANと全ポートとについて透過処理が有効となれば、前記マスターがスレーブに遷移し、前記マスター選出処理で選出された新たなマスターと時刻同期を実行するマスター状態遷移ステップと、
を有することを特徴とする仮想LANの時刻同期方法。 This is a method of synchronizing the time of a slave with a master by PTP (Precision Time Protocol) in a virtual LAN.
If the master receives a packet related to the processing of the PTP and transparent processing is required for the virtual LAN to which the packet belongs, the packet is transferred to all ports other than the receiving port to which the virtual LAN belongs. Packet transfer step and
A master selection processing step that adds the virtual LAN information to the master selection condition executed when the packet is an "announcing message", and
If the information of the "announcing message" is superior to its own master information, the transparency processing is enabled for the virtual LAN to which the port to which the "announce" message is received in the master belongs, and the information belongs to the virtual LAN. A message transfer step of transferring the packet of the "information message" to all the ports to be used, and
If the transparency process is enabled for all the ports and the virtual LAN to which the port that received the "announcing message" belongs after the message transfer step, the master transitions to the slave and a new master is selected in the master selection process. A master state transition step that performs time synchronization with the master,
A virtual LAN time synchronization method comprising.
前記チェックの結果、タイマー種別が「announceメッセージ」/「syncメッセージ」の送信であれば、マスター前記において透過処理の無効な仮想LANに所属する全ポートへ「announceメッセージ」/「syncメッセージ」のパケットを送信するステップと、
前記チェックの結果、タイマー種別が「announceメッセージ」の受信であれば、前記マスターにおいて対象のVLANの透過処理を無効にするステップと、
をさらに有することを特徴とする請求項1記載の仮想LANの時刻同期方法。 If the packet in the packet transfer step is not an "announcing message", the step of checking the registration timer in the master and
As a result of the above check, if the timer type is "announcing message" / "sync message", a packet of "announce message" / "sync message" is sent to all ports belonging to the virtual LAN for which transparency processing is invalid in the master. And the steps to send
As a result of the check, if the timer type is "announce message", the step of disabling the transparency processing of the target VLAN in the master and
The time synchronization method for a virtual LAN according to claim 1, further comprising.
前記スレーブにおいて前記PTPの処理に関連するパケットを受信し、かつ該パケットについて透過処理する必要があれば、前記パケットを受信したポートのVLANに所属する受信ポート以外の全ポートに前記パケットを転送するスレーブ側のパケット転送ステップと、
前記パケットが「announceメッセージ」のときに実行されるマスター選出の条件に前記仮想LANの情報を加えるマスター選出処理ステップと、
前記パケットの送信元が前記マスター側であれば、前記スレーブにおいて「announceメッセージ」についての受信タイムアウト用のタイマーを再登録する第1のタイマー再登録ステップと、
前記パケットの送信元が前記マスターでなければ、前記スレーブにおいてマスター選出処理の結果、新たなマスターが選出されているか否かを確認し、新たなマスターが選出されているときは前記受信タイムアウト用のタイマーを再登録する第2のタイマー再登録ステップと、
を有することを特徴とする仮想LANの時刻同期方法。 This is a method of synchronizing the time of a slave with a master by PTP (Precision Time Protocol) in a virtual LAN.
If the slave receives a packet related to the processing of the PTP and needs to perform transparent processing on the packet, the packet is transferred to all ports other than the receiving port belonging to the VLAN of the port that received the packet. The packet transfer step on the slave side and
A master selection processing step that adds the virtual LAN information to the master selection condition executed when the packet is an "announcing message", and
If the source of the packet is the master side, the first timer re-registration step of re-registering the timer for the reception timeout for the "announce message" in the slave,
If the source of the packet is not the master, the slave confirms whether or not a new master has been selected as a result of the master selection process, and if a new master is selected, the reception timeout is used. The second timer re-registration step to re-register the timer,
A virtual LAN time synchronization method comprising.
さらに有することを特徴とする請求項3記載の仮想LANの時刻同期方法。 If the packet is a "sync message", the slave is confident that the source of the packet is the master, and if the source is the master, a step of returning a "delay request message" is performed.
The time synchronization method for a virtual LAN according to claim 3, further comprising.
前記確認の結果、タイムアウトの場合にタイマー種別が「announceメッセージ」の受信であれば、前記スレーブにおいて前記マスターの情報をクリアしてマスター判定状態に遷移するステップと、
を有することを特徴とする請求項3または4に記載の仮想LANの時刻同期方法。 After the second timer re-registration step, the slave confirms whether or not the timer for the reception timeout has timed out.
As a result of the above confirmation, if the timer type is "announce message" in the case of a timeout, the slave clears the master information and transitions to the master determination state.
The time synchronization method for a virtual LAN according to claim 3 or 4, wherein the method is characterized by the above.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017071381A JP6805938B2 (en) | 2017-03-31 | 2017-03-31 | Virtual LAN time synchronization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017071381A JP6805938B2 (en) | 2017-03-31 | 2017-03-31 | Virtual LAN time synchronization method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018174445A JP2018174445A (en) | 2018-11-08 |
JP6805938B2 true JP6805938B2 (en) | 2020-12-23 |
Family
ID=64107575
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017071381A Active JP6805938B2 (en) | 2017-03-31 | 2017-03-31 | Virtual LAN time synchronization method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6805938B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7095578B2 (en) * | 2018-11-30 | 2022-07-05 | 株式会社明電舎 | Network connection information collection method, relay device, network connection information collection method |
JP7314728B2 (en) * | 2019-09-09 | 2023-07-26 | 株式会社明電舎 | Communication path switching method, communication path switching method |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2939587B1 (en) * | 2008-12-09 | 2011-04-08 | Alcatel Lucent | CLOCK FOR A NODE OF A PACKET SWITCHING NETWORK AND ASSOCIATED SYNCHRONIZATION METHOD. |
JP5560706B2 (en) * | 2009-12-28 | 2014-07-30 | 富士通株式会社 | Node equipment |
JP6147467B2 (en) * | 2011-11-14 | 2017-06-14 | 富士通株式会社 | Frame transmission apparatus and synchronization method |
KR101589227B1 (en) * | 2015-01-20 | 2016-01-27 | 현대자동차주식회사 | Method and apparatus for controlling synchronization of camera shutter in in-vehicle Ethernet communication network |
JP2016139846A (en) * | 2015-01-26 | 2016-08-04 | 富士通株式会社 | Time synchronization system, master unit and slave unit, and time synchronization method |
JP6516217B2 (en) * | 2015-03-25 | 2019-05-22 | セイコーソリューションズ株式会社 | Synchronization message transmitter, time synchronization system, synchronization message transmission method and program |
-
2017
- 2017-03-31 JP JP2017071381A patent/JP6805938B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018174445A (en) | 2018-11-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11496235B2 (en) | Symmetric path/link over LAG interface using LLDP for time synchronization between two nodes using PTP | |
EP3016306B1 (en) | Method and apparatus for providing in-vehicle network time synchronization using redundant grandmaster | |
CN100555948C (en) | A kind of switching equipment of in the stack exchanger system, being coupled of being used for | |
CN101595669B (en) | Method and device for exchanging information for facilitating synchronization of time network | |
CN101820435B (en) | Synchronization method and device for MAC (Media Access Control) address table information of distributed network processing system | |
CN101170373A (en) | Clock synchronization realization method for loop network | |
US10892839B2 (en) | Method for fast reconfiguration of GM clocks in the TSN network by means of an explicit teardown message | |
CN101164264A (en) | Method and device for synchronising two bus systems, and arrangement consisting of two bus systems | |
WO2015196685A1 (en) | Clock synchronization method and apparatus | |
CN102299788A (en) | Method and device for controlling automatic transmission of IEEE1558 (Institute of Electrical and Electronic Engineers 1558) protocol message | |
WO2012071910A1 (en) | Method and device for achieving time synchronization | |
WO2011134371A1 (en) | Method for synchronizing clocks and clock synchronization device | |
CN101616163A (en) | Precise time transfer protocol message processing method and device | |
JP6805938B2 (en) | Virtual LAN time synchronization method | |
JP6045950B2 (en) | Communication control device and communication system | |
JP2010177752A (en) | Network communication node | |
JP6555445B1 (en) | Time synchronization system, time master, management master, and time synchronization method | |
EP2198567B1 (en) | Method for switching from a distributed principle to a master-slave principle in a network | |
CN113572561A (en) | Method, apparatus, communication system and medium for clock synchronization | |
CN100423514C (en) | Data synchronization method in distributed equipment according to address resolution protocol | |
WO2012152124A1 (en) | Externally connected temporal port changeover method and device | |
US20080304521A1 (en) | Internal signaling method to support clock synchronization of nodes connected via a wireless local area network | |
JP2018207352A (en) | Network connection method | |
CN111817939A (en) | Master station redundancy implementation system and method based on industrial Ethernet protocol | |
JP2018082278A (en) | Network system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191213 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20201028 |
|
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: 20201104 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201117 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6805938 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |