1. Field of the Invention
Embodiments of the present invention generally relate to improving the time-offset accuracy between the transmitter and receiver paths over data networks and, more specifically, to network time protocol precision timestamping service.
2. Description of the Related Art
In many communications applications, each element in a network has its own internal clock running independently of the other clocks in the network. Where the networks are synchronous networks, such as in many telecommunications applications and in high speed wide area networks, these clocks must be synchronized to the server. In legacy telecommunications networks, network elements utilized “TDM” links, such as T1 and SONET, which are inherently capable of carrying timing information from server to client at the physical layer. However, it is generally agreed that next generation networks will be based on a packet-switched infrastructure and, therefore, packet-based methods for transporting timing information will be used. One of the methods for synchronizing clocks in packet-switched data networks is Network Time Protocol (NTP).
Commercial NTP servers typically employ highly accurate hardware based clocks, which are disciplined to the external standards. In turn, NTP clients send carefully crafted packets to NTP servers and analyze their replies in order to determine the offset of the client clock relative to the server clock. A typical packet contains four timestamps. The timestamps are designed to precisely time the transmit and receive paths of the client/server time packet interchange so that the roundtrip delay between the endpoints and the offset of the client clock may be calculated. However, despite the high accuracy of the hardware based clock at the NTP server, if there are any inaccuracies associated with the timestamping function in the NTP server, the NTP server introduces errors into the timestamps provided to the client. Subsequently, these errors propagate to the client clock and compromise proper correction of the client clock.
Most of the inaccuracies within the timestamps created by the NTP server are introduced by various layers of software, including device drivers, network stacks, and the increasing use of non-real-time operating systems. This is illustrated in
As illustrated in
A similar situation occurs for an outgoing packet 104 leaving the NTP system 100. The NTP application 140 reads current time value from the hardware clock 150 and inserts that value as a timestamp in the appropriate field within the outgoing packet 104 (such a timestamp is referred to herein as a “transmit timestamp”). After the transmit timestamp is inserted, the NTP application 140 launches the outgoing packet 104 on a path shown by arrows 134, 124, and 114. Again, since the outgoing packet 104 must first traverse the O/S services 130, the Ethernet MAC 120, and the Ethernet PHY 110, there is a delay, with a significant random component, between the instant when the transmit timestamp was obtained from the hardware clock 150 and the actual time-of-departure from the NTP system 100. Consequently, inaccurate receive and transmit timestamps propagate from the NTP system 100 to the client clock and set the baseline error for time keeping and rate keeping at the client clock.
As the foregoing illustrates, what is needed in the art is an improved NTP timestamping method which could provide more precise and stable measurement of the transition of the NTP packets.
One embodiment of the present invention sets forth a method packet for establishing a transmit timestamp to be inserted into an outgoing packet by a network time protocol (NTP) server. The method includes the steps of requesting current time from a hardware clock within the NTP server, and requesting a correction term from a latency estimator filter (LEF), where the correction term is an estimate of a transmission latency associated with the outgoing packet traversing various layers of software before crossing a boundary with external environment. The method also includes the steps of inserting a sum of the current time and the correction term into the outgoing packet as the transmit timestamp, placing the outgoing packet with the transmit timestamp on an outbound queue, triggering the hardware clock to latch a time-of-departure of the outgoing packet, performing steps of an LEF algorithm to update the correction term by calculating an offset between the transmit timestamp and the latched time-of-departure to obtain more accurate transmit timestamp in the next outgoing packet, storing the updated correction term, and using the updated correction term to insert the transmit timestamp into a next outgoing packet.
One advantage of the disclosed systems and methods is that improved control of the timestamping function may be implemented in the existing NTP servers without the risk of introducing interworking incompatibilities with other servers and clients that are compliant with the current NTP standards. Importantly, the disclosed methods include steps that utilize the packet timestamping engine and the latency estimator filter in a manner that retains compatibility with the current NTP standards. In this fashion, the time-of-arrival and time-of-departure are detected and registered by hardware, thereby achieving high degree of precision, and the uncertainty associated with the device drivers, network stacks, operating system, and so on is avoided. As a result, more accurate and stable NTP server timestamps are provided to the NTP client.
So that the manner in which the above recited features of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this invention and are therefore not to be considered limiting of its scope, for the invention may admit to other equally effective embodiments.
where φ(t) is a function that describes the skew accumulation rate of the client clock and α is a measure of uncertainty of the precision NTP server time measurement.
Since the precision NTP server is primarily responsible for providing T2 and T3 to the client clock 210, any inaccuracy in the values of T2 and T3 contribute to inaccuracies in the delay and offset estimates, which, in turn, result in an increased value of uncertainty in the time measurement process α. However, equation (3) demonstrates that the precision NTP server can also improve the performance of the time measurement circuit by reducing uncertainty in the time measurement process α. The system and method for achieving more accurate and stable time measurements from the precision NTP server are described in
Importantly, the PTS system 300 further includes a passive tap unit 316 and a latency estimator filter (LEF) 360. The passive tap unit 316 is a packet timestamping engine configured to monitor the network traffic flowing through the MII channel. As each packet goes by, the passive tap unit 316 analyzes the data flowing through the MII channel to determine if the incoming packet 302 is of interest to the NTP application 340 (i.e., if the incoming packet 302 is an NTP packet). If this is the case, the passive tap unit 316 is configured to trigger the hardware clock 350 to latch (i.e., temporarily record) the time-of-arrival, Trx, as shown with an arrow 319. Similarly, if the passive tap unit 316 detects the outgoing packet 304 created by the NTP application 340, the passive tap unit 316 triggers the hardware clock 350 to latch the time-of-departure, Ttx, as shown with an arrow 318. The functionality of a packet timestamping engine such as the passive tap unit 316 that includes monitoring the network traffic flowing through the MII channel and triggering a time latch at the hardware clock 350 may be implemented either in hardware or software. An example of a hardware implementation may be found in U.S. Pat. No. 6,985,499, filed Apr. 17, 2001, and entitled “Precise Network Time Transfer,” which is incorporated herein by reference. Persons skilled in the art will recognize that, in different embodiments, the passive tap 316 and the hardware clock 350 may be disposed on/in the same module or on/in different modules.
The LEF 360 is configured to obtain the latched time-of-departure, Ttx, from the hardware clock 350 and implement methods steps described in
The method begins in step 402, where the PTS system 300 initializes the LEF 360 by setting the elements in the array of transmission latencies to zero. In alternative embodiments, the elements in the array of transmission latencies may be set to some other pre-determined values. In step 404, the passive tap unit 316 determines if there is a new incoming packet 302 that is an NTP packet. If there is no new NTP packet, then the method proceeds to step 405 where PTS system 300 waits until the next packet arrives. From step 405 the method returns to step 404.
If, in step 404, the passive tap unit 316 determines that a new incoming packet 302 is an NTP packet, then the method proceeds to step 406, where the passive tap unit 316 triggers the hardware clock 350 to latch the time-of-arrival Trx. As the incoming packet 302 traverses the Ethernet MAC 320 and the O/S services 330, the method proceeds to step 408 where the incoming packet 302 is received at the NTP application 340. Once the NTP application 340 recognizes that the incoming packet 302 has arrived, the method proceeds to step 410, where the NTP application 340 requests the latched time-of-arrival, Trx, from the hardware clock 350, as shown in
In step 414, the NTP application 340 creates a reply packet for the incoming packet 302. As the reply packet has not yet been transmitted, no corresponding transmit information is available from the hardware clock 350. In step 416, the NTP application 340 requests the current time, Tcurrent, from the hardware clock 350, as shown in
In step 422, the NTP application 340 places the reply packet with the timestamp T3 on the outbound queue as the outgoing packet 304. As the outgoing packet 304 traverses the O/S services 330, the Ethernet MAC 320, and is detected by the passive tap unit 316, the method proceeds to step 424. In step 424, the passive tap unit 316 triggers the hardware clock 350 to latch the actual time-of-departure Ttx. The method then proceeds to step 426, where the hardware clock 350 supplies the value of the actual time-of-departure, Ttx, to the LEF 360, as shown in
The LEF 360 is designed to smooth jitter in correction term update. This is accomplished by maintaining a small array of transmission latencies with the newest entry forcing the oldest entry out of the array. The array may be denoted as {μi, μi-1, μi-2, . . . , μi-N}, where N+1 is the number of elements in the array. In one embodiment, the array may contain only 2 elements, in which case N is equal to 1.
The method begins in step 502, where, as described in step 402 of
If, in step 504, the LEF 360 determines that there is a new timestamp T3 (as shown in
In step 510, the LEF 360 executes the steps of an LEF algorithm to sort the array of transmission latencies and chose the minimum value as the next value of the correction term k. In one embodiment, using the variables defined above, the LEF algorithm of step 510 is as follows:
As a result of executing the steps of the LEF algorithm, in step 512, the LEF 360 produces an updated value for the correction term k, which represents an estimate of the transmission latency through the precision NTP server. The updated correction term k is stored and subsequently used in calculating the next transmit timestamp T3 for the reply packet, as described in
The present invention enables a precision NTP server to
One advantage of the disclosed systems and methods is that significantly better control of the timestamping function may be implemented in the existing NTP servers without the risk of introducing interworking incompatibilities with other servers and clients that are compliant with the current NTP standards. The disclosed precision timestamping service (PTS) system includes a packet timestamping engine implemented in hardware and configured to recognize NTP packets. The disclosed PTS system further includes a latency estimator filter configured to calculate an estimate of the transmission latency through various layers of software in NTP servers. Importantly, the disclosed methods include steps that utilize the packet timestamping engine and the latency estimator filter in a manner that retains compatibility with the current NTP standards. In this fashion, the time-of-arrival and time-of-departure are detected and registered by hardware, thereby achieving high degree of precision, and the uncertainty associated with the device drivers, network stacks, operating system, and so on is avoided. As a result, more accurate and stable NTP server timestamps are provided to the NTP clients.
One embodiment of the present invention is implemented as a program product for use with a computer system. The program(s) of the program product defines functions of the embodiments (including the methods described herein) and can be contained on a variety of computer-readable storage media. Illustrative computer-readable storage media include, but are not limited to: (i) non-writable storage media (e.g., read-only memory devices within a computer such as CD-ROM disks readable by a CD-ROM drive) on which information is permanently stored; (ii) writable storage media (e.g., floppy disks within a diskette drive or hard-disk drive) on which alterable information is stored. Such computer-readable storage media, when carrying computer-readable instructions that direct the functions of the present invention, are embodiments of the present invention.
Other media include communications media through which information is conveyed to a computer, such as through a computer or telephone network, including wireless communications networks. The latter embodiment specifically includes transmitting information to/from the Internet and other networks. Such communications media, when carrying computer-readable instructions that direct the functions of the present invention, are embodiments of the present invention.
While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof.
Number | Name | Date | Kind |
---|---|---|---|
4673979 | Kobo et al. | Jun 1987 | A |
6535057 | Chakravarthy | Mar 2003 | B2 |
6985499 | Elliot | Jan 2006 | B2 |
7603137 | Elliott | Oct 2009 | B1 |
20040008661 | Myles et al. | Jan 2004 | A1 |
20040062278 | Hadzic et al. | Apr 2004 | A1 |
20050125150 | Wang | Jun 2005 | A1 |
20050160272 | Teppler | Jul 2005 | A1 |
20050190797 | Elliot | Sep 2005 | A1 |
20050207387 | Middleton et al. | Sep 2005 | A1 |
20060056377 | Wu et al. | Mar 2006 | A1 |
20060072694 | Dai et al. | Apr 2006 | A1 |
20070223477 | Eidson | Sep 2007 | A1 |
Entry |
---|
S. Johannessen, “Time synchronization in a local area network,” Control Systems Magazine, IEEE, vol. 24, No. 2, pp. 61-69, 2004. [Online]. Available: http://dx.doi.org/10.1109/MCS.2004.1275432. |
Johannessen, S.; , “Time synchronization in a local area network,” Control Systems, IEEE , vol. 24, No. 2, pp. 61-69, Apr. 2004. |
Johannessen, S. “Time Synchronization in a Local Area Network”, Control Systems Magazine, IEEE vol. 24, Issue2, Apr. 2004 pp. 61-69. |
English Translation of Chinese Office Action, Chinese Patent Application No. 200780018257.8, dated Oct. 12, 2010. |
English Translation of Second Chinese Office Action. Chinese Patent Application 200780018257.8, dated Aug. 17, 2011. |
Number | Date | Country | |
---|---|---|---|
20070268938 A1 | Nov 2007 | US |
Number | Date | Country | |
---|---|---|---|
60802023 | May 2006 | US |