Stratum pool server
Get via App Store Read this postbode ter our app!
Setting up a local stratum Two NTP server
I’m attempting to setup NTP on a local network that has no (and never will) internet connection. The main priority is that the machines on the network are synced with each other, even if the time they’re synced at isn’t 100% accurate.
Wij also have a requirement to use an NTP hierarchy te order to replicate the setup of a deployed system. What I want to do is have a hierarchy of machines like this:
Note that the RackCards have two ethernet ports, one connected to the Ten.1.Three.x network and one on the Ten.1.Four.x network. RackCard23, which syncs off the master server Moon will do so on the Ten.1.Three.x network and the RackCard22/23 will connect to RackCard23 on the Ten.1.Four.x network. This is because I don’t want the RackCards22/23 leaving their network to sync the time and because it replicates a final deployed system.
So far I have managed to get everything that should by syncing off Moon to sync correctly (including RackCard23).
But I am having difficulty getting RackCard22 and 23 to sync off RackCard23.
This is the output from ntptrace:
Spil you can see the machine is reporting itself spil a stratum 16 server, despite it having bot synced to a “stratum 1” server (Moon):
The configuration of the clients (RackCard21/22) looks like this:
And ntptrace gives this:
So it can’t find a suitable server because the server I’m attempting to use is reporting that it is a stratum 16 server (which I believe means non-synchronized). This is despite the fact that it is synchronized.
So I need to somehow make RackCard23 a higher stratum (Ideally stratum Two). How do I go about doing that?
Any help is much appreciated spil I have bot attempting to get this to work for days now!
I have bot restarting the ntpd, yes ,)
All the linux boxes are running CentOS Five.Four.
This is the output from the guidelines you suggested. Firstly from the server:
And then from client:
Spil Chris mentioned, the stratum 16 indicates a server hasn’t actually sync’d with a server. Just to be certain, you did restart the ntp services, right? ( service ntpd restart ) I’m not attempting to insinuate you miss the effortless stuff, but I always do!
Can you postbode the output of a few more directions to help diagnose?
ntpq -p on the client &, server. Should vertoning what servers it has configured, spil well spil stats for those servers.
ntpdc -c monlist on the server. Should showcase the clients connected.
Also, since you didn’t mention an OS, I’m running with RHEL style instructions. Let mij know if you’ve got something different.
OK, watching your output, here’s your problem: You don’t have a stratum 1 server. Te fact, the “Moon” is using it’s local clock. It’s reporting itself spil a stratum 16 server. For your reference, a Stratum1 server would have a local GPS or atomic clock. Do you have one of those? Otherwise, Moon needs to synchronize it’s clock with ANOTHER ntp server. If it doesn’t have network access, you’ll need to fudge its stratum. (This requires you not to care too much about ‘true’ time. Which you don’t, but anyone else reading this should note that.)
On Moon, add the following line to your ntp.conf opstopping: fudge 127.127.1.0 stratum Ten . This will make it report its local clock spil stratum Ten. Which will make all the other servers use it overheen their local stratum 16 clock.
May be out of topic, a local Stratum Two server requires connection to a Stratum 1 server and within your isolated network, you don’t have one.
You can get a cheap GPS module and an Raspberry Pi, a single-board rekentuig with minimal power consumption and ample interfacing capability. Hook your GPS module to the Raspberry Pi and join the Pi into your network, with decent software, it can be your Stratum 1 NTP server that your Stratum Two server, or since you have it inwards your network every rekentuig, sync time with.
NTPd will set it’s own stratum according to:
- If the local clock’s drift has not bot assessed, set stratum to 16. This process takes about 15 minutes on a normal server, after which it proceeds to the next step.
- Connect to all configured time servers, assess which ones are reliable (and therefor preferred), set local stratum to the lowest reliable server’s stratum plus one. So if the lowest reliable server found is 1, then local will be Two.
(This is not necessarily the order of the events, but the order te which they are processed for the purposes of setting the local stratum.)
(Also, stratum 16 does not necessarily mean it’s unsynchronized).
Spil a kleintje of aside, I’ll include some analysis of your ntpq output. Just to help generic troubleshooting ter the future, for yourself and others.
Very first, from your server:
The very first katern indicates the two servers this machine is configured to sync to. Notable is the lack of * or + that would indicate a synchronized peer, or secondary candidates. This means your server isn’t going to be using the entries here, but it is at least checking te with them.
Katern three, “st”, indicates the stratum of those servers. Ter this case, that indicates that both those machines are using their local clock. (default stratum of 16) The last three columns would indicate how far off the two clocks are. Either te a “seconds difference ter clocks” value, or the latency inbetween the two machines, to the difference ter that latency. Here, higher numbers are worse.
The reason for non-sync’d entries like this can depend on some factors: If the offset ter clocks is too much, then ntp won’t even attempt, since it would introduce too big a hop te the local time. If jitter gets to bad, the client will desync, until things stabilize. (This is usually makeshift, and yet, reoccuring) Alternately, spil te your case, if the configured servers have equal or higher stratum values, indicating they are less reliable spil time sources, then the client won’t use them.