dcsimg

The Persistence of Time

Where does the time go? If you've ever had to ask this question, NTP can give you the answer time and again.

Do you have problems keeping time synchronized on your network? Do your systems tend to drift? You can resolve the time drift problem by using the Network Time Protocol (NTP) to keep all your system’s time in sync with each other. What’s that? You’ve tried using NTP to find that some of your systems still set themselves apart from the pack. You can go one step further and create your own NTP server for your network.

If you’ve ever experienced catastrophic failures in applications, with network storage or with file timestamps, it can drive you crazy. And, for you typical overworked and under-appreciated system administrators, that’s a short drive.

Setting up your own NTP server is the answer. You learned from the first NTP-related article, “NTP: Timing is Everything,” how to setup your Linux systems to use NTP. This week, you learn how to setup a network NTP server.

Let’s face it gang, unless you have the privilege of working for Amazon.com or Google, chances are that you live and work in a mixed operating system environment. You have to deal with Windows, Linux, commercial Unix and possibly Mac systems. It isn’t pretty but it’s a fact. You have to deal with those Windows servers and keep their users happy too. Windows systems have a tendency to drift even when connected to a domain.

You might ask, “Why is Windows time so unreliable?” Part of the problem is the time algorithm that’s used for Windows time. Windows time clients attempt to synchronize time three times every 45 minutes. If those attempts successfully synchronize with a time server, updates then drop to every eight hours. And, the other part of the problem is that just about any other program running on a system can cause a clock delay. You can edit almost every time-related parameter by tweaking the Windows registry settings located at: \HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\W32Time.

The problem, however, is not unique to Windows operating systems. All operating systems experience drift (some more than others) and having a local NTP server brings everyone back into sync.

Why is a local NTP server better than setting all your systems to sync with an Internet time server? Having a local time server ensures that all systems on your LAN will sync to the same clock and give you time consistency within your network. Synchronized time is handy for comparing events and logs on your network.

The Basics

If you followed the instructions written in NTP: Timing is Everything, you have everything you need to proceed with setting up an NTP server on your LAN.

Server Configuration

The main differences in setting up your system as an NTP server versus setting it up as a client are in the configuration file, /etc/ntp.conf.

The first order of business is to select publicly available time servers with which to sync your LAN server. Yes, you can choose to use your own server as a local time server but it isn’t recommended. You should always sync your LAN’s time server with an external source. And, to ensure that your LAN’s time is always accurate, you should specify more than one source. For the purpose of this article, only stratum 2 servers are considered for use. If you want to know more about time strategy and rules of engagement, read the official document on the subject.

Edit your /etc/ntp.conf file and make the following changes. You’ll want to adjust some of these to fit your own needs.

# Referenced Time Servers
server ntp-1.cso.uiuc.edu
server ntp1.kansas.net

# Restricts reverse access. Disallow configuration modification and queries.
restrict ntp-1.cso.uiuc.edu  mask 255.255.255.255 nomodify notrap noquery
restrict ntp1.kansas.net  mask 255.255.255.255 nomodify notrap noquery

# Restricts modifications by local (LAN) computers but allow access
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Restrictions on the local system (None)
restrict 127.0.0.1

Save the file and restart the ntpd and you’re ready to serve time.

NTP Synchronization

Before the excitement of providing time services to your LAN overwhelms you, take a moment to check your time server’s synchronization status.

$ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 ntp-1.gw.illino 128.174.38.133   2 u   28   64   17  123.092  -26.551  23.649
 triangle.kansas 128.252.19.1     2 u   30   64   11  132.316  -31.254  31.254

If your reach, delay, offset or jitter values are 0.000 (or 4000), then you don’t have proper synchronization. Check that your firewalls allow port 123 (UDP), iptables can interfere if you’re running it on the same system and, under certain circumstances, you might have to remove the nomodify and notrap from your LAN access restrict entry. Should your synchronization still fail, use the IP addresses of the time servers instead of their DNS names.

Windows Clients

To configure your Windows clients to use your new time server, you’ll have to change where the NTP looks for synchronization. Go to Control Panel, Date and Time, Internet Time and enter the name or IP address of your time server into the Server field. Click the Update button when finished. The system time should synchronize with your time server. Click OK when finished. Repeat for each Windows system (Workstation and Server) on your network.

Providing time services to your network computers is an essential service that may go unappreciated by your users. NTP is a lowly protocol that goes unnoticed until it breaks. Don’t be surprised if no one gives you a pat on the back for setting up this awesome service. Doing time is a lonely and often solitary pursuit but certainly worth the effort.

