Node device

There is provided a node device having a plurality of transmission lines, included in a network, the node device including a first clock extracting section configured to extract a clock from a first packet used for synchronization of a clock in the node device, the first packet being received from the network through the transmission line, a second clock extracting section configured to extract a clock from a signal received from the network through the transmission line, and a clock selector to select a clock out of the clock extracted by the first clock extracting section and the clock extracted by the second clock extracting section, wherein the clock selected by the clock selector is used for synchronization of a clock in the node device.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2009-296733, filed on Dec. 28, 2009, the entire contents of which are incorporated herein by reference.

FIELD

The embodiments discussed herein are related to a node device included in a network.

BACKGROUND

As typical techniques for attaining synchronization in a LAN network, for example, such as Ethernet or the like, a method (hereinafter, referred to as a Sync-E (Synchronous Ethernet)) which is provided in ITU-T G. 8261 and is of the type that synchronization is attained using a clock which is extracted from a transmission line and a method (hereinafter, referred to as PTP (Precision Time Protocol)) which is provided in IEEE 1588 and is of the type that synchronization is attained by setting time on a packet-by-packet basis are proposed.

FIG. 1is a diagram illustrating an example of a configuration of a network which is configured to attain clock-synchronization by the Sync-E method. In the above mentioned clock-synchronization, a master clock10, for example, such as, a GPS (Global Positioning System) clock is supplied to a node N1and the node N1synchronizes a synchronous signal (such as a 2-MHz or 2-Mbps signal) used to generate a clock with the master clock10. Each of nodes N2and N4arranged adjacent to the node N1extracts a clock from a transmission line through which it is connected with the node N1to attain synchronization. In realizing synchronization in the above mentioned manner, each of the nodes N2and N4sends clock quality information to another node and receives the clock quality information from another node using an ESMC (Ethernet Synchronization Messaging Channel) packet for transmission of the clock quality. Likewise, a node N3extracts clocks from transmission lines through which it is connected with the adjacent nodes N2and N4. In the above mentioned case, the node N3selects one of the clocks sent from the node N2and the node N4in accordance with the grade of priority which is determined by taking the clock quality into consideration and defines the selected clock as a device clock.

FIG. 2is a block diagram illustrating an example of a Sync-E correspondence node device (a node device configured to attain synchronization by the Sync-E method). Each of receiving interfaces11ato11cextracts a clock and an ESMC packet from a signal which has been received from a transmission line by using a clock recovering function of each PHY section and the reception clocks and the ESMC packets which have been extracted using the respective receiving interfaces11ato11care collected and sent to a clock functioning section12. An SSM (Synchronization Status Message) which is quality information is extracted from each ESMC packet by using a Sync-E processor13included in the clock functioning section12, the SSM of high quality is selected from within the extracted SSMs by using an SSM selector14, and a reception clock corresponding to the high-quality SSM is selected from within the reception clocks by using a selector15. The selected clock is subjected to clock-synchronization using a PLL (Phase locked loop)16and is distributed to respective PHY sections of transmitting interfaces19ato19cby using a clock distributing section17. In the above mentioned case, it may become possible to maintain an operating frequency by operating a holdover circuit18which is configured to maintain a clock frequency simultaneously with clock distribution even when any clock is not received.

FIG. 3is a diagram illustrating an example of a configuration of a network which is configured to attain clock-synchronization by the PTP method. In the PTP method, such a time-synchronizing method is adopted that the time on the side of a master is used as a reference and the time on the side of a slave is set to the reference time. A delay in transmission generated between the master and the slave is also calculated and corrected to realize accurate time-based synchronization.

First, a node N11receives time information from a grand master clock20(such as a GPS clock or the like) which is a source of a time with which a time of another node is synchronized in the PTP method to attain time-synchronization. The node N11sends a PTP packet to each of nodes N12and N14. As a result, the nodes N12and N14are time-synchronized with the node N11. Then, the nodes N12and N14send PTP packets to a node N13. The node N13selects one of the nodes N12and N14using a best master clock algorithm (for example, the node N12is selected). As a result, the node N13is time-synchronized with the node N12and time-synchronization of all the nodes is attained.

FIG. 4is a block diagram illustrating an example of a configuration of a PTP correspondence node device (a node device configured to attain synchronization by the PTP method). Receiving interfaces21ato21crespectively detect PTP packets to generate reception times and send the reception time information and the PTP packets to a PTP reception processor23which is included in a clock functioning section22and performs a protocol analyzing process on the PTP packets. The PTP packets which have been subjected to reception processing using the PTP reception processor23are sent to a best master clock algorithm section24and the packet of highest quality is selected from within the PTP packets by using the master clock algorithm section24and the time of an in-device clock25is set to a reception time at which the selected PTP packet has been received. A PTP clock extracting section27obtains a difference in time information between PTP packets which are sent thereto at a fixed time and feedbacks information on the obtained difference to the in-device clock25included therein to output a clock which is in synchronization with the clock of a source from which the PTP packet concerned has been sent. Then, a PTP packet to be sent is generated by using a PTP transmission processor26on the basis of time information from the in-device clock25having the time of which has been set in the above mentioned manner. A PTP packet is sent from the PTP transmission processor26and is inserted into respective transmitting interfaces29ato29cand a time stamp is embedded in the packet as a transmission time.

Incidentally, NTP (Network Time Protocol) which is provided in RFC1305and is supplied from a terminal30to the in-device clock25indicates a time-synchronization method which is performed on the basis of the NTP and is lower in accuracy than the time-synchronization attained the PTP method as a backup time-synchronization method which will be used in the case where utilization of a PTP packet is difficult.

