50
votes
Force systemd timesyncd to sync time with NTP server immediately
Without installing any more packages...
Turn NTP off, manually set the time to be close enough, turn NTP back on:
Set NTP Service inactive
$ timedatectl set-ntp false
Set the time manually
Get the ...
30
votes
Accepted
What is NTP dispersion and how do I control it?
I see some confusion going on in the answers here. For starters, ntpclient, at least in -s mode, isn't acting as a full NTP client, it's only sending and receiving one packet, so there's no "last 8 ...
27
votes
Accepted
Force systemd timesyncd to sync time with NTP server immediately
To use an actual NTP implementation, you need to install and configure one, chrony or maybe ntpd. Do so if you require any monitoring of time performance. I will assume chrony.
Add iburst to your pool ...
25
votes
Accepted
NTP Service Auto-Discovery
You can specify an NTP server via DHCP, or Group Policy, or DNS SRV records.
DHCP:
GPO:
SRV Record:
If your client is unable to leverage any of those mechanisms... you can also pretty safely ...
23
votes
Accepted
Things to consider when running public NTP servers
Firstly, good for you; it's a helpful and public-spirited thing to do. That said, and given your clarification that you're planning on creating one or more DMZ VMs which will sync to and make ...
21
votes
Dealing with NTP reflection attacks in IPTables
Essentially, you're outta luck if the DDoS attack manages to fill whatever pipe you have to the Internet (which is the purpose of any UDP reflection attack -- to fill the pipe). If your upstream link ...
20
votes
Accepted
How to synchronize time on ESXi Windows virtual machines within one second?
This is 2018. Windows is capable of keeping servers synchronized within 2 ms or so, as required by MIFID II Regulations. So, your problem is a non-problem.
Our sysadmins using windows NTP to sync ...
16
votes
Accepted
Does installing NTP mean I'm installing an NTP server?
Short answer: Usually, if you're installing an NTP daemon, you're installing the capability to both sync the local clock, and to provide time to clients over the network. However, there are some ...
15
votes
Accepted
How to set up local ntp server without internet access on ubuntu?
Don't do this. Seriously. Just don't. People keep coming up with the idea that NTP is designed to allow a bunch of machines all to have the same time. It isn't. It's designed, quite carefully, to ...
13
votes
What is NTP dispersion and how do I control it?
Just a partial answer for "What is dispersion?":
A typical NTP round trip:
client | | server
t1 |------->| t2
t3 |<-------| t4
This yields two values, offset (the time ...
12
votes
Accepted
What are the limits of running NTP servers in virtual machines? (2010)
It is now 2023, and all of the earlier answers to this question are now wrong (and have been since at least late 2016), at least as far as Linux VMs are concerned. [The advice below may not apply to ...
12
votes
How do I point clients to the NTP server?
It's actually more important, in terms of the domain continuing to work properly, that your clients and member servers use Domain Controllers for their time source than it is that your clients have ...
12
votes
Things to consider when running public NTP servers
Firstly, congrats on an NTP question that is non-facepalm material. :-) I've included some graphs at the bottom of this post to give you a feel for things. The VM in question is set to 100 Mbps in ...
12
votes
Sync ntp immediately at boot with undiciplined clock
You can use the -g parameter. From the manpage:
-g
Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the ...
11
votes
Accepted
Getting NTP to work on AWS without opening inbound port in security group
According to the AWS Documentation you can open UDP:123 in your security group outbound only. Because security groups are stateful replies will get back to you, but no-one outside your VPC will be ...
11
votes
Accepted
Ubuntu 20.04 time sync problems and possibly incorrect status information
The timedatectl command reports that NTP is in use when either chronyd or systemd-timesyncd is enabled and running. Both of these are lightweight NTP clients suitable for most servers and workstations....
10
votes
ntp.conf pool vs server directives
The answer was given by mboehn. To clarify more: See the document he mentioned. Especially the last lines:
The pool scheme is configured using one or more pool commands with DNS
names indicating ...
10
votes
Accepted
How can I synchronize system time with a NTP server continuously?
No. It is good practice to run ntpd, because that is what it is for - to continuously keep your time as precisely sync'ed to correct time as possible, with the assistance of one or more reference ...
10
votes
Chrony time synchronization on huge time diff
If your time is way off (days or even months), time synchronization will not work ("it will take a long time") because NTP clients like Chrony adjust the clock gradually by slowing it down or ...
10
votes
Accepted
ntpd synchronizes but chronyd fails
The difference is that chronyd by default uses a random source port for each client request. If the firewall doesn't allow client requests from other ports than 123, you will need to specify the port ...
9
votes
Accepted
NTP server architecture
Depending on how critical time keeping is in your environment, you may not want server1 to be a single point of failure. If you have to take it offline for maintenance or repair for an extended period ...
9
votes
Ntpd on local network - Preventing clock drift causing high offsets
A driftfile records the frequency of the local clock, and is a good thing to have to accurately discipline it. Ubuntu /etc/ntp.conf has a driftfile by default.
Appending iburst to the server line ...
9
votes
Accepted
ntpd fails to sync TIME_ERROR: 0x41: Clock Unsynchronized
Your clock is syncing fine. The sync_ntp in your ntpq -c sysinfo proves that. The kernel messages you're referring to are transient during ntpd startup and are not anything to be worried about.
The ...
8
votes
Is there research material on NTP accuracy available?
Vested interest on my part: I'm a Meinberg agent :-)
Yes NTP can achieve an end-to-end precision down to approx. 50 us (that's microseconds) of jitter, if you sync a linux "client" on bare ...
8
votes
Accepted
Chrony doesn't appear to be syncing with the servers I've specified
The servers you've specified:
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org
are, as the names suggest, part of the NTP Pool Project. When you ...
8
votes
Accepted
Allow Active Directory users to disable datetime sync
As pointed out by @MDMarra, using a VM is a great way to go because blocking time synchronization can cause significant problems for authentication, TLS certificate validity, etc. However, for true ...
7
votes
Different offset in "ntpq -p" and "ntpdate -q"
ntpq outputs offset in milliseconds. ntpdate offset is in seconds. Your offset is therefore 209.956 ms vs. 0.207451 sec which is pretty close (209ms vs. 207ms)
7
votes
What is NTP dispersion and how do I control it?
Your dispersion and skew are enormous, there is a very large offset from the local clock to that peer. You should compare the offsets with the local date and set the clock manually.
Get ntpd running ...
7
votes
Allow Active Directory users to disable datetime sync
You really don't want to do this. Time sync is critical to Kerberos functioning properly. Unless you want authentication failures, you'll leave the system clocks where they are.
Perhaps a non-domain ...
7
votes
Accepted
NTP high-availability behind a Virtual IP
After my initial comment a slightly longer answer.
As a rule of thumb when the protocol itself, or the common implementations of said protocol, already natively support resilience, high ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ntp × 717ntpd × 160
linux × 134
time × 120
time-synchronization × 104
windows × 71
ubuntu × 48
ntpdate × 45
centos × 30
debian × 29
chrony × 29
active-directory × 28
domain-controller × 25
windows-server-2003 × 21
redhat × 21
clock-synchronization × 21
vmware-esxi × 20
windows-server-2008 × 19
windows-server-2008-r2 × 18
w32time × 18
windows-server-2012-r2 × 16
virtualization × 16
networking × 13
virtual-machines × 13
gps × 13