The document describes research on implementing Network Time Protocol (NTP) in ATM networks in Pakistan. The researcher built an NTP server and tested synchronizing the clocks of 5 ATMs connected to the server over a month. Results showed the 3 ATMs with NTP worked well with accurate timestamps, while the 2 ATMs without NTP failed benchmarks for maximum 60-second activity times and average 3-minute transaction times. The research concluded implementing NTP is important for ATM networks in Pakistan to accurately track transactions and reconcile logs.
2. Analysing various Time Protocols and implementation of NTP in
ATM
Network in Pakistan
By
Pardeep kumar
Spring 2015 / MS (Software Engineering) / Reg No. 1271107
Email: Pardeep_kumar@outlook.com
IS Advisor
M. Ejaz Tayab
Computer Science Department
SZABIST, Karachi Campus
April, 2015
3. Abstract
Financial Institutes,especiallybanks,are veryreluctanttouse publicservicesoninternet
because of insecurityandhackingissues.ATMnetworksolutionprovidersinPakistanare no
exceptional;theyusuallydon’tenable Time synchronizationservicesonATMnetworks.Asin
past itwas not muchrequired butnow because of new monitoringandtrackingservicessuchas
M-viewandM-recover(initiatedbyTouchPoint)whichrequiresprecise time synchronization.
Both the applicationsandsimilarfuture applicationsrequire timesynchronizationfromATMso
that theycan correctlystore logson ATMand track variousactivitiescorrectly.InmypaperI
have researchedonTime SynchronizationProtocolssuitedforATMnetworksoperationalin
Pakistan.Challengesare many;reliability,quality,speed,security are amongthe few.InPakistan
networkqualityvarydrasticallyfrom4Gtelecommunicationavailable forurbanareas andslow
dialups inrural areas.At present, ATMnetworksinPakistanhasno mechanismfortrackingtime
synchronizationonATMhoweveritisthe biggestchallengeand itisthe needof thisindustryto
track importantfinancial transactions,reconcilelogsand manage incidents.
Pakistanranked6th
inworldpopulationwiththe setupof around8000 ATMs networksin
bankingsector. Withinthishuge networkof ATMsthere isno internetfacilityavailablebecause
for ATMs itshouldbe a secure networkandit can’t be openforanyone to accessit.
Thispaperis basedonexperimental work toprove the importance of Time Synchronization on
the ATM NetworkinPakistan.Various testswere conductedonseveral ATMsinorderto build
“AutoTime SynchronizedSystemwithNTPserver”.Asapilotintestingenvironment,Ideployed
NTP on3 ATMs and 2 ATMs were withoutitandtesteditfor more thana month.Afteranalyzing
the resultsfromthe logs and verifyingthemwithactual transactiontime,I confirmed the
importance of NTP.Resultsshowed thatthe 3 ATMS with NTPworkedwell whereas the 2ATM
withoutNTPfailedbothbenchmarksof 60 seconds activitytimeoutand3minutes average
transactiontime.
Keywords: NetworkTime Protocol (NTP),PrecisionTime Protocol(PTP),ATMNetworks,Time
Synchronization,NetworkTime Protocol Daemon,NetworkTime ServerMonitor,PakistanATM
network.
4. Contents
Introduction.......................................................................................................................................5
Problem Statement:............................................................................................................................5
Research Methodology.......................................................................................................................7
Research Structure and Tool................................................................................................................7
Stage 1 .......................................................................................................................................7
Stage 2 .......................................................................................................................................7
Research Scope ..................................................................................................................................7
Field of the Invention..........................................................................................................................8
Background andPrior Art....................................................................................................................8
Network Time Protocol (NTP)..............................................................................................................8
NTP Overview.....................................................................................................................................8
How time synchronization to our system .............................................................................................9
Precision Time Protocol (PTP) ..........................................................................................................12
How PTP Delay Calculate...................................................................................................................12
Compare NTP and PTP ......................................................................................................................13
First NTP server Build........................................................................................................................14
Setting the gpedit.msc for Server as well as ATMsame setting doing...................................................23
Network Time Protocol Daemon Second NTP server...........................................................................27
NTP Time Server Monitor BY Meinberg 1.04.......................................................................................33
How NTP Delay Calculate..................................................................................................................43
Result on ATMTime synchronization.................................................................................................43
Conclusion .......................................................................................................................................53
Future Work.....................................................................................................................................53
References.......................................................................................................................................54
Appendix A – Important contributors.................................................................................................55
5. Introduction
The ATM networkisan important partof any financial institution anditsimportance isgrowingasmore
servicesare continuouslyadding. Itisone of the major revenue generationservicesforabank. With
thisincrease in ATMtransactionalsoresultsinincrease infraudulenttransactionsdue towhichnotonly
24 hour transaction monitoringisrequiredbutitshouldbe preventedproactivelyintime. There are
manyATM monitoringservicesandapplicationavailable butall dependsonaverysimple butvital
component– the exactclock time. Unfortunately inPakistan,majorityof the banksneglected this
simple butcrucial elementwhile ATMnetworkimplementation.
I workfor an IT service providerthat dealswithATM.Recentlywe have come acrossnumberof cases
where due to time mismatchitbecame verydifficulttotrace the transaction. The proverb,“A chainis
onlyas strong as its weakest link” completelysetonourcase,where a small elementdisruptsthe
entire mission.Withouttime synchronization, how can we track importantfinancial transactions?How
can we track logs? How can we manage incidents? How canwe track issues?How can we achieve
reconciliation management? Application likem-viewandm-recoverfailsif the time isnotcorrect.
I startedmy searchfor a suitable time synchronizationapplicationforATMnetworksconformingto
Pakistani environment. Ifoundtwopopularprotocols, PrecisionTime Protocol (PTP) andNetworkTime
Protocol (NTP). NTP isthe networktimekeepingprotocol providing accurate Time Synchronization in
milliseconds. The clientperiodicallysendrequesttoNTPserverto synchronize itstime.
Problem Statement:
At present,inPakistan none of the ATMsnetwork isusinganytime synchronizationprotocol. Also
individualATMare notconnectedwithinternettoaccessgloballyavailable PTPservers,theyneedtogo
viacentralizedbankserver.
Pakistanis 6th
inpopulation buthasaround 8000 ATMs. On an average anylarge bank inPakistan owns
more than 1500 ATMs across theirnetwork. Asthe numberof ATMincreases,the issue becomesmore
critical.
To test,I createdin-house setupof ATMsnetwork withNTPserverandbuildcasestoanalyze the issue.
StatisticsshowsthatinPakistan at peakhours there isa transactionperATM every4 minutes,i.e. 1500
ATMs x (60/4) = 22,500 transactions perhouror 375 transactionsperminute nationwide.How canwe
finda particulartransactionat a specifictime inthe ElectronicJournal (ATMLog) withoutpropertime
stamping?
Screenshots,beloware one of the real transactionforma bankwhichexplainsthe issue.
6. Fig1- Search Transaction withtwotimesAvailable;ATMand Host.
Above Fig1showsthat leftside time is“2/23/2015 4:32:25 PM” it isthe ATM time and the righthand
side time “23/02/2015 16:29:48” is the Host time. Here,itshows3 minutestime differencebetween
ATM time andHost Time.
Fig2- Search Transaction on one of the Applications with Time shown at the bottom.
Above picture shows same transactionsearched inthe applicationrunningonBank’sserver. Againa
difference of 3 minute isclearlyseen.
For a user,thisdifferenceinminutesmaynotmatterbutto trace fraudulenttransactionandtorun
automaticanalyticsonimage andtransactiontracing itmattersa lot.
7. Industryexperts,see contributor’slist,sets60secondsmaximumtime tocomplete anyone ATM
activity.Anyactivitytakingmore than60 secondsraise analarmingsituationforATMoperators.
Furthermore,atpeaktimes,anaverage ATMcomplete transactiontakes3minutes. We use boththese
timesasbenchmarks for our testing.
ResearchMethodology
I have performedexperimental researchon real problem.IbuildNTPserverinmyoffice andTestedon5
ATMs that were available inmyoffice. Imonitorthemformore than one month.For Time
Synchronization,Ichecked the logsand comparedthe time accuracy withServer. I alsochangedsome
ATMs time on purpose andthencheckthe time of ATM to confirmif automatictime synchronizationis
working. Ialso sharedmyresultsinmy report.
I have usedfollowingapproachestoconclude the Research Methodology:
1. NTP andPTP usedforthe Literature Review
2. Experimentwork; IconfiguredNTPserverandNTPclient andsynchronized 5 ATMs
3. Comparative Researchalsodone.IcomparedNTPandPTP.
ResearchStructure andTool
I have conductedthe research studyintwo stages:
Stage1
In thisstage I have researchedonthe needof time protocol forATMnetworks.Assuch, I read Research
papersand articlesandread on protocolsandATMs to understand NTPandPTP.How NTP and PTP
work, inparticular,how delay iscalculated? IalsocomparedNTP and PTPand checkedwhich one
shouldbe suitedforATMnetworksinPakistan.
Stage2
I selectedNTP foritand researchedindepth.BuildNTPservers,establishATMnetworkandpractically
implementedNTPtime keepingsystem.Iexperimentedwithdifferentscenariosand analyzedmy
results.
ResearchScope
Time SynchronizationinATMNetworkcannotbe done viainternetbecause assatedabove banks
doesn’tuse internetfortheirATMnetworkdue tosecurityreason.Incidenthappenone of the bankthat
were 10 newATM deployed onthe differentlocationof Pakistanandfornumberof daysmultiple
transactionswere performedbutwheninquiredincamerasolutionitwasobservedthatATMtime is
differentwithitsserver(bothtime are notsynchronize).The issueariseswhenadispute transaction
occurredon ATM andunluckilyitisthe transactionof bank seniorperson himself(Headof one of the
bankdepartment).Asmentionedabove, whenhe checkedthe transactionbythe time whichhe
8. mentioned,was obviously notpresentinEJbecause ATMtime wasnot correct. That’sthe reasonnow
that particularbankand otherbanksare now focusingontime synchronization.
Field of the Invention
NTP time Synchronization isusedmostwidely inthe world, forexample, timesynchronization with
systems onthe Airports, missiles,GPSand the financial switches–all uses time synchronization which
is done withregionwise withdifferentNTPserver. Here,my inventionisthatI chose and proposed
Time keeping forAutomatedTellerMachine (ATM) withhelpof NTPProtocol, designthe network,
implementedbothclientandservers,testeddifferent NTPServersandanalyzedmyresultstoconfirm
the solution.
Background and Prior Art
Time Protocol isworkingon two commonProtocols;NetworkTime Protocol (NTP) andPrecisionTime
Protocol (PTP). Differentdevicesanddifferentapplication dotime synchronizationviadifferent
regional NTPandPTP servers.NTPProtocol isthe olderProtocol somany NTP serveravailableon
internet where time synchronization canbe done.Time Synchronization isveryimportantfactorin
many fieldsandapplications.Inthe Airlineindustry, Time Synchronization isvital, if time
synchronizationisnot done andtime isnotcorrect thenmany fatal incidentcanhappened atthe
airports. Likewise,itisalsoimportantinfinancial transaction viaATMtotrace fraudulentactivities,trace
logs,manage incidentsandautomaticanalyticsondata.Nopreviousworkisdone onTime
SynchronizationinATMnetworksinPakistan.
NetworkTime Protocol (NTP)
NetworkTime Protocol (NTP) ismeantforworkinginMAN/WAN. NTPworkslike client/server
architecture where clientrequestfortime synchronizationandserver pushthe correcttime fromserver
to the client. Thissynchronizationcanbe done manually orautomatically.Here clientisthe ATMand
Serveris window2008 R2 NTPserver. ATMpullsthe time fromserverandautomatically time
synchronizationwithserver. The clockcanbe setwithotherstandardslike UTC andGMT withspecific
time zone, like “Karachi Pakistantime zone”.Youcansettime with yourspecifictime zone aswell. NTP
precisionisinmillisecondswhichissufficientforATMnetworks.
NTP Overview
NTP isdesigned forTime synchronizationoverthe Network. NTPuses the Userdatagram Protocol and
usesPort123 for combined side use –source and destinationoverthe network.IusedIP andassigned
multiple NTP serverIP. InNTP, Time isdistributedfromservertoclient.A setof Nodes are usedoverthe
Network. NTPusessome reference clock,suchas, AsiaspecificNTP serverforPakistan—
pk.pool.ntp.org
9. Andotherreference clock, suchas,time.windows.com whichisthe defaultMicrosoft NTP server.
Internetavailabilityisrequired. Snapshotbelow showshow time synchronization isdone using
time.window.com.
Howtime synchronization in our system
I firstchangedtime manually on6th
of March 2015.
Fig3- manuallychangedtime
ThenI setinternettime asshownin below snapshot. Iuse time synchronizationfrom time.winows.com
- MicrosoftNTPserver.
10. Fig4- Time Synchronization from Time.windows.com
Afterthat, I can also synchronize time through updatebuttonandautomaticallyasshownin below
snapshot. Thisfacility isonly available throughinternet.
Fig5. Actual time of our system
NTP works onlikewiseStratumauthentictime source forthe clientandtime serversasmentioned
below:
11. Linkage adjournment
Dispersionof time chunkbetweenthe maximumerrorbetweenNTPserverand ATM
Clockoffsetto righttime betweenATMs.
NTP Clocksynchronizationoverthe range of 10 millisecondforlongdistance,suchas,WAN
(2000KM) and inrange of 1 millisecondforthe shortdistance,suchas,LAN.In myresearch, we
achievedsame, millisecondtime synchronization, onthe internal LAN withATMininternal
Network.We setIP in the ATM to communicate with NTP serversocan we can getprecise
timekeepingandNTPserverandNTP client (ATM) can exchange messages.
Fig6. The diagramshowsa comparative graphof the relative accuracyof current technologies. (REFNTP
white paper)
12. Precision Time Protocol (PTP)
PrecisionTime Protocol (PTP) isthe Time Synchronization meantforLocal AreaNetwork. Server/Client
architecture with masterandslave RelationshipautomaticallySynchronizes time.PTPisnewerProtocol
and isIEEE 1558 StandardProtocol.
Fig7. PTP Timestamps (T1-T4 REF IEEE 1558)
HowPTP Delay is Calculated
Networktime protocols,suchasNTPand PTP workusingroundtrip timing. For example inPTP,the
mastersendsa sync message tothe slave,andthe slave sendsadelayrequestmessage tothe master.
Both messagesare time-stampedwhentheyleave,andwhentheyarrive. A delayresponsemessage
sendsthe arrival time of the delayrequestatthe masterback to the slave. So now the slave hasboth
departure timesandbotharrival times. Itusesthese fourtimestampstodetermine the networkpath
propagationdelay,andthe offsetbetweenthe twoclocks.Howevertodothis itmust assume thatthe
forwardand reverse travel timesare the same. If the syncmessagessitsina queue inaswitchfor a
relativelylongtime,butthe delayrequestdoesnot,thenPTPwill calculateaslave clockoffsetwhich
wouldbe incorrect.
Both transparentclocks(TCs) andboundaryclocks(BCs) are solutionstothisproblem. BothTCs andBCs
are switchesorrouters,whichhelpeliminate the effectsof theirownvariablequeuingtime.
A TC timestampsPTPeventmessageswhentheyenterthe device. Italsotimestampsthemwhenthey
leave. The difference betweenthe outputtimestampandthe inputtime stamprepresentsthe amount
13. of time a PTP packetspendsinthe TC. This queuingtime isaddedtoa PTP message correctionfieldso
that the slave can adjustitscalculations.
A BC isa switchor routerwhichhasone port whichis a PTPslave. Thisport setsthe local clock of the BC
to agree withthe masterclock the slave portisconnectedto throughthe network. All otherportsof the
BC act as PTPmasters,usingthe BCs local clockwhichwas setby the slave port.
NTP and PTP Comparison
Feature NTP PTP
Time Transferaccuracy Millisecondaccuracy Microsecondsor nanosecondsaccuracy
Hardware Time-
stamping
NotimplementedinNTP ImplementedinPTP
Easierto implement Yes, NTP iseasierto implement PTP noteasiertoimplement
PrimaryError Source Router Router,switches,portcontention,o/s
stack delay,Networketc
Mode of Operation Clientspull time fromServer Masters pushtime toSlave (Clients)
On pathSupport NON existentandNotpossible NotRequiredbutpossible through
transparentclockand boundary
clock(Enhance performance)
Relative costof
Solution
Inexpensive More expensive (higherprecisionsolution
14. Metrics ,Monitoring&
Management
Exist,butminimal Extensive inbandmetricsformonitoring
and management
Whichprotocol is used
unicastor multicast
NTP MostlyusesUnicast
protocol
PTP mostlyuses MulticastProtocol
The UDP whichport
used
NTP use one port– no 123 is
alreadyopen andknownto
administrator
PTP uses2 UDP ports– portno 319 and
port no 320
Time Standard NTP usesUTC (Coordinated
Universal Time)
PTP usesTAI("Temps Atomique
International",orInternational atomic
time)
Table1. NTP and PTP comparison
First NTP server Build
Windowsserver2008 configuredforNTPserver. Firstof all,openthe service windows of time service.
Thisservice is to configure the automatictime synchronizationwithclientandserver andalsotime
synchronizationwithreference clock as shown inthe below snapshot. Window time service is disable
so youcan openthe service forautomatictime synchronization.
15. Fig8.Windowstime service started
Nowwe go regedit.exe
“HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeConfig”andinthe ”rightpane
and go the rightclick AnnounceFlags” andthenclickmodify and change the parameterbydefault
“EDIT DWORD 32 BIT VALUE” set5 here givenbelow snapshothow the setvalue of “Announceflags”
and otherparameteralsoremainsame “ Eventlogfags they EDITDWORD32 BIT VALUE” ‘2’ and other
parameterare “FrequencyCorrectRateEDITDWORD32 BIT VALUE”set‘4’ theyare all value hexadecimal
value “LargePhaseOffset” value set “2faf080” andother parameterset “ LastClockRate andthey EDIT
DWORD 32 BIT VALUE” set“26161” and otherparameterare “ LocalClockDispersion andEDIT
DWORD 32 BIT VALUE”set are ‘a’ and otherparameterare “MaxAllowedPhaseOffset and EDIT
DWORD 32 BIT VALUE”setare ‘1’ and otherparameterare “MaxNegPhaseCorrection andEDIT
DWORD 32 BIT VALUE”set ‘e10’ and otherparameterare “MaxPollIntervalandthe EDITDWORD32
BIT VALUE” setare ‘f’ and otherparameterare “MaxPosPhaseCorrection andEDITDWORD 32 BIT
VALUE”setare ‘e10’ and otherparameterare “MinPollInterval andEDITDWORD 32 BIT VALUE” set
are ‘a’ and otherparameterare “PhaseCorrectRate andEDIT DWORD 32 BIT VALUE” ‘1’ and other
parameterare “ PollAdjustFactorandEDITDWORD 32 BIT VALUE“ setare ‘5’ and otherparameterare
“SpikeWatchPeriodandEDITDWORD 32 BIT VALUE” setare ‘384’ andotherparameter
“TimeJumpAuditOffset andother EDIT DWORD 32 BIT VALUE” set are ‘784’ andotherparameterare
“UpdateInterval EDITDWORD 32 BIT VALUE” set are ‘57e40’ and givenbelow snapshottheyshows
all parameter.
16. Fig9. Set the Value of AnnounceFlags and Other Parameter
Thisis Authoritativetime source change the parameterand enablethe NTP service andhow toenable
NTP serverhere the path
“HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpServer”
“In the rightpane,right-clickEnabled,andthenclickModify.Inthe EditDWORD Value dialogbox,type 1
underValue data,andthenclickOK. Andotherparameteristhe setby defaultvalue Allow Non
standardMode Combinations EditDWORDValue dialogbox” setthe defaultvalue are ‘1’
Andotherparameteris the setbydefault value “ChainDisableEditDWORDValue dialogbox” set the
defaultvalue are ‘0’
Andotherparameteristhe setbydefaultvalue “ChainEntryTimeoutEditDWORDValue dialogbox” set
the defaultvalue are ‘1’
17. Andotherparameteris the setbydefault value “ChainLoggingRateEditDWORDValue dialogbox” set
the defaultvalue are ‘1e’
Andotherparameteris the setbydefault value “ChainMaxEntriesEditDWORDValue dialogbox” set
the defaultvalue are ‘80’
Andotherparameteris the setbydefault value “ChainMaxHostEntries EditDWORDValue dialogbox”
setthe defaultvalue are ‘4’
Andotherparameteris the setbydefault value “DllNameEditDWORDValue dialogbox” setthe default
value are ‘%systemroot%system32w32time.dll’
Andotherparameteris the setbydefault value “EventLogFlags EditDWORDValue dialogbox“ setthe
defaultvalue are ‘0’
Andotherparameteris the setbydefault value “InputProviderEditDWORDValue dialogbox“ setthe
defaultvalue are ‘1’ andgivenbeloware snapshot all parameter setthe value.
Fig10. Enable the NTP server and Other Parameter
18. The value setare parameterhere the pathgivenbelow
“HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeConfigParamters”
“In the rightpane,right-clickEnabled,andthenclickModify.Inthe EditDWORD Value dialogbox,type 1
underValue data,andthenclickOK. Andotherparameteristhe setby defaultvalue “NtPServerEdit
DWORD Value dialogbox set the defaultvalue are ‘192.168.1.231,0x9’”
Andotherparameteris the setbydefault value “ServiceDll EditDWORDValue dialogbox” setthe
defaultvalue are ‘%systemroot%system32w32time.dll’
Andotherparameteristhe setbydefaultvalue “ServiceDllUnloadOnStop EditDWORDValue dialogbox“
setthe defaultvalue are ‘1’
Andotherparameteristhe setbydefaultvalue “Service Main EditDWORDValue dialogbox” setthe
defaultvalue are ‘SvchostEntry_W32Time’
Andotherparameteristhe setbydefaultvalue “Type EditDWORD Value dialogbox” setthe default
value are ‘NTP’ here givenbelowsnapshotare forall Parameter.
Fig11.NTP server set Parameter
19. The value setare Securityhere the pathgivenbelow
“LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeConfigSecurity”
“In the rightpane,right-clickEnabled,andthenclickModify.Inthe EditDWORD Value dialogbox,type 1
underValue data,andthenclickOK. Andotherparameteristhe setby defaultvalue “Security Edit
DWORD Value dialogbox” set the defaultvalue are ‘BinaryValue set’ here given below snapshot.”
Fig12. Set the Parameter of Security
Thisis Authoritativetime source change the parameterandenablethe NTP service andhow toenable
NTP Client here the path
“HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpClient”
“In the rightpane,right-clickEnabled, andthenclickModify.Inthe EditDWORD Value dialogbox,type 1
underValue data,andthenclickOK. Andotherparameteristhe setby defaultvalue
“SpecialPollTimeRemaining”EditDWORDValue dialogbox setthe defaultvalue are
‘192.168.1.231,7cabf78’”
Andotherparameteris the setbydefault value “AllowNonstandardModeCombinations EditDWORD
Value dialogbox” set the defaultvalue are ‘1’
Andotherparameteristhe setbydefaultvalue “CompatibilityFlags EditDWORDValue dialogbox” set
the defaultvalue are ‘80000000’
20. Andotherparameteristhe setbydefaultvalue “DllNameEditDWORDValue dialogbox” set the
defaultvalue are ‘%systemroot%system32w32time.dll
Andotherparameteristhe setbydefaultvalue “Enable EditDWORDValue dialogbox” set the default
value are ‘1’
Andotherparameteristhe setbydefaultvalue “EventLogFlags EditDWORDValue dialogbox” set the
defaultvalue are ‘0’
Andotherparameteristhe setbydefaultvalue “InputProviderEditDWORDValue dialogbox”setthe
defaultvalue are ‘1’
Andotherparameteristhe setbydefaultvalue “LargeSampleSkew EditDWORDValue dialogbox” set
the defaultvalue are ‘3’
Andotherparameteristhe setbydefaultvalue “ResolvePeerBackoffMaxTimes EditDWORDValue
dialogbox” set the defaultvalue are ‘7’
Andotherparameteristhe setbydefaultvalue “ResolvePeerBackoffMinutes EditDWORDValue dialog
box” setthe defaultvalue are ‘f’
Andotherparameteristhe setbydefaultvalue “SpecialPollInterval EditDWORDValue dialogbox” set
the defaultvalue are ‘SpecialPollInterval’
Andotherparameteristhe setbydefaultvalue “SpecialPollTimeRemainingEditDWORDValue dialog
box” setthe defaultvalue are ‘192.168.1.231,7cabf78’ givenbelow snapshot
21. Fig13.Set the Parameter of NTP client
“HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersVMICTimeProvi
derIn the rightpane,right-clickEnabled,andthenclickModifyInthe EditDWORD Value dialogbox,
type 0 underValue data,andthenclickOK”.
Andotherparameteristhe setbydefaultvalue “DllNameEditDWORDValue dialogbox” set the
defaultvalue are ‘%systemroot%system32w32time.dll
Andotherparameteristhe setbydefaultvalue “InputProviderEditDWORDValue dialogbox” set the
defaultvalue are ‘1’ andgivenbeloware snapshot all parameter setthe value
23. You can type the commandon the console snapshotgivenbelow net stop w32time for stopthe
windowtime serviceandnetstartw32time for startingthe window time service.
Fig15. Set the Command window Time Service
Setting the gpedit.msc for Server as well as ATM same setting doing
Nowsetthe settingthissettingforClientand Servergpedit.msc PressEnterthen
Computer“Configuration/AdministratorTemplates/System/Window Time Service /Time Provider”
Setthe NTPclientconfigure setthe configure value The defaultvalue is"time.windows.com,
0x09".you can alsosetvalue this here type the IP as well asyoucan type here Domainname andif the
DNS activate forthe NTP serverIPor setDomainname of IPof NTP serverso I Setthe IP is
“192.168.1.231, 0x09”
So bydefaultparameterin the w32time issetthe NT5Ds sohere the value we selectNTPbecause we
are time synchronizationwithNTPserver.
AndotherParameterCrossSiteSyncFlags:sothe value is bitmaskwhenyouare select w32time forthe
source outwardor inside.The youare set0,1 and 2 whenyouare selectvalue set0 thisshowsthat
time synchronize with outwardnotpossible whenuchoose 1(Pdconly) thisindicate thatthisisfor
Primarydomaincontroller(PDC) soyouchoose here setthe value 2 for the time synchronize with
outwardwithNTPserver(192.168.1.231).
24. AndotherParameterResolvePeerBackoffMinutesthisvalue indicate inminutescomprehensive
w32time so try for whenthistime synchronize forsuppose networkproblemhere we choose default
value 15 minutes for suppose NTPserverDNSname notresolve inourcase nothere DNS name here is
IP NTPserver192.168.1.231. Every 15 minute tryATMfor time synroizationif NTPseverunavailable.
AndotherParameter ResolvePeerBackoffMaxTimes: Here the we choose 7 Attemptor try for suppose
Networkdisconnected orNTPServer here we are also configure how manyattemptclientdofortime
synchronizationwithNTPserverIcheckothervalue also5 and 4 attemptalso.
AndotherParameterSpecialPollInterval: thisvalue ATMthis value indicate insecondshere value 3600
(1 hour) aftereveryone hourATM time synchronizationwithNTPserver192.168.1.231 othervalue
alsowe are setin the regedit.exe MinPollIntervalandMaxPollInterval Ialsothe parameterchange also
15 minute soevery15 minute time synchronize withNTPserverand30 minute alsosoevery30 minutes
time synchronize withNTPserver.
AndotherParameterare EventLogFlags:thisamountsetinbitmask thateventof time synchronize with
NTP server that log alsoin the Eventviewer here we are configure 0x1showsthat w32time will only
happen whenthe event time jumpishappen.Whenyouare choose 0x2 thisshowsthatw32time will
happeneventwhenthe time source effectishappen.Here we settingthe 0x3the additionof (0x1 and
0x2) showsthat bothtime jumpandtime source happenwill displayeventviewer.Givenbelow
snapshothowNTPservervalue set
26. Enable the windowsNTPclientSpecifies whetherthe WindowsNTPClientisenabled.Enablingthe
WindowsNTPClientallowsyourcomputertosynchronize itscomputerclockwithotherNTPservers.
Here givenbelow snapshotI enable onthe ATMand Serveras well as below snapshot.
Fig18. Enable window NTP Client
27. Enable the windowNTPserver Specifieswhetherthe WindowsNTPServerisenabled.Enablingthe
WindowsNTPServerallowsyourcomputertoservice NTPrequestsfromotherATMto serverforTime
SynchronizationItestedon5 ATMfor requestforTime SynchronizationHere givenbelowsnapshot.
Fig19.Enable window NTP server
NetworkTime Protocol DaemonSecondNTP server
NetworkTime Protocol Daemon installonwindow server2008 R2 for Network Time ServerMonitorand
alsoservice startsthe NetworkTime Protocol Daemon. The steps are giveninsnapshots mentioned
below. Setconfiguration filesandwhatare stepsforinstallationare alsogivenbelow. Here in
configurationfiles,reference clockwithwhichourNTPservercansynchronizationwithotherbestNTP
servers.
FirstStepgivenbelowsnapshot
28. Fig20. Network Time Protocol Daemon setup
Pressthe I agree button thendisplaythe NextScreen. Here givenbelow snapshot
Fig21. Network Time Protocol Daemon Setup
29. Here we choose the NTP locationwhichwe choose orby defaultchoose otherlocation. Ichoose by
defaultlocationthen pressthe NextButton, givenbelow othersnapshots:
Fig22. Network Time Protocol Daemon Setup
Here we install NTPdaemon NTPTools,NTPDocumentation andCreate Startmenushortcut and then
pressthe Nextbutton.
31. Here are the NTP filesinstalledhere are above snapshotshowsyoucan addreference clockoryouedit
directlyin“C:ProgramFiles(x86)NTPetc.ntp.conf”thatparticularpathyoucan edit I chose directly
editandopenthe configfile addthe reference clocksettingandothersettingnecessary pressthe
button othersnaps displaygivenbelow
Fig24. Network Time Protocol Daemon Setup
32. Here we choose NTP forservice settingchoose the accountIchoose systembydefaultsetting and
otherthings that showsinsnapshot then pressthe Nextbutton and NTPservice Damonsuccessfully
startedand the setup isnowcompleted.Here givenbelow snapshotwhere we seethe NTPservice
Status withthe parameters Poll,Reach,Delay,offsetandJitter. Ichoose 9 reference clock,
synchronizationdone onthe server.Below shown differentvaluesonthe NTPserver.
Fig25. Quick NTP status
33. NTP Time Server Monitor BY Meinberg 1.04
Here givenbelowsnapshot of Maininterface of NTPTime ServerMonitor.
Fig26. NTP Time Server Monitor BY Meinberg 1.04 NTP Service
Here are the option,we can start NTPService,NTPservice Restart andNTPservice Startand other
optionavailable are Applicationlog,otherNTPstatus,NTPconfiguration,caneditthe configuration file
directlywithinterfacestatics,Advance staticsandconfiguration,Notification,Logfile andNTPDebug
information.
34. Nowthe snapshotshowsthat CurrentNTPstatus onthe NTPserver. Showsinformation,suchas, when
Poll,Reach, Delay,offsetandJitter, Local Server and 11 other“reference clock 218.189.210.3,
128.199.91.7”, “ns02.hns.net.in”, “snowball.betterworks.net”,”15.125.94.25” , time.tritn.com”,
“ns.dsl.net.pk”,“ns1.arianrp.ir”,“202.118.1.30”, “192.248.1.168” , “212.26.18.41” GPS thatshows to
calculate “Poll,Reach,Delay, offsetandJitter”.
Fig27. NTP Time Server Monitor BY Meinberg 1.04 NTP Status
Now the snapshotshowsNTPconfigurationfile whichwe canmodifyasperour need.
35. Fig28. NTP Time Server Monitor BY Meinberg 1.04 NTP Configuration file
36. Here NTP Statistic inthe Graph is shown. General information “Date,Starttime,Endtime,frequency
Min, Max Time, UTC” and otherinformations.
Fig29. NTP Time Server Monitor BY Meinberg 1.04 NTP Statistic
37. ThissnapshotshowsAdvance Statistic. FourParametershownare: SelectedPeer,StratumValue ,
DelayandPollingInterval. FirstEntryis2015-04-13 8:02:54 and Last Entry is2015-04-14 15:18:31 ,
MinimumValue is0 andMaximumvalue is1049.43 and Entry is615. Right side PanShows Delaytime,
note here youcan alsoclickon SelectedPeer,StratumValue andPollingInterval.
Fig30. NTP Time Server Monitor BY Meinberg 1.04 NTP Advance Statistic
Notification Mail information are shownbelow, here we also see NTPmail configuration,MinStratum
level 10, Min offset1000 , Mail information of Mail Server,User Name Password,from Address,
Address1andAddress2and SNMP.Andotherinformation andTriggerinformation,suchas, which
informationonyourmail sendif NTP isnot Synchronizing,NTPStopped,NTPStratumLevel too large,
Max offsetexceededcheckmarkonSendNotification, if condition aborted.
38. Fig31. NTP Time Server Monitor BY Meinberg 1.04 NTP Mail Notification
41. Fig33. NTP Time Server Monitor BY Meinberg 1.04 NTP Debug Information
42. NTP Data Formatis shownbelow:
Fig34. Shows That NTP Data Format (Ref tools.ietf.org)
Fig36. NTP header and timestamp format
43. HowNTP Delay is Calculated
Let T1 the ATM time on the requestPacket
Let T2 NTPserver time just receive requestfromATM
Let T3 the NTP serveronjustleaving of the replypacket
Let T4 the ATM time comingfromthe NTP server.The NTPCalculatesthe clockoffset.
Offset = [(T2 - T1) + (T3 - T4)] / 2
delay = (T4 - T1) - (T3 - T2).
How the accuracy of delay iscalculated in NTP.
Withno transparentclocksor boundaryclocksPTP,like NTP,assumesthatthe forwardand reverse
packetlatenciesare identical. Half of the difference isthe time transfererror. Thiscan be anywhere
frommicrosecondstomilliseconds. However,asmartslave servoloopcan remove mostof thiserror.
Some telecomprofile slavevendorshave reportedbeingable tomaintain1microsecondtime transfer
accuracy through 5 carrier classroutersat 80% loading.
TCs and BC typicallyadda 20 ns errorfor eachone inthe path betweenthe grandmasterandslave
clocks.
Result on ATM Time synchronization
I testedon5 ATMwithautomaticand manual Time synchronization. Ifirstchangedthe startingwindow
time service andsettingthe gpedit.mscthatIconfiguredin “Settingthe gpedit.mscforServer as well as
ATM setting” thenclickon time andon the Internetsettinggave the IPaddressof the NTPserver. I
gave IP 192.168.1.231 and also setRegedit.exesettings inthe serveraswell as inthe client(ATM) as
showsinthe NTP Server build. SnapshotshowsthatI changedthe data from30th
March to 31st
March
2015.
45. NowI Synchronize with NTP server192.168.1.231. I testedformore than a month,observe with
differentparameters, andcheck how itsynchronizeswithNTPserver.We gotactual time fromNTP
servermessage display“The clockwassuccessfullysynchronizedwith192.168.1.231 on 3/31/2015 at
3.49p.m” as shown inthe snapshot.
Fig38. On the ATM, Time Synchronization with NTP server IP 192.168.1.231
On the everyeventof time synchronization,the logswas recordedonthe window eventviewersystem
logs and also xml formatlogsto understandhow NTPserverchange time.
46. Fig39. ON the ATMSystem event viewer logs.
Givenbelow are two detail logs of systemeventviewer thatshowsinthe log.
Example1.Givenabove snapshotdatachange from31 march to 30 march thensynchronize withNTP
servershown inthe Xml format.Then receive the actual time fromthe NTPserver.
EventViewerlogof ATM :
“Log Name: System
Source: Microsoft-Windows-Kernel-General
Date: 3/31/2015 4:00:46 PM
EventID: 1
Task Category:None
Level: Information
Keywords: Time
User: User-PCUser
Computer: User-PC
Description:
49. <Correlation/>
<ExecutionProcessID="1132"ThreadID="12556" />
<Channel>System</Channel>
<Computer>User-PC</Computer>
<Security UserID="S-1-5-19"/>
</System>
<EventData>
<Data Name="NewTime">2015-03-31T07:21:49.694189800Z</Data>
<Data Name="OldTime">2015-03-30T07:21:48.064137100Z</Data>
</EventData>
</Event>”
Graph below showsPollinginterval of NTPclient of 5ATMs. Firstbar showsthat every 60 minute ATM1
will automatically synchronize timewithNTPserverandalso withATM.Similarly,forotherATMs, 40
minute,30 minute, 20 minute and10 minute wassetas shown inthe chart.
Fig40. The chart showsthat ATMTime SynchronizationwithdifferentPollingInterval
0
10
20
30
40
50
60
70
ATM1 ATM2 ATM3 ATM4 ATM5
ATM Time Syncronization with differentPolling
Interval
50. Fig41. The chart showsthat NTPserver1192.168.1.231 differentTrend
Above chartshows Trend of FirstNTP serverwithdifferentPollinginterval. Duringtesting,we changed
Time SynchronizationwithATM. The otherBackup NTPservershowsopposite trendinchartgiven
below:
Fig42. The chart showsthatNTP server2 192.168.1.232 differentTrend
Here is the below graphshowsthat ATM 4 Cumulative Time delay.
0
0.2
0.4
0.6
0.8
1
1.2
15 30 45 60
192.168.1.231
0
0.2
0.4
0.6
0.8
1
1.2
15 30 45 60
192.168.1.232
51. Fig43. The chart showsthatATM 4 CumulativeTime delay.
ATM 5 showsinthe graph ATM 5 Cumulative time delay
Fig44. The Chart showsthatATM Cumulative TimedelayATM5
0
50
100
150
200
250
300
350
400
450
DAYS
Delayinseconds ATM 4 cumulative time delay
0
50
100
150
200
250
300
350
400
1 2 3 4 5 6
ATM 5 Cumulative Time Delay
52. Here is the graph anotherviewof here showsthat
Fig45. Delayinminutes after5 daysAMT5 and ATM4
6.4
6
5.8
5.9
6
6.1
6.2
6.3
6.4
6.5
ATM 4
Delay in minutes after 5 days
53. Conclusion
I have studiedNTPandPTP andafter comparison selectedNTPformyexperiments. I conducted my
research on Experimental basisbyimplementingATMnetworkusingNTPclientandNTPserver. Ihave
builta networkof 5 ATMs. I ran 3 ATMs withNTPclientsand2 ATMs withoutNTPclients. I
implementedtwoNTPservers. IbuildNTP serveron window server2008 R2 and Settinginthe
regedit.exe andgpedit.msc. Ialsoimplemented othersoftware basedNTP - NetworkTime Protocol
Daemon(NTPD) andNetworkTime ServerMonitorBYMeinberg1.04 and Testedforone monthand
deduce resultsfrom the logsinthe event viewerand verifiedmyresultswithmytestedtransaction
time.ResultsshowsthatNTPworkedwell andthe 2ATM withoutNTPfailedourbenchmarkof 60
seconds[7] and 3 minutes.
Future Work
In thisresearchstudy,Ihave usedNTP,in future work,Time SynchronizationusingPTPcan be
investigated. One canbuildthe PTP serverand configure ATMsfor PTP and thentestthe time
Synchronizationonthe ATM Network. Also, message formatusedinNTP Protocol can be studiedas
for ATM networks there maybe some fieldsthatmaynotbe required andcanbe eliminatedtoshorten
the message size,thussavingtransactionandprocessingtime. Also,local serverscanbe builttoreduce
longinternational link. Forfinancial transaction,security aspectsof NTPcan be addressed.
54. References
1. Shi KyuBae,EnhancedTree ConstructionAlgorithmfor Timing-SyncProtocol forSensor
Networks,Journal of AdvancesinComputerNetworks,2015
2. MasahikoMiztukani,HirakoNakazawa,YoshihiroAshi,Mitsunaga,Nakashi,Communicationand
Time Synchronizationmethod,2015
3. JunxingZhang, ChunjuanBo,The researchof synchronizedtriggerbysoftware indistributed
Networksystem,2015
4. Cho,Sang Woong ,Park,Cheolsoon,Seo,Sook-ryon, AhnJongpil,REALTIME REMOTE LEAK
DETECTION SYSTEMAND METHOD,2015
5. FENGYUAN BAI,ClockSynchronizationinAndroidWi-Fi DirectNetwork,2014
6. SabarishSridha,PrasantMisray,Jay Warrior,A Time SynchronizationService for
Resource ConstrainedBluetoothLEAdvertisers,2015
7. HakenGrenabo,Floda(SE);Per-Arne Thorsen,Ojersjo(SE),MethodandDevice forResidentTime
CalculationandSynchronization,UnitedStates,2014
8. KjellHasson,OlofHagsand,Systemforestablishingandmaintainingaclockreference indicating
one way latencyina data network,2014
9. Enrique Mallada,XiaoqiaoMengy,Michel Hacky,Li Zhangy,andAo Tang , SkewlessNetwork
clock SynchronizationwithoutDiscontinuity:Convergence andPerformance,2014
10. HaroldA. Roberts,PrlorLake,MN (US);ChrlstopherWayzata,MN (US);JasonW. Dove,Novatos
CA (Us);BerkayBaykalsTransparentClockforPrecisionTimingDistribution,2014
11. DavidL. Mills,InternetTime Synchronization:the NetworkTime Protocol,1991
12. yongwanJu,WoojinPaik,MoonSunShin,Designof Time SynchronizationProtocol basedon
Master and Slave Topologyfor heterogeneousUSN,2014
13. http://www.ntp.org/ntpfaq/NTP-s-def.htm
14. http://www.symmetric.com
15. http://www.endruntechnologies.com/ptp-ieee-1588-faq.htm