Score:1

Domain Time Skew

tg flag

A few months ago I attempted to get time straightened out in our environment but I never really got it working correctly. We have 4 domain controllers and the time difference always seems to be anywhere from 30 seconds off up to 300 seconds off. It randomly seems to correct itself then start to drift again. Time on workstations always seems to be 1 to 2 minutes off.

I used this guide. https://community.spiceworks.com/how_to/65413-configure-dc-to-synchronize-time-with-external-ntp-server

Here's some additional information.

PDCe: Physical Machine

DC2: VM

DC3: VM

DC4: VM

The virtual DCs are set to not sync time with their host.

Here's the w32tm /query /configuration from each DC.

PDCe


EventLogFlags: 2 (Local)
AnnounceFlags: 5 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 6 (Local)
MaxPollInterval: 10 (Local)
MaxNegPhaseCorrection: 172800 (Local)
MaxPosPhaseCorrection: 172800 (Local)
MaxAllowedPhaseOffset: 300 (Local)

FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 7 (Local)
UpdateInterval: 100 (Local)

FileLogName: C:\Windows\Temp\w32time.log (Local)
FileLogEntries: 0-116 (Local)
FileLogSize: 268435456 (Local)

[TimeProviders]

NtpClient (Local)
DllName: C:\Windows\SYSTEM32\w32time.DLL (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Local)
ResolvePeerBackoffMaxTimes: 7 (Local)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 1 (Local)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 3600 (Local)
Type: NTP (Local)
NtpServer: time.nist.gov,0x1 time-a-g.nist.gov,0x1 time-a-wwv.nist.gov,0x1 time-a-b.nist.gov,0x1 (Local)

NtpServer (Local)
DllName: C:\Windows\SYSTEM32\w32time.DLL (Local)
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)

DC2


EventLogFlags: 2 (Local)
AnnounceFlags: 10 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 6 (Local)
MaxPollInterval: 10 (Local)
MaxNegPhaseCorrection: 172800 (Local)
MaxPosPhaseCorrection: 172800 (Local)
MaxAllowedPhaseOffset: 300 (Local)

FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 7 (Local)
UpdateInterval: 100 (Local)


[TimeProviders]

NtpClient (Local)
DllName: C:\Windows\SYSTEM32\w32time.DLL (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
CrossSiteSyncFlags: 2 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Local)
ResolvePeerBackoffMaxTimes: 7 (Local)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 1 (Local)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 1024 (Local)
Type: NT5DS (Local)

NtpServer (Local)
DllName: C:\Windows\SYSTEM32\w32time.DLL (Local)
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)

VMICTimeProvider (Local)
DllName: C:\Windows\System32\vmictimeprovider.dll (Local)
Enabled: 0 (Local)
InputProvider: 1 (Local)

DC3


EventLogFlags: 2 (Local)
AnnounceFlags: 10 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 6 (Local)
MaxPollInterval: 10 (Local)
MaxNegPhaseCorrection: 172800 (Local)
MaxPosPhaseCorrection: 172800 (Local)
MaxAllowedPhaseOffset: 300 (Local)

FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 7 (Local)
UpdateInterval: 100 (Local)


[TimeProviders]

NtpClient (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
CrossSiteSyncFlags: 2 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Local)
ResolvePeerBackoffMaxTimes: 7 (Local)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 1 (Local)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 1024 (Local)
Type: NT5DS (Local)

NtpServer (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)

VMICTimeProvider (Local)
DllName: C:\Windows\System32\vmictimeprovider.dll (Local)
Enabled: 0 (Local)
InputProvider: 1 (Local)

DC4


EventLogFlags: 2 (Local)
AnnounceFlags: 10 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 6 (Local)
MaxPollInterval: 10 (Local)
MaxNegPhaseCorrection: 172800 (Local)
MaxPosPhaseCorrection: 172800 (Local)
MaxAllowedPhaseOffset: 300 (Local)

FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 7 (Local)
UpdateInterval: 100 (Local)


[TimeProviders]