Incidentally, a technique for selectively switching and outputting a plurality of clock signals including clock signals which have been received and extracted using a sending/receiving section and clock signals which have been sent from external clock signal sources using a clock switching section on the basis of quality information which is transferred together with each clock signal is proposed as disclosed, for example, in Japanese Laid-open Patent Publication No. 2000-68966.

SUMMARY

According to an aspect of the embodiment, there is provided a node device having a plurality of transmission lines, included in a network, the node device including a first clock extracting section configured to extract a clock from a first packet used for synchronization of a clock in the node device, the first packet being received from the network through the transmission line, a second clock extracting section configured to extract a clock from a signal received from the network through the transmission line, and a clock selector to select a clock out of the clock extracted by the first clock extracting section and the clock extracted by the second clock extracting section, wherein the clock selected by the clock selector is used for synchronization of a clock in the node device.

DESCRIPTION OF EMBODIMENTS

In order to realize clock-synchronization among node devices having the Sync-E function to extract a clock signal from a transmission line in a network, it may be desirable that all the node devices included in the network have the Sync-E function. The reason therefore lies in that in the case where a Sync-E non-correspondence node N4a(a node N4ahaving no Sync-E function) is present in the network as illustrated inFIG. 5, it may become difficult to extract a clock signal from a transmission line.

In the example illustrated inFIG. 5, in a normal state, clock synchronization may be attained with clocks which have been extracted from transmission lines along the route from a master clock10, through nodes N1and N2, to a node N3using the Sync-E function. The node N1is synchronized with the node N2with a transmission line clock which is extracted from a transmission line Sync-E (1) and the node N2is synchronized with the node N3with a transmission line clock which is extracted from a transmission line Sync-E (2). In the above mentioned situation, in the case where a fault (for example, disconnection of the transmission line or the like) has occurred in the transmission line Sync-E (1) between the nodes N1and N2, it may become difficult for the node N2to extract a clock which is sent from the node N1. In addition, it may become also difficult for the node N2to select a transmission line clock sent from the node N3under the influence of a timing loop preventing function of the Sync-E function. The above mentioned timing loop preventing function is a function for forcibly making it difficult to select a clock concerned by bringing an SSM (Synchronization Status Message) into a DNU (Do Not Use) state in a direction in which the clock is to be selected. That is, when this function works, it may become difficult for the node N2to attain clock-synchronization and the node N2may enter a holdover state. Therefore, the node N3is pulled out of synchronization which is performed on the basis of the master clock10.

That is, the network illustrated inFIG. 5may become unsuitable to cope with a fault as mentioned above from the viewpoint of its function serving as a synchronous network. In addition, even in the case where a function of extracting a clock from a packet which is sent through a PTP (Precision Time Protocol) type transmission line is given to the above mentioned network in addition to the function of extracting a clock from a transmission line, such a case generates that it may be difficult to handle the clock quality of a clock obtained from the PTP type transmission line directly as the clock quality of a clock obtained from a Sync-E type transmission line.

In addition, under present conditions, an internal oscillator used to count up the time in the device is installed independently of a device clock used for signal processing and hence an error will generate between devices with time. In the case where time-synchronization is attained by the PTP method, the time of a master device matches with the time of a slave device at a moment that time-synchronization has been attained. However, it may be unavoidable that an error generates between them with time after that.

Next, preferred embodiments will be described with reference to the accompanying drawings.

First Embodiment

Network Configuration

FIG. 6is a diagram illustrating an example of a configuration of an embodiment of a network which is configured to attain clock synchronization by both of the Sync-E method and the PTP method. InFIG. 6, an example of a ring-type network is illustrated. However, the configuration of the network is not limited to the ring-type one and the network may be in the form of a mesh. In the example illustrated inFIG. 6, nodes N21, N22and N23are Sync-E and PTP correspondence node devices and a node N24is a Sync-E non-correspondence and PTP non-correspondence node device.

Each of the nodes N21, N22and N23is allowed to register clock sources including clocks which may be selected to be used for synchronization and to select the clock of highest quality from within clocks obtained from the registered clock sources to be used as a device clock. A send clock is generated using the device clock. In the embodiment illustrated inFIG. 6, two clock sources which may be selected as sources of clocks are prepared. Even in the case where three or more clock sources are prepared, the same operation as the above may be performed.

In addition, the quality of a master clock signal40is defined as PRC (Primary Reference Clock). That is, the SSM value thereof is set to “0x02” (0x is hexadecimal). The quality of an internal clock (Internal) is defined as SEC (SDH Equipment Clock) and the SSM value thereof is set to “0x0B”. With respect to the quality of a clock obtained from a PTP packet, PTP parameters and clock classes which are defined in IEEE 1588 illustrated inFIG. 7are used and a clock acquired from the master clock40belongs the clockClass6(decimal).

FIG. 8is a diagram illustrating an example of a list of grades of priority allocated to clock sources of respective nodes. The node N21is synchronized with the master clock40by selecting only a clock from the master clock40as a case list element. As a backup clock, an internal clock obtained from an internal oscillator is registered. For the node N22, transmission lines Sync-E (1) and Sync-E (4) are registered as case list elements and the priority grade1is allocated to the transmission line Sync-E (1) and the priority grade2is allocated to the transmission line Sync-E (4).

For the node N23, the priority grade1is allocated to a transmission line Sync-E (2) and the priority grade2is allocated to a transmission line PTP (3) and these lines are registered as case list elements. The node N24is a Sync-E non-correspondence and PTP non-correspondence device and hence it may be difficult for the node N23to send a packet signal which is in a clock-synchronized state. However, it may be possible for the node N23to transmit a PTP packet through the transmission line PTP (3) by setting the line via VLAN or the like.

Each node compares the transmission lines to which the priority grade1and the priority grade2are allocated with each other to judge as to which line is to be selected firstly depending on which line is higher than the other line in terms of the quality and secondarily depending on which line is higher than the other line in terms of the priority grade in the case where these lines are the same as each other in the quality and determines one clock source on the basis of the above judgment.

