[ntp:questions] help req for manually setting ntpd in server and serve to ntpdate and ntpd in clients

Steve Kostecke kostecke at ntp.isc.org
Tue Feb 27 18:29:38 UTC 2007

On 2007-02-27, muruga <muruga86 at gmail.com> wrote:

> can any one help me for manually setting time in ntpd and serving
> to clients in  an isolated network

You can do this by using the Undisciplined Local Clock (LocalCLK) as the
time source on your server. Keep in mind that, when using the LocalCLK,
all of the "clients" will be chasing a drifting server.

> I have added tos orphan 5 cmd in ntp.conf file of server and starated
> ntpd.

Orphan mode is intended to provide a group of ntpds to coordinate the
best clock among themselves. Using orphan mode requires configuring it
on multiple ntpds.

> i can update time by using ntpclient

There is nothing called "ntpclient" in the NTP Reference Implementation

> and windows date utility but when i tried with ntpdate utility it
> throws a error saying server dropped: server not sync too long

That's because your server has no source of time. We'll get to that
further on.

> when i captured the received ntp packet from server the time set by
> reference source field is NULL

That means your server has no source of time.

>and stratum is 5.

That's probably due to the 'tos orphan 5' directive.

> ntp.config file for server
> tos orphan 5

The orphan line is meaningless because orphan mode has not been enabled
on any other ntpds.

You need to add this so that this ntpd will claim to be synced:

| server
| fudge stratum 10

> restrict
> restrict mask nomodify notrap #serve lan
> clients

Those restrict lines will work in the context of your sub-net. But I
think that this is better:

| restrict default nomodify notrap nopeer
| restrict

> driftfile /etc/ntp/drift
> logfile /var/log/ntp.log
> broadcastdelay 0.008

The broadcastdelay line is only useful for a broadcast client. It isn't
hurting anything, but it also has no effect.

After you correct your server ntp.conf restart ntpd. It will be ready to
serve tome to others in a little under 3.5 minutes.

> ntp.config file for client
> server

Append 'iburst' on the server line to speed up sync (from ~5 minutes to
~20 seconds):

| server iburst

> restrict
> restrict mask nomodify notrap #serve lan
> clients

I'd use:

| restrict default nomodify notrap nopeer
| restrict

> driftfile /etc/ntp/drift
> logfile /var/log/ntp.log
> broadcastdelay 0.008

My previous comment about broadcastdelay applies here, too.

> is the configrations for server and client correct do i need to add
> any other parameters in config file to successfully obtain time by
> ntpdate cmd in clients

You can't use ntpdate while ntpd is running on the same system.

If you wish to use orphan mode additional configuration is required. You
will need to add the 'tos orphan X' line to all of the participating ntpds.
You will also need to add the LocalCLK to those ntpds. And you will need
to properly set the strata.

Steve Kostecke <kostecke at ntp.isc.org>
NTP Public Services Project - http://ntp.isc.org/

More information about the questions mailing list