NtpClient (Local)
DllName: C:\Windows\SYSTEM32\w32time.DLL (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
CrossSiteSyncFlags: 2 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Local)
ResolvePeerBackoffMaxTimes: 7 (Local)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 1 (Local)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 1024 (Local)
Type: NT5DS (Local)

NtpServer (Local)
DllName: C:\Windows\SYSTEM32\w32time.DLL (Local)
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)

VMICTimeProvider (Local)
DllName: C:\Windows\System32\vmictimeprovider.dll (Local)
Enabled: 0 (Local)
InputProvider: 1 (Local)

Anyone have any ideas? I'd greatly appreciate any help.

cn flag
Enable Windows Time Service logging on the DC's. Also the /status /verbose switches provide more information. When you say "off", that needs to be relative to the DC, not the actual time. If time on a workstation is the same as the time on the DC that it is synchronizing from, that is the expected result even if the time is incorrect. #1 get the PDCE working. #2 get the other DC's working. https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/turn-on-debug-logging-in-windows-time-service
Rebound4750 avatar
tg flag
@GregAskew, thanks for the reply. I'm enabling logging on all the DCs now. The time is off relative to the DCs, not the actual time.
Score:0
cn flag

Are you saying the DCs are drifting from the PDCE as well?

Firstly, I suggest configuring the peer list on the PDCE to use 0x8 rather than 0x1.

w32tm.exe /config /syncfromflags:manual /manualpeerlist:time.nist.gov,0x8 time-a-g.nist.gov,0x8 [...] /reliable:yes /update

In the System event log, does the PDCE show it's successfully syncing time? I suggest filtering the log source to show events from Time-Service.

There should be one event 35 for each of the peers you have configured to show they're syncing time. Then followed by Event 37 for each peer to say the PDCE is receiving valid time. You may need to run w32tm /resync /rediscover or restart the service to trigger the events.

Check the peers too: w32tm /query /peers.

If any show State: pending, run w32tm /query /status and check each peer for a Last Successful Sync Time a long time in the past (e.g. more than an hour). If that's the case, you might have a networking issue or it's a bad source.

Next, does the PDCE show Events 139 followed by 143 (event 12 might appear as a temporary warning before 143), showing that it is advertising as a time source and then a good time source? At this point, the PDCE is advertising correctly. Or it should be. This can take a few minutes after rediscovering/restarting the service. Make sure there is no 144 event after 143 - this means the PDCE has stopped advertising as a time source.

Next, on your other DCs, run w32tm /query /peers. Check there's just the one peer (PDCE), that the state is Active, and that the Time Remaining is less than the PeerPoll\HostPoll intervals. Which is 1024 for yours, it seems.

C:\> w32tm /query /peers
#Peers: 1

Peer: PDCE.xxx.au
State: Active
Time Remaining: 593.4024152s
Mode: 1 (Symmetric Active)
Stratum: 2 (secondary reference - syncd by (S)NTP)
PeerPoll Interval: 10 (1024s)
HostPoll Interval: 10 (1024s)

In the System event log, the last Time-Source events should be 35 or 37, to say the DC is getting time from the PDCE. There should be a 139 event to say it's advertising as a time source. There should not be a 143 event (advertising as a good time source) unless it's most recently followed by a 144 warning (it's stopped advertising as 'good').

If there are any issues with any of the above, check that the NTP ports are open between the DCs - UDP 123. Obviously, if the PDCE isn't getting time from its upstream sources, check the port as well. There may be a local timesource you should use instead (we use the one configured internally as part of our DNS/DHCP solution managed by the Networks team, which is downstream from the Stratum 1 clock in our region).

If the most recent time events are warnings or errors on the DC - 35/37 aren't the most recent time events on the non-PDCEs - those will be worth investigating.

If the DCs are all fine with time sync, then the next thing is to look at the clients.

By the way, it's good to configure this with Group Policy. I highly recommend that there's a GPO targeted to the PDCE so that if you move the role, the time config goes with it. I also have a "default" time GPO just as a fallback in the DC policies - it's just the usual defaults - but really there to ensure that a former PDCE gets the regular time config back after the FSMO is moved. But GPOs can be done later, once the DCs are happy.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.