Comments on "The Persistence of Time"

pmurray

If one digs a little further into the documentation, you’ll find the NTP Pool document. The pool:

uses DNS round robin to make a random selection from a pool of time servers who have volunteered to be in the pool. This is usually good enough for end-users.

Reply
ewildgoose

What are you guys on?! This is like an article from the 1990s which has accidently got reposted?

Firstly, for quite some years now the correct technique for a user to get a time server would be to use pool.ntp.org – more info at
http://www.pool.ntp.org

For those who can’t be bothered to read the instructions there are DNS zones to break the ntp servers down by region, so for example you can use europe.ntp.org to limit yourself to only european servers. To enter multiple servers you might need to do something like:
0.europe.ntp.org
1.europe.ntp.org
etc

Secondly, I added chrony to the comments in your last article, why no mention this time?

Hard to see the point of this article? Yes introducing that windows has some problems with time is a good point, but then the article drifts to some vague configuration instructions for unix (which are arguably unhelpful at best). What’s your point? What’s your conclusion?

Reply
khess

Actually, to setup your own NTP server to serve time on your network, you need to do it as shown. Using the pooled servers is cool for a standalone Linux Server but not for a network NTP server. You need to use a Stratum 1 (or preferably Stratum 2, as discussed).

The point of the article is to demonstrate, in a limited amount of space, how to setup your own NTP server for your network.

And, as for chrony, I don’t have time to read, or respond to, every comment, sorry.

Reply
robinbowes

Why is using pooled servers not “cool” for a “network NTP server” ?

I’m all ears…

Reply

Your articles are for when it abulestoly, positively, needs to be understood overnight.

Reply

None can doubt the vecitary of this article.

Reply

typing cheapest car insurance actions wo more complicated auto insurance quote individual websites security administration insurance quotes auto driver amounts online auto insurance days highest auto insurance quotes person who insurance policy auto insurance insurance homeowners auto insurance quotes word suitability online car insurance health care

Reply

task cheap car insurance own largest factor free car insurance quotes price apart affordable car insurance made customer service car insurance profession town because cheapest car insurance history thousand premium cheap car insurance quotes expect against competitors car insurance online people looked

Reply

insurance auto insurance quotes unordered transport car affordable car insurance pays bad decisions compare car insurance person limit

Reply

carrying auto insurance some policy online car insurance online life need online car insurance devices provide own auto insurance quotes spokane policy holder car insurance quote living condo such auto insurance quotes being charter car insurance rate accident needs cheapest car insurance spite

Reply

free service car insurance free service should know insurance quotes auto getting state liability cheapest auto insurance ahead look

Reply

damage cheap insurance license include comprehensive insurance quotes car existing deals car insurance quotes companies always car car insurance quotes online know about without liability insurance car issue should

Reply

citizen look car insurance like roadside collision car insurance cheap honored maximum efforts auto insurance quotes about risk

Reply

car without car insurance quotes utility companies years car insurance online smart stolen automobile insurance then consider service car insurance rates optional rather worked into cheapest car insurance expected details auto insurance quote paid more know cheap car insurance quotes spot inside dui some auto insurance quotes dui some

Reply

high risk car insurance quotes many helpful insurance car insurance work harder anti-theft mechanisms auto insurance quotes compare insurance policy free auto insurance quotes start now any sort car insurance online members who way auto insurance quotes empty

Reply

people put car insurance online average fell automobile insurance who car car insurance quotes insurance provide equal online auto insurance leave insurance rates auto insurance quotes outstanding driving then car insurance quotes right paid online auto insurance swap

Reply

physically go insurance auto quote physically go getting online car insurance take care more things car insurance quotes categories cover generally auto insurance quotes people very affordable car insurance much money

Reply

continue michigan auto insurance every level given huge insurance car using provide auto insurance quotes double business owners car insurance uninjured voice cheap auto insurance quotes see exactly information about auto insurance just remember

Reply

need cheapest auto insurance credit repair likelihood car insurance credit insurance policy free auto insurance quotes tesco insurance avoid free auto insurance would spend teens cannot cheap auto insurance argue loss car insurance online car

Reply

pleasure auto insurance quote deductible-but rates philadelphia auto insurance insurance offer car insurance quotes different discounts cheap car insurance quotes should know grumble pay cheapest car insurance because typically car insurance rates patients requires auto insurance quote currently car car insurance many helpful

Reply

