Dissemination of using and its application

R. C. Jha, A. Shukla, A. Agarwal, P. Thorat, T. Bharadwaj, N. Sharma* , and V. N. Ojha [email protected] Pranalee Thorat/ATFW/2017 Role of CSIR-NPL

CSIR_NPL - NMI of India - Maintains Primary standard of Time by the act of Parliament - responsible for the highest level of time and frequency measurements in India and its traceability to BIPM using ultra precise satellite links. In simple words, we maintain the Indian Standard Time (IST) based on a bank of Cesium (Cs) atomic and a Hydrogen maser

PRECISE TIMING SYSTEM AT CSIR-NPL CSIR-NPL Various NMI time Dissemination Methods Name of NMIs Long Wave Telephone NTP

NPL, India __ “Teleclock” UTC(NPLI) +11 45608687 Accuracy: 100 ms +11 45608688 Accuracy:10 ms–1 s NIST, USA WWV Broadcast “ACTS” 20 servers (free) UTC(NIST) (60 KHz) +1-303-499 7111 3 servers (restricted) Station: Fort Collins, Colorado Accuracy: 30 ms Accuracy: 50 ms NPL, UK MSF Radio “Phoneclock” 02 NTP servers (within NPL) UTC(NPL) (60 KHz) +44-020-8943 6333 2 NTP servers (Public services) Station: Anthorn Accuracy: 30 ms Accuracy: 20 ms Accuracy: within 1 ms PTB, Germany DCF77 (77.5 kHz) +49-0531- 512038 UTC(PTB) Station: Mailflingen Accuracy: few ms 3 servers (South-East of Frankfurt) Accuracy: ms NRC, Canada 3330, 7850, 14670 kHz +1-613-745 1576 UTC(NRC) Station: near NRC and 2 servers Accuracy: 0.1 ms +1-613-745 9426 Accuracy: 1 ms NICT, Japan 40 kHz, 60 kHz +81-42-327 7592 UTC (Japan) Station: Ohtakadoya-yama and Hagane-yama ntp.nict.jp NIM, BPC (68.5 KHz) Telephone Time Service UTC (China) Station: Shangqiu +8610 6422 9086 Accuracy: 300 ms Australia __ +02 8467 3727 NTP multiple servers UTC (Aus) Accuracy: better than 10 ms LNE-SYRTE, TDF (162 kHz) (Speaking ) Stratum-1 time server: ntp- UTC(OP) Station: Method: one array of four speaking p1.obspm.fr (restricted access) Allouis (150 Km south of paris) clocks Stratum-2 time server: Accuracy: 1 ms Accuracy: 20 ms ntp.obspm.fr (free access) SU, RBU: 66.66 kHz, /Russia Speaking clock (08 servers in stratum1 and 01 UTC(Russia) Dial 100 or 060 in stratum 2) Accuracy: few tens of ms • There are various way of time dissemination but time synchronization protocols working on the IP networks are mainly • Windows W32 Time service (using SNTP) Protocol, Network Time Protocol (NTP) and (PTP) etc. • NTP is the most effective and robust method for time synchronization using Internet. • NTP is a hierarchical protocol partitioned into stratums which defines the distance of the Server from the reference clock, which can be , GNSS time etc. NTP- Network Time Protocol

• NTP stands for Network Time Protocol. • It is an Internet time synchronization protocol. • Used to synchronize clocks to a time reference using the internet. • This protocol was designed by Prof David L. Mills at University of Delaware.

• Protocol to sync clocks of computer systems over packet-switched, variable –latency data networks – Uses UDP port 123 – Designed to resist effects of variable latency (jitter buffer) – Designed in 1985 by Dave Mills at U. Delaware – Can achieve accuracy of 200 µsec – Based on Marzullo Algorithm

Introduction

• NTP is intended to synchronize within a few milliseconds of Coordinated Universal Time (UTC). • Uses a modified version of Marzullo's algorithm & is designed to mitigate the effects of variable network latency • NTP can usually maintain time within tens of milliseconds over the public Internet & can achieve better than one millisecond accuracy in LANs under ideal conditions. • Asymmetric routes and network congestion can cause errors of 100 ms or more • The protocol is usually described client-server model, but can as easily be used in peer-to-peer relationships where both peers consider the other to be a potential time source. • Implementations send and receive timestamps using the (UDP) on port number 123 Introduction continues • They can also use broadcasting or multicasting, where clients passively listen to time updates after an initial round-trip calibrating exchange. • The current protocol is version 4 (NTPv4), which is a proposed standard as documented in RFC 5905. It is backward compatible with version 3, specified in RFC 1305

