Ntp configuration

Hello every body
I’ve a peer to peer LAN and want to sycronize the computer’s clock on it
I use the open suse 12.2 and the LAN is isolated i.e. not connected to internet.
But i couldn’t run the ntp server even by help of http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.netz.xntp.html and some other links.
can anybody help me?
thanks :slight_smile:

I am not sure that I completely understand you. But as you say you only read some documentation, didn’t you try YaST > Network Services > NTP to see if it provides you with the feature you want?

i’ve read documentation and test the ntp in yast in an isolated local area network, but i couldn’t get a succeed result…
i don’t know what’s problem
notice that the network not coonected to internet

you and any other friends can make me happy :slight_smile: i’ll wait for your help:)

Sorry, but that is not much more then “it does not work!”.

Please describe what you did, what you expected to happen and what happened instead.

When I try to imagine what you did, I see two systems before my eyes, both with NTP switched on and one configured to synchronize with the other. When that is the case, please tell w hat you filled in in that YaST page and show both configurations:

su - -c "grep -v '^#' /etc/ntp.conf"

and show that the NTP deamon is running on bothe systems:

ps -ef | grep ntpd

Did you check from the YaST page of the client to see if the server can be synched with?

How did you come to the conclusion that it does not work?

On 2014-03-23 07:46, icteta wrote:

> i’ve read documentation and test the ntp in yast in an isolated local
> area network, but i couldn’t get a succeed result…
> i don’t know what’s problem
> notice that the network not coonected to internet

Well, we can not guess what the problem is, if you don’t even say the
symptoms. Saying “does not work” is saying nothing.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Thanks and you are right
I should tell more detail

I have some pc’s that have the ip range 192.168.0.x. the network doesn’t have any server system, i.e the network is peer2peer and the network is isolated i.e. not connected to internet…

most of them have oensuse12.2 linux os that each of them have yast2 nt server and two of them have windows 7.

I should do two jobs:
First: syncronize the pc’s with opensuse linux
Second: syncronize all pc’s with any os system
Now my job is to solve the first problem

In the below pictures i used yast2 ntp server to syncronize that steps are shown sequentilay.

But in this way and in the 3rd step when i chose Local NTP Server, in the 5th step i face to an error that tell me “No Ntp server has been found in my network”

I don’t know whats the problem and what should i do.
Also i don’t know how could i my job in yhe second step by chosing “peer” radio button
in the network all systm are connected by a switch, but the system with opensuse os can’t communicate to themself
For example to share a file in my opensuse os, I first put this file in a system by win7 os, then any other by an other opensuse os take from win7 os

Now i’m on vacation an not access to system to show the files content

It’s very important for me to solve the proplem before next 10 days.
I wish you help me and thank you alot

1st:
http://s0.uploads.im/r1B8O.png

2nd:
http://s0.uploads.im/D0ZQy.png

3rd:
http://s0.uploads.im/etFEU.png

4th:
http://s0.uploads.im/5aRTN.png

5th:
http://s0.uploads.im/A6RPg.png

I d not understand what you mean with

the network doesn't have any server system, i.e the network is peer2peer

but I assume that that does not matter and hat it is a normal TCP/IP LAN.

Do not use that Local vs. Remote menu. Just fill in the IP address of the server you want to use in that field and click OK.

When you choose Local, it wiill go and scan your LAN for an NTP server. As long as there isn’t one that should give you the error message.

I hope I understand you correctly:

  • you have a LAN with several systems;
  • one of those systems is the leading one in having the correct time;
  • the other systems have to use NTP to synchronize to that one NTP server.

When this is what you want, then you have to start NTP on all the systems in the way you do it with YaST.
On the master/NTP server use 127.127.1.0 as the server address.
On the other systems use the IP address of the server.

That hould work IMHO.

BUT!
I asked you the oupuut of two commands and you did not do that.

I also asked you:

How did you come to the conclusion that it does not work?

But you did not answer that.

Remind that not answering to questions asked here by people who spend their spare time in helping you might lead to people ignoring you. It is not nice to get no answers when one tries to help. >:)

On 2014-03-24 08:16, icteta wrote:

> But in this way and in the 3rd step when i chose Local NTP Server, in
> the 5th step i face to an error that tell me “No Ntp server has been
> found in my network”