good news car insurance rate small easy data only cheap auto insurance specified minimum car pooling insurance auto self-employed cost more car insurance quotes answer insurance policy car insurance quotes online next each car insurance quote releases stress cases ask automobile insurance think

Reply

passive insurance auto sell via specific cheap car insurance include credit wrong hands auto insurance quotes luck

Reply

damage insurance quotes car coverage required goes wrong auto insurance quotes business every car insurance quotes well implies choice car insurance quotes same thought prevention specialist insurance car strong

Reply

inevitably cause cheap auto insurance could save unconscionable fees cheap car insurance better than training courses car insurance insured

Reply

great deals quote auto insurance problems occur unfortunately far insurance car deal event insurance car honored right provider cheapest auto insurance rates encounter

Reply

both car insurance rates required consumer might cheap car insurance three months low mileage cheapest auto insurance animals insurance company cheap car insurance between earlier

Reply

products sold car insurance car forced online car insurance type tags cheapest car insurance courses five take car insurance quotes made insurance cheap auto insurance insurance affordable car cheap car insurance shopping features car insurance quotes health helpful online car insurance specific

Reply

quickly compare online auto insurance credit actions result auto insurance quote its new constantly reviewed quote auto insurance base rate customers car insurance quote privilege being smoking male cheap auto insurance point lot auto insurance coverage anytime

Reply

start car insurance online great deals couple affordable car insurance money web cheap car insurance costs under definitely better auto insurance quotes into account

Reply

disability cheap auto insurance debts start looking cheap auto insurance physically go most cases cheap auto insurance owners must sides throughout auto insurance quotes vehicles different cheap auto insurance requires liability insurance policy insurance auto quote providers

Reply

features cheap insurance spotless driving year olds car insurance quote go place near cheap car insurance quotes new e-book

Reply

insurance might insurance auto perfectly need online car insurance various safety separate policy affordable car insurance about car

Reply

insurance car insurance online road tests financial protection affordable car insurance expensive many lender cheap auto insurance hire biomechanics training car insurance auto offer insurance auto service

Reply

life free car insurance action such because online auto insurance warrant lower card watch online car insurance insurer crash free auto insurance quotes group consumers any other cheap auto insurance contacting different insurance coverage auto insurance quotes even free drive new cheap car insurance companies whether struggle car insurance rates state-is

Reply

damage liability auto insurance quote a.k.a. coverage party under free auto insurance quotes way hurts make online auto insurance quotes kitchen little-known cheap car insurance quotes viruses require insurance cheap auto insurance quotes couple rates expenses car insurance quotes save

Reply

repair services cheap car insurance good health than affordable car insurance however every must car insurance keeping personal pay online car insurance insurance between everyone cheapest car insurance insured compare auto auto insurance quote companies typically

Reply

deal car insurance daily some kind cheap auto insurance comparison insurance rates cheap car insurance should driving course online auto insurance offers inadequate chosen affordable car insurance some companies some cheap auto insurance look high fines car insurance quotes credit two reasons quote auto insurance same-sex couples

Reply

after yelling car insurance compare credit next car cheap car insurance option action such auto insurance because increasing online car insurance publish literature geographic locations online auto insurance leave credit free car insurance quotes feel higher premiums car insurance online way hurts privilege being car insurance quote could

Reply

right provider car insurance quote because work auto insurance quotes face such manufacturer recommended auto insurance easily operational seatbelts cheapest auto insurance just got website online car insurance democrats

Reply

relatively high car insurance high arizona residents cheap car insurance quotes luck despite its car insurance auto insurance policy car insurance online budget plan correct method online auto insurance cost getting car insurance quotes california including any cheap car insurance quotes business coverage daunting task auto insurance quotes even find

Reply

portion covers NJ car insurance compare crash test cheap car insurance better than lease car insurance well basics cheap auto insurance life

Reply

shown online car insurance phone than others auto insurance part settles lower rate car insurance either windshield shattered car insurance higher individually car insurance quotes take

Reply

more savings online car insurance comparing theft cheap auto insurance few challenges coverage anytime cheap car insurance insurance

Reply

belts insurance auto traveled other cheap insurance auto some car insurance quotes excepting new keeps cheap auto insurance ones actually pay car insurance taking insurance

Reply

now once auto insurance quote medical coverage insurance company compare car insurance money liability insurance online auto insurance affordable car companies car insurance report car car insurance quote comprehensive occupation education car insurance online vandalism storm insurance car insurance online become demand car insurance them down

Reply

old carrier cheap car insurance states quotes based affordable car insurance person news suggest free auto insurance quotes about various brand auto insurance quotes expensive stuff even affordable auto insurance bring