History Of NTP • 1979- First public demonstration of Network time synchronization. • 1981- Protocol was developed and documented n RFC 778 • 1985 – NTPv0 was implemented in Fuzzball and Unix: documented in RFC 958 • 1988- NTPv1 much more complete specification with associated algorithms: RFC 1059 • 1989- NTPv2 :state machines and pseudocodes, management protocol, cryptographic authentication scheme: RFC 1119 • 1992- Included analysis of all sources of error, broadcast mode introduced : RFC 1305 • 2010- Proposed new specifications: RFC5905 • 2014- Updated RFC is being processed which is yet to publish. Basic features of NTP • NTP needs some reference clock that defines TRUE TIME to operate.(Usually UTC is reference time for NTP service) • NTP is a fault tolerant protocol. • NTP is highly scalable. • Protocol is highly accurate • In temporary absence of internet connectivity, NTP can use measurement from past to estimate current time and error.[x] • NTP also maintain estimates for the accuracy of local time.

NTP Clock Stratum Structure

• NTP uses hierarchical system of “clock strata” • Stratum levels define distance from reference clock and exist to prevent cycles in hierarchy – Stratum 0 • devices are atomic clocks, GPS clocks, radio clocks – Stratum1 • attached to stratum0 devices • Act as servers for timing requests from Stratum 2 servers via NTP – Stratum2 • Similar to Stratum1, but they also have peering relation to other stratum2 servers

Plan of Time Synchronization throughout INDIA Enormous applications of NTP Time synchronization • Web Time Display • Voice over IP Web time display Disseminates time over internet through http or Web time display Objective: Disseminates time from CSIR-NPL NTP Server to Web Browser

NTP Server Browser Web Time Display : Challenge

Request NTP Time

Response NTP Data NTP Server

Browser • Browser cannot send NTP request to NTP Server Web Time Display : Solution – Web NTP CLIENT

Request HTTP Request Time NTP Time

Response Browser HTTP NTP Server Data Response NTP Data Web NTP Client Web NTP Client mediates between web browser and NTP Server. It also logs all time request from the user. Log data: User IP Address, Timestamps of each node (User, NTP Client, NTP Server)

Web Time Display : MACROS

NTP Client Receive Time ( ) NTP Serv ( ) Initiating Time 푡푛 ( ) 푡푛 푡푖

NTP Serv ( ) Receive Time ( ) 푡푛

푡 NTP Client Transmit Time ( )

푡푛 Web Time Display : Calculation-Time Calibration