The master clock40and the internal clock are registered as clock sources of the node N21. In comparing these clocks with each other in terms of the quality, the SSM value of the master clock40is “0x02” and the SSM value of the internal clock is “0x0B”, that is, the quality of the master clock40is higher than that of the internal clock. Thus, the node N21selects the master clock40. The node N21sends an ESMC packet including the SSM of the value “0x02” which indicates the clock quality of the master clock40onto the transmission line Sync-E (1).

The node N22compares the transmission line Sync-E (1) with the transmission line Sync-E (4) in terms of the clock quality. The quality of the clock on the transmission line Sync-E (1) indicates the quality of the clock from the Node N21and the quality of the clock on the transmission line Sync-E (4) indicates the quality of the clock from the node N23.

The node N23compares the transmission line Sync-E (2) with the transmission line PTP (3) in terms of the clock quality. The quality of the clock on the transmission line Sync-E (2) indicates the quality of the clock from the Node N22and the quality of the clock on the transmission line PTP (3) indicates the quality of the clock from the node N21. Incidentally, although the quality of the clock on the transmission line PTP (3) is determined in accordance with respective parameters defined in IEEE 1588, the definition of the quality of the clock on the transmission line PTP section is different from that of the SSM. Thus, in the node N23, the definition of the quality of the clock determined by the PTP method is converted to that of the quality indicated by the SSM and then the quality of the clock on the transmission line Synch-E (2) is compared with that of the clock on the transmission line PTP (3). Respective nodes compare the qualities of respective clocks with each other independently of one another to select their clock sources.

FIG. 9is a block diagram illustrating an example of a configuration of a node device which will serve as each of nodes N21, N22and N23according to a first embodiment. The node device includes receiving interfaces41ato41c, a clock functioning section42, and transmitting interfaces43ato43c.

In each of the receiving interfaces41ato41c, a PHY section45terminates a physical layer of a receive signal. A MAC section46controls a MAC layer. An NP (Network Processor) section47controls a packet. A PTP detection processor48detects a PTP packet and has a function of generating a reception time in order to realize PTP type synchronization. In addition, the PHY section45extracts a clock from a signal which has been received from a transmission line using a clock recovering function clock and extracts an ESMC packet in order to realize Sync-E type synchronization.

In each of transmitting interfaces43ato43c, an NP section51controls a packet. A MAC section52controls a MAC layer. A PHY section53controls a physical layer. In the case where a packet is to be sent, a PTP packet insertion processor54generates a time stamp of a transmission time and embeds the stamp in the PTP packet.

A clock functioning section42is mainly classified into a PTP function processor and a Synch-E function processor. In the PTP function processor, a PTP reception processor56performs receive processing on a PTP packet and periodically monitors for reception of each PTP packet. A best master clock algorithm section57selects the receive PTP packet of highest quality and sets the time of an in-device clock58to a reception time at which the receive PTP packet so selected has been received. The in-device clock58counts the time with a clock supplied thereto. A PTP clock extracting section59obtains a difference between pieces of time information of PTP packets which are sent thereto periodically and feedbacks difference information so obtained to a device clock included in the PTP clock extracting section59. Owing to the above mentioned operations, a clock which is in synchronization with a clock of a source from which the PTP packet concerned is sent is generated. A PTP transmission processor60performs send processing on the PTP packet.

In addition, in order to switch from PTP type communication to Sync-E type communication, the best master clock algorithm section57extracts PTP clock quality information (a PTP clock class) from the received PTP packet of highest quality so selected. The extracted PTP clock quality information is converted to an SSM value (a value indicating the clock quality in terms of the SSM) using an SSM converter67and is supplied to an SSM selector62.

In the Sync-E function processor, a Sync-E processor61receives reception clocks which are supplied from the receiving interfaces41ato41cand processes ESMC packets which are supplied from the receiving interfaces41ato41cto extract each SSM which is quality information from each ESMC packet. An SSM selector62generates select information used to select a port of higher quality on the basis of the SSM so extracted using the Sync-E processor61and the SSM value so converted using the SSM converter67.

A CLK selector63selects one of the reception clock sent from the Sync-E processor61and the PTP clock sent from the PTP clock extracting section59on the basis of the select information sent from the SSM selector62. A PLL64synchronizes a clock of a built-in oscillator with the selected clock and supplies the selected clock to a clock distributing section65as a device clock. The clock distributing section65distributes the clock to each of the transmitting interfaces43ato43cand also to the in-device clock58via a selector68. In the case where selection of all the reception clocks may be difficult, a holdover section66supplies each clock sent from the clock distributing section65to the CLK selector63and also to the in-device clock58via the selector68in order to maintain the clock in a state in which it is ready to be used as a device clock. The selector68selects the clock sent from the clock distributing section65in a normal state or selects the clock sent from the holdover section66in a holdover state and supplies the selected clock to the in-device clock58.

PTP Packet

Next, a PTP packet will be described with reference toFIGS. 10 to 12.FIG. 10is a diagram illustrating an example of formats of PTP frames of a PTP packet. As the PTP frames, Preamble/SFD, Address of Destination, Address of Send Source, Type (=0x88F7), PTP Packet and FCS are registered.

FIG. 11is a diagram illustrating an example of a common header which is used commonly by PTP packets. “transportSpecific” is used in low layers such as UDP and IP layers. “messageType” indicates the type (Sync, Delay_req or the like) of a message of each PTP packet. “versionPTP” indicates the version of each PTP packet and exhibits a value that a source device has.