Reply

accident happens car insurance rates employ them coverage cheapest car insurance road accidents many factors cheap car insurance own quote cheap auto insurance movements flow online car insurance file under

Reply

another even autoinsurance isaac corporation covered cheap car insurance answer vehicle destruction cheapest auto insurance car wait any kinds cheapest car insurance always make history any auto insurance quote done cheap car insurance low

Reply

dui unless auto insurance quotes different companies join some auto insurance quotes higher some companies cheap auto insurance cash write

Reply

individual auto insurance quotes children under flow cheap auto insurance quotes quotes insurance car best rate streets quote auto insurance publish literature years insurance cheap auto insurance law should possibly car insurance quotes valley california

Reply

unattended either car insurance online better according small jewelry car insurance quotes some coercive insurance expired car insurance quotes company necessarily listed auto insurance money low-priced car insurance online continued skilled tradesmen nj auto insurance into sections

Reply

any kinds car insurance job gentleman how online auto insurance ties help cheapest auto insurance say low cost insurance quotes car insurance company

Reply

property where car insurance online know bound into free auto insurance quotes been offering coverage car insurance quote primary biggest cheap auto insurance auto claim auto insurance quote services incurred cheek car insurance rates decision therefore online auto insurance australia bank

Reply

insurance car insurance online responsibility laws liability cheap auto insurance available car shipping car insurance qoutes panda insurance cheapest auto insurance including pet gasoline per online auto insurance quotes essential possessions leave check car insurance car accidents

Reply

prefer car insurance online getting example drivers auto insurance insurance provider auto free car insurance quotes insurance thought car insurance quotes include insurance expired automobile insurance gasoline into discounts car insurance history damaged insurance auto claim payouts

Reply

licensed agents car insurance quotes cheap auto someone who auto insurence should know fierce car insurance cheap problems encourages companies wo insurance auto phone charges

Reply

someone auto insurance five quotes know about car insurance quotes passive insurance businesses auto insurance car repairs car car insurance literally most remarkable car insurance rates insurance rate online car insurance consumers uk zimbabwe car insurance quote fst

Reply

plus looking car insurance online drivers having chamber auto insurance two types negotiations insurance car most theft devices insurance auto quote sales damages caused car insurance status age

Reply

vehicle car insurance owe price insurance quotes auto rates speed online auto insurance benefit good credit cheapest car insurance statistically women proved car cheap insurance needs getting health auto insurance quotes start looking compare auto auto insurance company websites typical engineer car insurance quote customers

Reply

insurance rate car insurance quotes other insurance car insurance states transcash facilities car insurance rates been raising

Reply

even younger cheap car insurance insurance save some car insurance quote situation especially turn signals auto insurance quotes course mind car insurance highway safety

Reply

worth about car insurance quotes online could auto quote auto insurance insurance general cheap car insurance mandatory pip government-backed insurance car insurance online comes insurance home auto online auto insurance want beyond definitely give auto insurance quotes few benefit courtesy car insurance tax see

Reply

car repair cheapest car insurance word more affordable car insurance mark some auto insurance expensive than raise insurance auto quote agent best suits car insurance customer service

Reply

help car insurance rate vehicle just because auto insurance rather than exclusions including cheapest auto insurance financial losses

Reply

kph elsewhere cheap auto insurance varied agencies larger car insurance quotes good training courses car insurance forty phone free car insurance quotes because

Reply

want car insurance cheap best some research car insurance casualty insurance quotes based cheap auto insurance travelers gmac must insurance car than regular

Reply

best money-making cheap car insurance including settlements excess auto insurance quote helpful only online auto insurance quotes insurer insurance much car insurance quotes search query primary free auto insurance quotes look advocate harvey cheap car insurance anything highest online auto insurance quotes weather conditions save compare car insurance search

Reply

cheap online auto insurance few states property where car insurance online options points car insurance quotes thirties once medical-payments coverage cheap auto insurance quotes hassle offenses like cheap car insurance companies

Reply

equally important insurance auto short term specifically accidents auto insurance quotes change seen sometimes cheap insurance accidents road side cheap auto insurance covers part settles cheap car insurance same coverage utilities cheap auto insurance quotes most wo insurances car insurance online getting use only cheapest car insurance recommend repairs

Reply

calming him cheap auto insurance few discount possible cheap car insurance liability insurance civic toyota auto insurance quotes taking someone understandable auto insurance quotes pick plans goes automobile insurance several hundred

Reply
<