Well, you do need at least one machine to be an ntp “server”. No, peer
to peer is out of the question here. It is not “optionable”, so forget it.

One machine (or several) has to be the time source of reference to the
rest. Normally, you provide that reference from internet, but your
network is isolated.

Thus you need to buy a hardware reference clock that can then be read by
the ntp server machine. This would preferably be an atomic clock, which
I assume you can not afford :wink: so the alternatives would be some very
expensive quartz clocks in controlled ovens, some types of radio clocks,
and recently, a GPS module. And maybe more I don’t know about.

(Hint: a real hardware RS232 port is better in this situation than USB,
for reading external clocks)

I’d recommend you read the NTP documentation, package “ntp-doc”. And if
you have doubts, you should consider asking those people instead of us,
as this is somewhat specialized knowledge. Just a quick look at that
documentation finds hundreds of references to “reference clocks”, and
GPS clocks.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I assume your interpretation that you need an atoomic clock (or similar) is a bit exaggerated. I read nowhere that the OP needs his LAN sytems synchronized to a high degree with the “real” time.
There is a perfect case for wanting your own system all have the same time without that time being synced with the outside world where you have not even direct contact with.

On 2014-03-24 19:26, hcvv wrote:
>
> I assume your interpretation that you need an atoomic clock (or similar)
> is a bit exaggerated.

You missed the smiley :wink:

So to clarify: that part was a joke.

> I read nowhere that the OP needs his LAN sytems
> synchronized to a high degree with the “real” time.
> There is a perfect case for wanting your own system all have the same
> time without that time being synced with the outside world where you
> have not even direct contact with.

You need a reliable reference clock, at lest one that NTP considers as a
valid reference. Another NTP server is valid, as long as in the end they
find a stratus 1 server, which has to be connected to an external
reference, which typically these days means a GPS clock.

You can not start NTP if it does not locate a reference, it bails out.

You can try to define arbitrarily one machine as stratus 1, without
external reference, which means that it would have to use “local”, as a
kind of self-bootstrapping. Dunno if this would start, and if it does,
the network would be unstable. If there is jitter on the machine defined
as stratus 1, the rest of the network would refuse to use it as a
reference, and sync would not be maintained.

As a minimum, you need a standalone, reliable quartz clock, that the
stratus 1 machine reads from. The cpu clock can not be used for this, AFAIK.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

BUT!
I asked you the oupuut of two commands and you did not do that.

I also asked you:

But you did not answer that.

Remind that not answering to questions asked here by people who spend their spare time in helping you might lead to people ignoring you. It is not nice to get no answers when one tries to help. >:)[/QUOTE]

Hello every body…
Excuse 4 for my delay, i was too busy and couldn’t come and answer to your good reply’s …
I think i answered your question when i put some images 4 you that why “It doesn’t work?”.
But the exact reason is “I was unfamiliar to Ntp and i didn’t know anything that what should to do 4 sync. the systems, so i thought it doesn’t work”

By your good help i could solve the problem, so i thank you and other friends a lot.

But i couldn’t solve whole the problem, as i said before there are some (here 2) win7 Os that should sync. to other systems in LAN
Now i can sync. the SUSE systems together, but can’t sync. the win7 systems to them
I tried to solve this, but until now i couldn’t and don’t know what to do :slight_smile:

Hi
So the windows 7 systems don’t sync to the ntp server? AFAIK it’s a manual task via the w32tm command or a registry tweak (but you probably need to google or ask on a windows forum).
These may help;
http://www.sevenforums.com/network-sharing/294608-configure-windows-7-client-sync-more-than-1-ntp-servers.html
http://www.timetoolsglobal.com/2013/06/21/how-to-synchronize-microsoft-windows-to-a-ntp-server-1/

You could try to set up “Orphan Mode”.

6.2. Orphan mode

Orphan Mode is the stated replacement for the UndisciplinedLocalClock. It was added to ntp-4.2.2.

Orphan Mode allows a group of ntpd processes to automonously select a leader in the event that all real time sources become unreachable (i.e. are inaccessible).

Orphan Mode is enabled by adding the line tos orphan N anywhere in ntp.conf. The N specifies the stratum at which this ntpd will switch to Orphan Mode. For example, an ntpd using tos orphan 6 will not switch to Orphan Mode as long as a time source of strata 1 through 5 is reachable. The recommended value for N is 2 less than the worst-case externally-reachable source of time.