“messageLength” indicates the total number of octets included in a PTP message. “domainNumber” indicates the domain to which the PTP message belongs. “flagFiled” indicates the property included in the message by putting up a flag concerned. “correctionField” is used for time setting performed in units of nanoseconds [nsec]. “sourcePortIdentity” indicates the ID of a port of a source. “sequenceId” indicates the ID of a sequence of the message. The value (for example, 0x00 for a Sync type message) of “controlField” is determined in accordance with the type of the message concerned. “logMessageInterval” indicates an interval between respective messages. “reserved” indicates that the column concerned is not currently used and is retained for future expansion.

FIG. 12Ais a diagram illustrating an example of the formats of a “Sync” message and a delay request message. The common header inFIG. 11enters “Common message header” and a time value on the source side enters “origin Timestamp”.

FIG. 12Bis a diagram illustrating an example of the format of a “Follow_up” message. The common header inFIG. 11enters “Common message header” and the time value on the source side enters “origin Timestamp”. The value of “origin Timestamp” which is included in the sent “Sync” message enters “preciseOrigin Timestamp”.

FIG. 12Cis a diagram illustrating an example of the format of a “Delay_Resp” message. The common header inFIG. 11enters “Common message header” and the time value on the source side enters “origin Timestamp”. A value of time at which the Delay_Req message has been received enters “receive Timestamp” and a value of “sourcePortIdentity” included in the received “Delay-Req” message enters “requestingPortIdentity”. Incidentally, the time stamp value of each message is expressed using ten octets.

FIG. 12Dis a diagram illustrating an example of the format of an “Announce” message. The common header inFIG. 11enters “Common message header” and the time value on the source side enters “origin Timestamp”. An offset time between TAI (International Atomic Times) and UTC (Coordinated Universal Time) enters “currentUtcOffset”. An attribute value of “clockPriority1” of a grand master clock which is used in “Best Master Clock Algorithm” and exhibits an integral value from 0 to 255 enters “grandmasterPriority1”.

An attribute value of “clockQuality” of the grand master clock enters “gransmasterClockQuality”. The attribute value of “clockQuality” indicates the traceability counted from the grand master clock and includes “clockClass” which exhibits an integral value from 0 to 255, “clockAccuracy” which indicates the accuracy of time and exhibits a hexadecimal two-digit value, and “offsetScaledLogVariance” which indicates the stability of time and is calculated with an Alan deviation.

In addition, an attribute value of “clockProperty2” of the grand master clock which exhibits an integral value from 0 to 255 enters “gransmasterPriority2”. An attribute value of “clockIndetity” of the grand master clock which is an eight-byte value used in the best master clock algorithm enters “gransmasterIdentity”. A via value counted between the grand master clock and a local clock (a value counted in the case where the grand master clock is sent to a node having a local clock to be synchronized with the grand master clock via another node) enters “stepsRemoved”. A time source (an atomic clock, a GPS, a PTP packet or the like) of the grand master clock enters “timeSource”.

A PTP type time-synchronizing method will be described with reference toFIG. 13. In PTP type time-synchronization, a master and a slave are present. In the case where a situation in which communication is performed between the nodes N21and N22inFIG. 6is considered, the node N21serves as the master and the node N22serves as the slave. In the example illustrated inFIG. 13, a “Sync” message is sent from the master side to the slave side at a time t1. A reception time at which the slave side receives the “Sync” message is defined as t2. The slave side may find the value of t1from the “Sync” message or a “Follow_Up” message which includes the transmission time t1at which the “Sync” message has been sent. A difference between the master and the slave in time which includes a delay in communication directed from the master to the slave may be obtained by subtracting the time t1from the time t2. The obtained value is defined as an offset value.

Next, the slave sends a “Delay_Req” message to the master at a time t3. A reception time at which the “Delay_Reg” message has been received on the master side is defined as t4. The master which has received the “Delay_Req” message sends the slave a “Delay_Resp” message including the time t4. The slave may find the value of the time t4by receiving the “Delay_Resp” message. In addition, a difference between the master and the slave in time which includes a delay in communication directed from the slave to the master may be found by subtracting the time t3from the time t4. The slave measures a transmission line delay using the values of the times t1, t2, t3and t4and then time-synchronization is performed on the slave side on the basis of the time on the master side.
Offset value=t2−t1
Transmission line delay=[(t2−t1)+(t4−t3)]/2
Post-synchronization slave time=Pre-synchronization slave time−Offset value+Transmission line delay

As described above, in PTP type synchronization, a value of each delay in communication directed from the master to the slave is added to a value of each delay in communication directed from the slave to the master and an average value of the added values is defined as the value of transmission line delay. In the example inFIG. 13, in the case where time-synchronization has been performed at a slave time134, the following values are obtained.
Offset value=101−120=−19
Transmission line delay=[(101−120)+(151−130)]/2=1
Post-synchronization slave time=134−(−19)+1=154

FIG. 14is a diagram illustrating an example of a flowchart of an algorithm of the best master clock algorithm section57. The algorithm illustrated inFIG. 14is taken to compare the qualities of two PTP ports (that is, receiving interfaces) A and B with each other to select one port which is superior in quality to the other port. Judgment is performed in order of parameters of an “Announce” message of a PTP packet which is defined in IEEE 1588 and in the case where the parameters concerned are not equal to each other, which one is superior to the other in quality is determined.

Step S1: Parameters “clockIdenity” are compared with each other

Step S2: Parameters “clockPriority1” are compared with each other

Step S3: Parameters “clockClass” are compared with each other

Step S4: Parameters “classAccuracy” are compared with each other

Step S5: Parameters offsetScaledLogVariance” are compared with each other

Step S6: Parameters “clockPriority2” are compared with each other

Step S7: Parameters “clockIdentity” are compared with each other.

Selecting Operation

