On 2007-02-27, muruga <[EMAIL PROTECTED]> 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 Distribution. > 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 127.127.1.0 | fudge 127.127.1.0 stratum 10 > restrict 127.0.0.1 > restrict 192.168.0.0 mask 255.255.0.0 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 127.0.0.1 > 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 192.168.0.1 Append 'iburst' on the server line to speed up sync (from ~5 minutes to ~20 seconds): | server 192.168.0.1 iburst > restrict 127.0.0.1 > restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap #serve lan > clients I'd use: | restrict default nomodify notrap nopeer | restrict 127.0.0.1 > 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 <[EMAIL PROTECTED]> NTP Public Services Project - http://ntp.isc.org/ _______________________________________________ questions mailing list [email protected] https://lists.ntp.isc.org/mailman/listinfo/questions