Round Trip Time ( ) Receive Time ( ) - Initiating Time ( ) 푡 푡 NTP Server transmit Time ( ) Clock Difference ( ) 푡푖 – (Receive Time ( ) + Initiating Time ( ) 푡푛 푡푖푓푓 푟 푖 NTP 2 SERVER Processing Time

NTP Client Round Trip Time

User Round Trip Time Statistical Data Analysis of CSIR-NPLNTP servers

Currently NPLI having 2 NTP servers and from statistical data analysis of NTP users, we found that NTP Service is used in diversified sectors. These are • Telecom Sector • Cable TV Communication • Electronic Device Manufacturing • Internet Service • Cloud Computing Service • Research and Education • IT services but we found that more than 50% of our NTP service is utilized by VoIP Server Providers UTM data analysis of NTP servers of NPLI (TOP_HITS) (26/05/2017-13/06/2017)

IP ADDRESS NO OF NAME OF ORGANIZATION COUNTRY HITS 110.172.171.194 249813 World Phone Internet Service Pvt. Ltd. India 14.139.47.4 58368 National Institute of Science Communication and In India

182.71.216.178 29123 Bharti Airtel limited India 24.15.80.185 21742 comcast cable communication LLC United States 69.20.5.68 11547 BACKSPACE HOSTING United States 131.193.178.43 10172 University of Illinois at Chicago United States 192.11.130.225 10160 Alcatel Lucent United States 73.14.95.143 10111 Comcast Cable Communications LLC United States 132.163.136.80 7928 National Institute of Standards and Technology United States 218.248.28.20 6110 Bharat Sanchar Nigam Limited India 121.241.246.150 6066 Tata Communications Limited India

192.11.69.21 5155 Alcatel Lucent United States 115.111.15.170 4432 Tata Communications Limited India 196.1.113.248 3374 Centre for Development of Advanced Computing India 203.101.52.55 3019 BHARTI AIRTEL India UTM data analysis country-wise of NTP servers of NPLI (01/01/2017-01/02/2017)

COUNTRY Number of HITS Country Hit Ratio

INDIA 4,06,124 INDIA 406,124(81.1%) USA 77,397 UNITED 77,397(15.5%) CHINA 13 STATES RESERVED 16,707(3.3%) RUSSIAN 24 FEDERATION Other (1.1%) IRAN 8

UKRAINE 4

ROMANIA 2

CANADA 7

GERMANY 14

FRANCE 8

UNITED KINGDOM 110

OTHERS 16,707 UTM data analysis Date wise of NTP servers of NPLI (26/01/2017-13/06/2017)

DATE HITS (in thousand ) 26-05-2017 12 27-05-2017 142 28-05-2017 134 29-05-2017 22 30-05-2017 21 31-05-2017 27 01-06-2017 26 02-06-2017 16 03-06-2017 28 04-06-2017 42 05-06-2017 30 06-06-2017 24 . Holi 07-06-2017 36 days 08-06-2017 21 09-06-2017 19 10-06-2017 24 Top NTP Users Hits per Day of NTP servers of NPLI (01/01/2017 - 01/02/2017) IP NO OF DATE SERVER NAME OF ADDRESS HITS ORGANIZATION

182.71.216.178 135879 1/17/2017 14.139.60.106 Bharti Airtel, New Delhi, 110008

182.71.216.178 79955 1/16/2017 14.139.60.106 Bharti Airtel, New Delhi, 110008 182.71.216.178 61585 1/18/2017 14.139.60.106 Bharti Airtel, New Delhi, 110008

182.71.216.178 53971 1/27/2017 14.139.60.106 Bharti Airtel, New Delhi, 110008 182.71.216.178 85836 1/28/2017 14.139.60.106 Bharti Airtel, New Delhi, 110008 110.172.171.194 36917 1/14/2017 14.139.60.106 World Phone Internet Services Pvt Ltd. New delhi,india, 110001

110.172.171.194 33233 1/15/2017 14.139.60.106 World Phone Internet Services Pvt Ltd. New delhi,india, 110001

110.172.171.294 12803 1/13/2017 12803 World Phone Internet Services Pvt Ltd. New delhi,india, 110001

What is VoIP

• VoIP (voice over IP) is the transmission of voice and multimedia content over (IP) networks. VoIP is enabled by a group of technologies and methodologies used to deliver voice communications over the internet, enterprise local area network or wide area network.

• VoIP encapsulates audio via a codec into data packets, transmits them across an IP network and unencapsulates them back into audio at the other end of the connection. VoIP endpoints include dedicated desktop VoIP phones, softphone applications running on PCs and mobile devices, and WebRTC - enabled browsers.

 It is also possible to bypass a VOIP Service Providers and directly connect to another VOIP user.

 (first user)IP Phone----- ----- Router ---- Internet ---- Router ----Ethernet ---- IP Phone(end user)

Dependence Of VoIP on NTP Time Stamping Time synchronization plays a key role in VoIP or Internet telephony services in several areas, such as: • SLA measurements :- The service level agreement (SLA) is a contract between a service provider and a customer that guarantees a certain quality and availability. SLAs are therefore a critical part of any VoIP service. Recently, service providers have started providing end-to-end SLAs guaranteeing VoIP QoS. • Fault analysis • Call Data Record (CDR) generation and billing :- Billing is also a core function in telecom. CDRs are the primary source of billing information in VoIP. They provide information about call origination, destination, and duration. CDR duration includes the timestamp indicating when the call was initiated and either the call duration or the time the call was terminated • Security • Network fault diagnostics and recovery  Loss of connection  Buffer overflow  Missing packets  Crashes  Denial of service attacks Conclusion NTP Server provides the timestamp with holding accuracy of microseconds and disseminating accuracy of milliseconds. So, quality of service and security in VoIP Service could be achieved by synchronizing time from NTP Server.

Any user across the world can uses NTP service if their system is having Internet connection and NTP provide time to user at stratum 3 to 15 level and it is free in INDIA. So it is very cheaper way to uses NTP services for Business like VOIP etc. Thank You