A selecting operation performed using the node N23illustrated inFIG. 6will be described. It is assumed that the receiving interface41aand the transmitting interface43aare connected with the node N22and the receiving interface41band the transmitting interface43bare connected with the node N24. That is, the receiving interface41afunctions as a Sync-E type device and the receiving interface41boperates as a slave to a PTP correspondence node.

In the example illustrated inFIG. 9, the Sync-E processor61extracts an SSM value from an ESMC packet that the receiving interface41ahas received. The SSM value so extracted is the SSM value that the node N22sends to the node N23. The node N22is already synchronized with the node N21and hence the SSM value that the node N23receives will be changed to 0x02.

On the other hand, PTP type communication is performed using only the receiving interface40b, so that the best master clock algorithm section57selects the information sent from the receiving interface41b. That is, the in-device clock58is time-synchronized with the PTP packet sent from the receiving interface41b. The PTP clock extracting section59extracts a clock from the received PTP packet.

The best master clock algorithm section57extracts PTP clock quality information from the PTP packet which is received by the receiving interface41bwhich serves as the slave to the PTP correspondence node as described above and the extracted PTP clock quality information is converted to an SSM value using the SSM converter67. Each SSM value so converted indicates each PTP clock quality expressed in the format of the SSM.

The SSM converter67includes a table in which PTP clock qualities and SSM values are registered in one-to-one correspondence as illustrated inFIG. 15. In the example illustrated inFIG. 15, a clock of PTP clockClass6is registered in correspondence with the SSM value “0100” (low four bits are binary-represented), a clock of PTP clockClass13is registered in correspondence with the SSM value “1000”, clocks of PTP clockClasses52,58,187,193,248and255are registered in correspondence with the SSM value “1011”, and clocks of PTP clockClasses0to5,7,8to12,14,15to51,53to57,59to186,188to192,194to247, and249to254are registered in correspondence with the SSM value “1111”. The above mentioned correspondence relation between the PTP clock qualities and the SSM values is set by an operator. In the example illustrated inFIG. 15, the accuracy of the PTP clock is regarded to be equivalent to “SSU-A” and the SSM value thereof is defined as “0100”.

When the above clock quality of the Sync-E type clock is compared with the clock quality of the PTP type clock in terms of the SSM values, the clock quality (SSM=0x02) of the Sync-E type clock is higher in priority than the clock quality (SSM=0x04) of the PTP type clock, so that the node N23selects the clock which is obtained from the receiving interface41a, that is, the Sync-E type clock. In the above mentioned case, the SSM which is output from the transmitting interface43aenters a DNU state (SSM=0x0F) in order to avoid timing loop. Incidentally, the transmitting interface43bis a slave and hence does not send any PTP packet.

Clock synchronization is realized in order of the master clock40, the node N21, the node N22and the node N23using a transmission line clock by performing the same switching operation as the above. A clock with which the clock of each node has been synchronized is used as a device clock. The clock distributing section65converts the frequency of the device clock to an appropriate clock frequency and distributes the clock so frequency-converted to the respective transmitting interfaces43ato43C as a clock to be used in the PHY section53of each transmitting interface. The PHY section53sends a signal in synchronization with the clock. In addition, a clock to be used as a reference may be desirable in order to operate the in-device clock58and hence the clock distributing section generates a clock to be used for the in-device clock58and distributes the generated clock to the in-device clock58. Owing to the above mentioned operation, it may become possible to synchronize the time of the in-device clock58with the device clock.

Operations Performed in Occurrence of Fault

Next, a situation in which it becomes difficult to extract a clock from all of the transmission lines and PTP packets owing to occurrence of a fault will be considered. In the above mentioned situation, the device clock enters a holdover state. That is, the previous frequency is held. Likewise, the in-device clock58enters the holdover state. In this embodiment, the selector68is provided to use a holdover section66for an in-device time also as a holdover section for the device clock to realize size reduction of a circuit.

The switching operations will be performed in the following manner in the case where a fault has occurred in the transmission line Sync-E (1) between the node N21and the node N22as illustrated in the example inFIG. 16.

(1) Before a fault occurs, the node N22receives the SSM value 0x02 (PRC) from the transmission line Sync-E (1) and the SSM value “0x0F” (DNU) from the transmission line Sync-E (4).

(2) A fault (such as disconnection of the transmission line) has occurred and the node N22detects that the fault has occurred in the transmission line.

(3) The node N22judges that the transmission line Sync-E (1) is disabled.

(4) The node N22shifts to a holdover state because there is no enabled clock source and uses a holdover clock. In the above mentioned situation, the in-device clock58also uses the same holdover clock.

(5) Since the clock selected using the Node N22is in the holdover state, the SSM value to be sent is changed to 0x0B (SEC).

(6) The node N23utilizes that the SSM value of the Sync-E (2) section has been changed to 0x0B as a trigger to compare the clock quality of a clock obtained from the transmission line Sync-E (2) with the clock quality of a clock obtained from the transmission line PTP (3). The SSM value of the clock obtained from the transmission line Sync-E (2) is 0x0B and the SSM value of the clock obtained from the transmission line PTP (3) is 0x04, so that the clock obtained from the transmission line PTP (3) is higher in priority than the clock obtained from the transmission line Sync-E (2).
(7) The node N23switches the current clock source to a new one on the basis of a result obtained from the operation described in the item (6). That is, the node N23uses the transmission line PTP (3) as a new clock source.
(8) The node N23sends an ESMC packet with the SSM value set to 0x04 onto the transmission line Sync-E (4). No timing loop occurs in the transmission line Sync-E (4), so that the node N23sends the value 0x04 instead of the value 0x0F.
(9) The SSM value of the clock which is obtained from the transmission line Sync-E (4) has been changed from 0x0F to 0x04, so that it may become possible for the node N22to select the transmission line Sync-E (4). Thus, the transmission line Sync-E (4) is selected.
Periodic Monitor for PTP Packet