In addition to the tos orphan line all members of the Orphan Mode group must be configured in a mesh (i.e. they must all be clients / peers of each other). Any NTP association mode may be used to set up this mesh.

NTP versions prior to 4.2.4p5 and 4.2.5p101 will not start up properly in Orphan Mode unless at least one time source is configured in ntp.conf. If no time sources are specified the refid stays at .INIT. and the rootdispersion continually increases. This makes these versions unsuitable for use as stand-alone Orphan Mode servers in a time island.

NTP version 4.2.5p101 or later will start up correctly in pure Orphan Mode.

–quoted from http://support.ntp.org/bin/view/Support/OrphanMode

You might find other usefull information there.

  1. Click on the clock in your system tray, This will bring up the calendar and time
  2. Click Change date and time settings… The Date and Time dialog will appear
  3. Click on the Internet Time tab
  4. Click Change settings
  5. The Internet Time Settings dialog will appear.

Here you can select the time server, and if I remember correctly (no Windows machine around me at the moment) you can manually enter a server of your choice.

Remember, though, that the Internet Time tab does not appear if the computer is a member of a windows domain. I seem to recall that it syncs to the Windows domain controller, then.

On 2014-04-18 03:06, Fraser Bell wrote:

> You could try to set up “Orphan Mode”.
>
>>
>> 6.2. Orphan mode

Interesting…

But how reliable is such a “time island”? I don’t see what time it will
keep. I guess it takes any random computer as reference and keep sync to it.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

One machine stands as the time server. To change its time, you would do so manually, perhaps to your watch or a clock on the wall.

This is not very accurate to outside real time, but it allows you to keep all machines in the closed network synchronized to the same time. This is what the OP is trying to achieve, if I read the question properly.

You can create a drift file, as well, and tweak it to compensate for the time your in-house NTP server either loses or gains over a period of time, thus keeping your time fairly accurate.

On 2014-04-18 03:46, Fraser Bell wrote:
>
> robin_listas;2637633 Wrote:

>> But how reliable is such a “time island”? I don’t see what time it will
>> keep. I guess it takes any random computer as reference and keep sync to
>> it.

> One machine stands as the time server. To change its time, you would do
> so manually, perhaps to your watch or a clock on the wall.

If you do that while ntp is running on the island, that machine would be
kicked out. If two ntp server-clients see another ntp server-client
change time suddenly, they are bound to kick it out of the island, or
perhaps tell it to toe the line :slight_smile:

> This is not very accurate to outside real time, but it allows you to
> keep all machines in the closed network synchronized to the same time.
> This is what the OP is trying to achieve, if I read the question
> properly.

Yes, I understand that.

But computer clocks are not very reliable. They can lose cycles and
things. An island relies in a kind of majority vote.

I would not do it, frankly…

> You can create a drift file, as well, and tweak it to compensate for the
> time your in-house NTP server either loses or gains over a period of
> time, thus keeping your time fairly accurate.

If I understand it correctly, the drift file is used to compensate for
variations on the CMOS clock, so that on the next boot the system clock
is setup to the correct time. It can not be used to correct the time on
an already running system.

Unless you talk about a different drift file :-?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-04-18 03:26, Fraser Bell wrote:

> Remember, though, that the Internet Time tab does -not- appear if the
> computer is a member of a windows domain. I seem to recall that it
> syncs to the Windows domain controller, then.

Correct.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Using Orphan mode, and increasing stratum, solves the vote problem, as I recall.

Here’s what you need to add to your /etc/ntp.conf on your “local
server”:

# Use your local clock as the refclock
server 127.127.1.1 # LCL, local clock
fudge 127.127.1.1 stratum 10 # increase stratum

If I understand it correctly, the drift file is used to compensate for
variations on the CMOS clock, so that on the next boot the system clock
is setup to the correct time. It can not be used to correct the time on
an already running system.

Sorry, brain-drift! :shame:

The drift file helps initialize the chosen local time server, and xntpd handles the clock drift.Running xntpd will learn and remember the clock drift and it will correct it autonomously, even if there is no reachable server. Therefore large clock steps can be avoided while the machine is synchronized to some reference clock. In addition xntpd will maintain error estimates and statistics, and finally it can offer NTP service for other machines. Last, but not least, ntpdate cannot query a local reference clock.