Synchronization of Network Devices Time by GPS Based Network Time Protocol Output

DOI : 10.17577/IJERTV3IS042396

Download Full-Text PDF Cite this Publication

Text Only Version

Synchronization of Network Devices Time by GPS Based Network Time Protocol Output

Ajay Rajput

Department of Electronics & Communication Engineering Lord Krishna College of Technology,

Indore, Madhya Pradesh, India

Abstract This Paper highlights the importance of time synchronization of various I.P. based network devices through GPS Clock devices. Today, time synchronization of devices in network and various industries is important in order to increase the efficiency of industries. This paper demonstrates the capability of N.T.P.(Network Time Protocol) to synchronize Ethernet compatible devices clock with respect to Universal Time Co-ordinates (UTC).

Keywords

GPS – Global Positioning System, 1P.P.S. One Pulse per second

N.T.P. Network Time Protocol,

SN.T.P. Simple Network Time Protocol,

U.D.P. User Datagram Protocol. GHz Gega-Hertz

P.T.P. Precision Time Protocol

I.P. Internet Protocol

D.C. Digital Current

R.T.C. Real Time Clock

R.F.C. Request for Comments

P.P.M. Parts per million

      1. Universal Time Coordinate

        1. INTRODUCTION

          Time is the most important parameter in industries in order to measure the productivity and efficiency of industries in their respective domains. It is important that all devices connected which are relevant to some specification applications such as telecommunications, space applications centre, power industries, nuclear and thermal power generation and distributions centres, automotive applications, internet networks and servers, railway and airports and various other numerous fields have their equipments time synchronized to global time with as much better accuracy as possible.

          Today, most of the mobile and network devices, power field, telecommunication equipments forms the basis of this technological world and they have their clock synchronized through internet networks. But, internet networks also have to synchronize their clocks with reference to some standard and very accurate clock in order to act as time server for other devices. Generally, atomic clocks are most stable and accurate clocks in universe but interfacing to this clocks is not possible with physical devices as this is very costly as well as hard to accommodate required technologies in such nano-technology world. In order to get the devices get their clock synchronized, satellite based (Global Positioning

          System) GPS technology are used in current world which are next very accurate clock to atomic clocks. Various Internet protocols have been used to record and transmit the time at which an event takes place, including the daytime protocol, time protocol, ICMP timestamp message, and IP timestamp option[2].

          Global Position System (GPS) is satellite based navigation system which provides GPS capable device accurate 3d position and time information. GPS satellites broadcast information at L1 signal of 1.57542 GHz and L2 signal of 1.2276 GHz frequency. GPS devices uses standard GPS receiver which are able to get the satellite information and decodes the information in order to find its global position in terms of latitude and longitude and current universal time information. GPS receiver requires minimum 3 satellites to calculate its position with considerable accuracy and minimum 4 satellites in order to calculate its 3dimensional position on earth with respect to satellites constellation. General use GPS receivers are capable to detect maximum 12 satellites. Advantage of maximum number of satellites traceability is for much better signal accuracy.

          GPS Clock devices are equipped with such GPS receivers to provide accurate universal time output in various time formats such as serial time outputs, IRIG-B (Inter-Range Instrumentation Group-time codes), Ethernet based (Network Time Protocol), PTP (Precision Time Protocol) format. Today, most of the devices are I.P. based devices and are equipped with N.T.P. client and N.T.P. server drivers to synchronize their devices clock.

        2. TIME SIGNAL OUTPUT

          1. One Pulse per Second (1 PPS) Output

            GPS Clock devices are capable to provide multiple time output formats. Most important output is the 1 Pulse per second signal (1P.P.S.). This pulse is transmitted at every second which is of 5V D.C. signal. The time resolution accuracy in terms of milliseconds, microseconds, nanoseconds depends on the 1P.P.S. signal. GPS clock receive this 1P.P.S. signal from GPS receiver module. GPS Clock devices synchronize their internal R.T.C. (Real time clock) on basis of the 1P.P.S. signal.

            Generally, 1P.P.S. signal can have any duty cycle depending on application requirements. Slave clock devices uses this 1P.P.S. signal output from GPS Clock device to

            synchronize their internal clock accuracy in resolution of milliseconds or microseconds or nanoseconds and gradually calibrate their clock to keep the accuracy maintain.

          2. Network Time Protocol (N.T.P.) output.

          N.T.P. protocol is Ethernet based protocol which is transmitted in application layer of I.P. protocol layer. This protocol is U.D.P. (User Datagram Protocol) based packet which means that U.D.P. protocol is connectionless protocol. Once this U.D.P. packet is transmitted, there is no acknowledgment regarding the successful transmission of the packet [3].

          N.T.P. originally existed as S.N.T.P. (Simple Network Time Protocol) which was basic in its protocol architecture. S.N.T.P. was not so strong for secure message transmission as well as the clock synchronizing algorithm of client devices was not so robust to provide higher accuracy resolution. N.T.P. or S.N.T.P. are released as internationally accepted protocol as R.F.C. (Request for Comments) standards. Latest N.T.P. version released are version 3 and version 4. N.T.P. version 3 protocol is mentioned in R.F.C.1305. standard [1]. In NTP, one or more primary servers synchronize directly to external reference sources such as timecode receivers. Secondary time servers synchronize to the primary servers and others in the synchronization subnet [2].

          GPS clock device N.T.P. output support various modes such as server/client model, broadcast mode. In, Server/client mode, GPS clock device act as N.T.P. server as it is the source of time information for other client devices which are dependent on GPS clock device. N.T.P. client devices send the N.T.P. query packet to N.T.P. server at a define periodic interval and N.T.P. server responds with the current time information. In Broadcast mode, N.T.P. server broadcast the N.T.P. frame with current time information at a pre-defined interval to all devices in network. As a result, those devices in network that are N.T.P. client enabled, grab the N.T.P. frame from server device.

          Synchronizing frequency means to adjust the clocks

          in

          the subnet to run at the same frequency, to synchronize time means to set them to agree at a particular epoch with respect to coordinated universal time (U.T.C.), as provided by national

          standards, and to synchronize clocks means to synchronize them in both frequency and time[2].

          Fig. 1. N.T.P. Packet structure

          Fig1. describes the N.T.P. Packet contents arrangement on N.T.P. layer in application layer of I.P. packet.

          Below is the description regarding the contents of N.T.P. packet:

          • LI indicates the Leap indicator, indicates to insert or delete the leap second in last minute of current month. The possible values of this are 0 (no warning), 1 (last minute has 61 seconds), 2 (last minute has 59 seconds) 3 (alarm condition- that clock has never been synchronized.

          • Mode indicates the if device is N.T.P. server or N.T.P. client.

          • Stratum are the pre-defined levels in N.T.P. standard which indicates whether device clock accuracy according to its level in network architecture.

            0 = highly accurate clock or atomic clock 1 = Primary time server (e.g. G.P.S.)

            2-255 = secondary server

          • Poll represents the polling interval which is in terms of seconds as power of 2. Its minimum value is 4 (i.e. 16 seconds) and maximum value can be 10 (i.e. 1024 seconds).

          • Precision represents the precision of the device clock which is represented in terms of seconds. This parameter represents precision of device clock.

          • Root delay represents the total roundtrip delay of packet transmission between N.T.P. server and N.T.P. client. The units are seconds.

          • Root dispersion is the maximum error of clock with respect to reference time source. It is represented in seconds.

          • Reference clock identifier is the identification of the time source according to the applicable stratum level. GPS clock device reference clock identifier is represented as GPS.

          • Reference timestamp is the time in seconds when the device synchronize its own clock.

          • Originate timestamp is represented in seconds. It represents the time when the peer device transmits its

            N.T.P. packet. It is generally the transmit timestamp of peer N.T.P. packet. It also acts as acknowledgment to mention that the last peer packet was received by device.

          • Receive timestamp is represented in seconds. This is the local time of device when the last N.T.P. packet of peer is received.

          • Transmit timestamp is represented in seconds. It is the local time when the N.T.P. packet was transmitted.

          N.T.P. timestamp is an 64 bit data with 32 bit representing the seconds of the current U.T.C. time and other 32 bit representing the fraction of seconds. NTP clock was set on since I January, 1900 and will continue to provide the timestamp till 2036 when the timestamp will get overflow from 32 bit value.

          N.T.P. protocol is the robust way of synchronizing device internal clock. GPS clock device act as N.T.P. Server device which provide accurate time outputs in UTC format. GPS clock device has very high precision clock which makes it ideal for N.T.P. server. GPS clock is able to provide accuracy in milliseconds or microseconds resolution. This resolution is obtained by calibrating its internal clock timer continuously on the basis of 1P.P.S. signal. Most of GPS device are capable to process large number of N.T.P. packets per second. Thus a single GPS clock device can act as N.T.P. server for multiple clients at a same time. GPS clock device are of stratum level 1 which means that they are next accurate clock after atomic clock.

        3. EXPERIMENTAL SETUP

          In order to test N.T.P. protocol, Windows XP and Linux based Ubuntu operating systems are used to work as N.T.P. client systems. These systems along with GPS Clock N.T.P. server is connected in same Local Area Network (LAN). There are settings available on Microsoft website which gives the procedure how to configure Windows operating systems as N.T.P. client.

          In order to make Ubuntu operating systems, it is necessary to download N.T.P. package and install N.T.P. service in ubuntu operating system. After installation is complete, there is a configuration file for N.T.P. i.e. N.T.P..conf file located in

          /etc folder of file system of ubuntu operating system. This configuration file is to be modified for setting up the N.T.P. server I.P. address configuration as per recommended method for the particular operating system.

          Thus, windows XP system and ubuntu operating system are configured with GPS clock I.P. address as N.T.P. server. Also, both operating systems are configured with polling interval at what interval will N.T.P. client devices send N.T.P. query to

          N.T.P. server for its clock synchronization.

          In order to verify the N.T.P. communication between GPS clock N.T.P. server and N.T.P. clients, packet is tested on

          wireshark tool software. This tool is able to show the I.P. related all network packets.

        4. TEST RESULTS AND OBSERVATIONS

          The Windows XP was configured as N.T.P. client devices with polling interval of 60 seconds. As a result, the Windows XP transmits the N.T.P. query packet at every 64 seconds. GPS clock N.T.P. server responds with required fields and current time in transmit timestamp parameter of N.T.P. packet. Refer Fig. 2. It is being observed that Windows XP operating systems changes its time at every poll interval as per the time in GPS clock N.T.P. response.

          Similarly, N.T.P. client in Ubuntu operating system was configured with I.P. address of GPS clock N.T.P. server with minimum poll interval of 4 (16 seconds) and maximum poll interval of 6 (64 seconds). When N.T.P. service is first started, the ubuntu operating system first queries the N.T.P. server at every 16 seconds (as per minimum poll interval). The synchronization status can be checked with command ntpq – p. At the startup of N.T.P. service in ubuntu operating system, the system forcefully adjust its internal clock with the time of GPS Clock N.T.P. response and thereafter corrects its clock frequency gradually.

          The output of this command shows the reach-ability of the

          N.T.P. server which increases from 1 to 377 (377 means

          N.T.P. server is completely reachable). It continuously adjust its system clock with every N.T.P. query-response. At every poll, it gradually corrects and adjust its system R.T.C. crystal frequency which is measured in parts per million (P.P.M.).

          N.T.P. client continuous to query the N.T.P. server till ubuntu operating system is able to stabilize its clock frequency P.P.M.. Once it is able to correct the clock frequency, the ubuntu operating system generates a drift file in /var/lib/NTP folder of system file system with the system clock drift value in units of P.P.M. and thereafter poll interval is increased to its maximum value from minimum poll interval in steps of power of 2.

          Also, the command ntpq -p output specified other parameters such as offset, roundtrip delay. Offset is the time difference in seconds between N.T.P. client and N.T.P. server at the time of N.T.P. communication. Roundtrip delay is the delay in seconds which represents the total delay of communication when N.T.P. query was send from N.T.P. client device and the time at which N.T.P. response was received at N.T.P. client. Refer Fig. 3.

          Fig. 2. N.T.P. communication of Windows XP

          Fig. 3. Ubuntu operating system N.T.P. status

        5. CONCLUSION

GPS clock device is an effective design to synchronize the network devices and internet network to accurate time with respect to universal time coordinates. N.T.P. protocol has the capability to synchronize the N.T.P. client feature enabled devices clock to the accuracy level of microseconds and also till nanoseconds resolution. As a result, if all devices clock are synchronized and are operating with same clock reference source i.e. GPS time, efficiency of the products in various industries domain can be improved as the data can be analyzed with real and correct timestamp. The penetration of NTP in the Internet has steadily increased over the last few years. It is estimated that well over 2000 hosts presently synchronize local clocks to UTC using NTP and the Internet primary servers [2]. The NTP secondary synchronization subnet presently includes

an estimated total of over 2000 secondary time servers using some thousands of transmission paths on hundreds of networks [2].

REFERENCES

  1. NTPv3 standard RFC1305

  2. David L. Mills, Internet Time Synchronization: The Network Time Protocol, IEEE member Vol. 39, No. 10, October 1991

  3. UDP standard RFC78

  4. www.ntp.org NTP organization website

  5. Sun-Mi Jun, Dong Hui Yu, Young-Ho Kim, A Time synchronizaiton method for NTP

  6. J. Quesada, J. Uriarte Llano, R. Sebastián, M. Castro3, E. Jacob, Evaluation of Clock Synchronization Methods For Measurement and Control using Embedded Linux SBC

ACKNOWLEDGMENT

The author acknowledges the referees for valuable suggestions on the paper and world community of NTP for providing the valuable technical details for the subject.

Leave a Reply