In the case where a fault has occurred in a PTP section as illustrated in the example inFIG. 17, it may be difficult for the node N23which is a PTP slave to directly detect the fault. In the above mentioned case, any PTP packet does not reach the node N23and hence occurrence of the fault may be indirectly detected on the slave side. It may become difficult to extract a clock from the PTP packet. In spite of the fact that the fault occurred in the PTP section leads to occurrence of a fault in clock extraction, switching of a clock source may be difficult.

In order to avoid a situation as mentioned above, the PTP reception processor56periodically monitors for reception of each PTP packet per port (that is, per receiving interface) and judges that a clock is disabled in the case where any PTP packet does not arrive for a time period longer than a fixed time period and then the SSM converter67changes the SSM value to 0x0F (DNU). When the SSM has been changed to the value indicative of the DNU state, it is judged that the clock concerned is disabled and the SSM selector62removes the clock from a list of objects to be selected. Owing to the above mentioned operations, it may become possible to normally perform clock source switching on the basis of the SSM value regardless of occurrence of a fault in a PTP clock caused by the occurrence of a fault in a transmission line which is not adjacent to the node concerned.

FIG. 18is a diagram illustrating an example of state transition occurred in each node serving as a node device. In the example illustrated inFIG. 18, it is assumed that the initial value of the monitor interval (Interval) is 0 sec, and each of the initial values of the number of PTP packet receiving operations (n), the PTP packet not-receiving frequency (no_packet), the quality degraded state (quality_down), the quality recovered state (quality_up) and the recovery (recovery) from a PTP disconnected state is 0. The example illustrated inFIG. 18indicates that, for example, in a PTP synchronized state, when “quality_down”=3, the states is shifted to the PTP quality degraded state and when “no_packet”=3, the state is shifted to the PTP disconnected state. It is also indicated that in the PTP quality degraded state, when “quality_up”=3, the state is shifted to the PTP synchronized state and when “no_packet”=3, the state is shifted to the PTP disconnected state. Likewise, in a PTP quasi-synchronized state, when “quality_up”=3, the state is shifted to the PTP synchronized state, when “quality_down”=3, the state is shifted to the PTP quality degraded state, and when “no_packet”=1, the state is shifted to the PTP disconnected state.

FIG. 19is a diagram illustrating an example of a flowchart of a process of starting to monitor for a PTP packet to be executed per port (per receiving interface) using the PTP reception processor56. At step S11, in a state in which “recovery”=0, counting of “Interval” (a predetermined term) is started. At step S12, reception of a PTP packet is waited for “Interval”. At step S13, it is judged whether the PTP packet has been received in “Interval” and in the case where it is not received, “recovery” is initialized (“recovery”=0) at step S14and the process proceeds to step S12.

In the case where the PTP packet has been received, “1” is added to “recovery” and “1” is added to “n” at step S16. Then, it is judged whether “recovery”=1 at step S16and when “recovery”≠1, the process proceeds to step S12, or when “recovery”=1, the state is shifted to the PTP quasi-synchronized state at step S17.

FIG. 20is a diagram illustrating an example of a flowchart of a process of starting a PTP quasi-synchronized state to be executed using the PTP reception processor56. At step S21, “no_packet” is initialized (“no_packet”=0) and reception of a PTP packet is waited for “Interval” at step S22. It is judged whether the PTP packet has been received in “Interval” at step S23, and when it is not received, “1” is added to “no_packet” at step S24. Then, it is judged whether “no_packet”=1 at step S25, when “no_packet”≠1, the process proceeds to step S22, or when “no_packet”=1, the state is shifted to the PTP disconnected state at step S26.

In the case where the PTP packet has been received in “Interval” at step S23, the reception time T (n) is recorded at step S27and “no_packet” is initialized (“no_packet”=0). Then, it is judged whether n=0 at step S28, and when n=0, “1” is added to “n” at step S29and the process proceeds to step S22. When n≠1, the process proceeds to step S31.

It is judged whether T(n)−T(n−1)=1±α at step S31. Here, “α” is a predetermined value indicating an error. When T(n)−T(n−1)=1±α, “1” is added to “quality_up” at step S32and “quality_down” is initialized (“quality_down”=0). Then, it is judged whether “quality_up”=3 at step S33and when “quality_up”≠3, “1” is added to “n” at step S29and the process proceeds to step S22. When “quality_up”=3, the port concerned is added to a list of case list elements and the state is shifted to the PTP synchronized state at step S34.

When T(n)−T(n−1)≠1±α at step S31, “1” is added to “quality_down” at step S35and “quality_up” is initialized (“quality_up”=0). Then, it is judged whether “quality_down”=3 at step S36and when “quality_down”≠3, “1” is added to “n” at step S29and then the process proceeds to step S22. When “quality_down”=3, the port concerned is removed from the list of case list elements and the state is shifted to the PTP quality degraded state at step S37.

FIG. 21is a diagram illustrating an example of a flowchart of a process of starting a PTP synchronized state to be executed using the PTP reception processor56. The PTP synchronized state is started at step S41and then reception of a PTP packet is waited for “Interval” at step S42. It is judged whether the PTP packet has been received in “Interval” at step S43, and when it is not received, “1” is added to “no_packet” at step S44. Then at step S45, it is judged whether “no_packet”=3, and when “no_packet”≠3, the process proceeds to step S42, or when “no_packet”=3, the port concerned is removed from the list of case list elements and the state is shifted to the PTP disconnected state at step S46.

In the case where the PTP packet has been received in “Interval” at step S43, the reception time T (n) is recorded at step S47and “no_packet” is initialized (“no_packet”=0). Then, it is judged whether n=0 at step S48, and when n=0, “1” is added to “n” at step S49and the process proceeds to step S42. When n≠0, the process proceeds to step S51.

It is judged whether T(n)−T(n−1)=1±α at step S51. When T(n)−T(n−1)=1±α, the “quality_down” is initialized (“quality_down”=0) at step S52, “1” is added to “n” at step S49and the process proceeds to step S42. Then, when T(n)−T(n−1)≠1±α at step S51, “1” is added to “quality_down” at step S53. Then, it is judged whether “quality_down”=3 at step S54and when “quality_down”≠3, “1” is added to “n” at step S49and the process proceeds to step S42. When “quality_down”=3, the port concerned is removed from the list of case list elements and the state is shifted to the PTP quality degraded state at step S55.

FIG. 22is a diagram illustrating an example of a process of starting a PTP quality degraded state to be executed using the PTP reception processor56. At step S61, “quality_up” is initialized (“quality_up”=0) and “quality_down” is initialized (“quality_down”=0) and reception of a PTP packet is waited for “Interval” at step S62. It is judged whether the PTP packet has been received in “Interval” at step S63. When it is not received, “1” is added to “no_packet” at step S64. Then at step S65, it is judged whether “no_packet”=3 and when “no_packet”≠3, the process proceeds to step S62or when “no_packet”=3, the state is shifted to the PTP disconnected state at step S66.

In the case where the PTP packet has been received in “Interval” at step S63, the reception time T(n) is recorded and “no_packet” is initialized (“no_packet”=0) at step S67. Then at step S68, it is judged whether n=0. When n=0, “1” is added to “n” at step S69and the process proceeds to step S62. When n≠0, the process proceeds to step S71.

It is judged whether T(n)−T(n−1)=1±α at step S71. When T(n)−T(n−1)=1±α, “1” is added to “quality_up” and “quality_down” is initialized (“quality_down”=0) at step S72. Then, it is judged whether “quality_up”=3 at step S73, and when “quality_up”≠3, “1” is added to “n” at step S69and the process proceeds to step S62. When “quality_up”=3, the port concerned is added to the list of case list elements and the state is shifted to the PTP synchronized state at step S74.

When T(n)−T(n−1)≠1±α at step S71, “1” is added to “quality_down” at step S75and “quality_up” is initialized (“quality_up”=0) at step S75. Then, it is judged whether “quality_down”=3 at step S76, and when “quality_down”≠3, “1” is added to “n” at step S69and the process proceeds to step S62. When “quality_down”=3, the port concerned is added to the list of case list of elements and the state is shifted to the PTP quality degraded state at step S77.

Other Embodiments of Table in which PTP Clock Qualities and SSM Values are Registered in One to One Correspondence

In a table in which PTP clock qualities and SSM values are registered in one to one correspondence, SSM values indicating respective PTP clock qualities may be additionally defined in the columns of “SSM description” which are registered as “Reserved” columns in the table illustrated inFIG. 15, in addition to the PTP clock qualities which are allocated to the existing SSM values as illustrated in the table inFIG. 15. An example of the table in which the PTP clock qualities and the SSM values are registered in one to one correspondence and which is obtained in the above mentioned situation is illustrated inFIG. 23.

In the example illustrated inFIG. 23, a clock of PTP clockClass6is registered in correspondence with the SSM value “0011”, a clock of PTP clockClass13is registered in correspondence with the SSM value “0101”, clocks of PTP clockClasses52and58are registered in correspondence with the SSM value “0110”, clocks of PTP clockClasses187and193″ are registered in correspondence with the SSM value “0111”, clocks of PTP clockClasses248and255are registered in correspondence with the SSM value “1001”, and clocks of PTP clockClasses0to5,7,8to12,14,15to51,53to57,59to186,188to192,194to247, and249to254are registered in correspondence with the SSM value “1111”. The above mentioned correspondence relation is set by an operator.

In addition, the relation between the SSM values and the orders of priority in the example illustrated inFIG. 23is as illustrated inFIG. 24. That is, the priority order is proportional to order in which the SSM values are registered.

Second Embodiment

FIG. 25is a block diagram illustrating an example of a configuration of a node device which will serve as the nodes N21, N22and N23according to a second embodiment. In the example inFIG. 25, the same numerals are assigned to the same parts as those inFIG. 9. In the first embodiment illustrated inFIG. 9, PTP clock extraction is performed using the PTP clock extracting section59which is disposed at the rear stage of the best master clock algorithm section57. On the other hand, in the second embodiment illustrated inFIG. 25, PTP clock extraction is performed using each of receiving interfaces41ato41c. Therefore, a PTP detection processing and clock extracting section71which is disposed in each of the receiving interfaces41ato41cis configured to detect a PTP packet, to generate a reception time for realizing PTP clock extraction and then to perform PTP clock extraction which is the same as that performed using the PTP clock extracting section59. A PTP clock which has been extracted using the PTP detection processing and clock extracting section71included in each of the receiving interfaces41ato41cis supplied to a CLK selector72included in the clock functioning section42. The CLK selector72selects one of the reception clock received from the Sync-E processor61and the PTP clock sent from the respective PTP detection processing and clock extracting sections71included in the receiving interfaces41ato41con the basis of select information sent from the SSM selector62.

In the second embodiment, clock extraction is executed in the vicinity of the PHY section45and hence clock extraction may be executed with no influence of delays and fluctuations in packet sending which would occur in the MAC section46, the NP section47and respective functional sections of the clock functioning section42which are disposed at the rear stages, so that factors for quality reduction of the reception clock may be eliminated.

Third Embodiment

FIG. 26is a block diagram illustrating an example of a node device which will serve as the nodes N21, N22and N23according to a third embodiment. In the example illustrated inFIG. 26, the same numerals are assigned to the same part as those inFIG. 9. In the first embodiment illustrated inFIG. 9, the qualities of respective clocks are compared with one another to select the reception clock of highest quality from within the clocks so compared. On the other hand, in the third embodiment illustrated inFIG. 26, the priority is set in advance at each port of each of the receiving interfaces41ato41cand a reception clock is selected in accordance with the priority of each port.

In the example illustrated inFIG. 26, reception clocks which have been extracted using the PHY sections45in the receiving interfaces41ato41care supplied to a Sync-E processing and clock disconnection detecting section81included in the clock functioning section42. The Sync-E processing and clock disconnection detecting section81receives the reception clocks supplied from the receiving interfaces41ato41cand detects disconnection of each reception clock.

A Priority selector82generates select information used to select the clock of highest priority from within not-disconnected clocks on the basis of a signal used to detect disconnection of each clock sent from the Sync-E processing and clock disconnection detecting section81and clock disconnect information sent from a disconnect information converter85which will be described later and supplies the select information to a CLK selector83.

In addition, a PTP packet which has been detected using the PTP detection processor48in each of the receiving interfaces41ato41cis supplied to a PTP clock extracting section87included in the clock functioning section42. The PTP clock extracting section87extracts a PTP clock from the received PTP packet per port in the same manner as the PTP clock extracting section59and supplies the extracted PTP clock to the CLK selector83. PTP clock quality information of a clock source which has been selected using the best master clock algorithm section57is supplied to the disconnect information converter85and the disconnect information converter85acquires disconnection detect information from the above PTP quality information and supplies the acquired information to the Priority selector82. The CLK selector83selects one clock from within respective reception clocks supplied from the Sync-E processing and clock disconnection detecting section81and the respective PTP clocks supplied from the PTP clock extracting sections87in accordance with the select information supplied from the Priority selector82and supplies the selected clock to the PLL64.

FIG. 27is a diagram illustrating an example of a flowchart of a selecting process to be executed using the Priority selector82. As a precondition of this process, ports to be used as clock sources are designated for the Priority selector82and respective grades of priority are allocated to the designated ports. For example, a reception clock which is received by the receiving interface41aand is output from the Sync-E processing and clock disconnection detecting section81is registered into the Priority selector82as a clock of the priority1, a reception clock which is received by the receiving interface41band is output from the Sync-E processing and clock disconnection detecting section81is registered into the Priority selector82as a clock of the priority2and a reception clock which is received by the receiving interface41cand is output from the Sync-E processing and clock disconnection detecting section81is registered into the Priority selector82as a clock of the priority3.

In addition, a PTP clock which is extracted using the PTP detection processor48of the receiving interface41ais registered into the Priority selector82as a clock of the priority4. Likewise, a clock which is held in the holdover section66is registered into the Priority selector82as a clock of the priority5. The priority of a clock which is obtained when the PLL64is in a free-run state is not registered.

In the example illustrated inFIG. 27, at step S81, the PLL64is brought into the free-run state. Next, at step S82, it is judged whether an enabled clock is present and when any enabled clock is not present, the process returns to step S81. When the enabled clock is present, it is judged whether disconnection of the clock of the priority1(the reception clock which is received by the receiving interface41aand is output from the Sync-E processing and clock disconnection detecting section81) is detected at step S83. When disconnection of the clock is not detected, select information used to select the clock of the priority1is generated at step S84, changing of the state of the clock is waited at step S92and the process proceeds to step S83.

In the case where disconnection of the clock of the priority1is detected at step S83, it is judged whether disconnection of the clock of the priority2is detected at step S85. In the case where disconnection of the clock concerned is not detected, select information used to select the clock of the priority2is generated at step S86, changing of the state of the clock is waited at step S92and the process proceeds to step S83.

In the case where disconnection of the clock of the priority2is detected at step S85, it is judged whether disconnection of the clock of the priority3is detected at step S87. In the case where disconnection of the clock concerned is not detected, select information used to select the clock of the priority3is generated, changing of the state of the clock is waited at step S92and the process proceeds to step S83.

In the case where disconnection of the clock of the priority3is detected at step S87, it is judged whether disconnection of the clock of the priority4is detected at step S89. In the case where disconnection of the clock concerned is not detected, select information used to select the clock of the priority4is generated and changing of the state of the clock is waited at step S92and the process proceeds to step S83.

In the case where disconnection of the clock of the priority4is detected at step S89, select information used to select the clock of the priority5is generated at step S91, changing of the state of the clock is waited at step S92and the process proceeds to step S83.

According to each of the above mentioned embodiments, in a state in which both the Sync-E function for extracting a clock from a transmission line and a function of extracting a clock from a PTP type transmission line in which a packet is used as a transmission medium are provided, a clock which is extracted from the PTP type transmission line is handled in the same manner as clocks which are extracted from other transmission line by giving respective pieces of quality information thereto and the clock of highest quality is selected from within the above mentioned candidates for clocks on the basis of the respective pieces of quality information and the current clock is switched to the clock of the highest quality. Owing to the above mentioned operations, even when a Sync-E non-correspondence node device is present in a network or when a fault has occurred in a transmission line or one of devices included in a network, it may become possible to maintain a clock-synchronized state in the network by using the above mentioned clock extracted from the transmission line PTP in which the packet is used as the transmission medium.

Owing to the provision of the function of periodically monitoring for a PTP packet, when any PTP packet does not arrive for a time period longer than a fixed time period, it may become possible to make the decision that the quality of the clock which has been extracted from the PTP type transmission line has been degraded.

It may become also possible to maintain the accuracy in time counting with which the time of each transmission device is counted by utilizing the device clock extracted from the transmission line also in counting up of the in-device clock even when the time-synchronizing function to be performed through the PTP type transmission line is disconnected.

In addition, low power consumption and size reduction may be more effectively promoted by using the holdover section included in the transmission device commonly by the device clock and the in-device clock.