Visit Our UNIX and Linux User Community

Questions about the NTP time server sync

Thread Tools Search this Thread
Operating Systems Linux Questions about the NTP time server sync
# 1  
Old 01-30-2012
Questions about the NTP time server sync

Hi folks, I have developed a Linux server for my customer. After migrating the server to my customer site, I was trying to sync its time to the NTP time servers at my customer site.
Below is the ntp.conf:
% vi /etc/ntp.conf
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict -6 ::1
# Hosts on local network are less restricted.
#restrict mask nomodify notrap
# Use public servers from the project.
# Please consider joining the pool.
server # NTP server 1
server # NTP server 2
server # External NTP server 3
#broadcast key 42 # broadcast server
#broadcastclient # broadcast client
#broadcast key 42 # multicast server
#multicastclient # multicast client
#manycastserver # manycast server
#manycastclient key 42 # manycast client
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
server # local clock
fudge stratum 10
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift
# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys
# Specify the key identifiers which are trusted.
#trustedkey 4 8 42
# Specify the key identifier to use with the ntpdc utility.
#requestkey 8
# Specify the key identifier to use with the ntpq utility.
#controlkey 8

I could ping the ip addresses of the time servers from the Linux server.
However, the server time is still unable to sync with any of the time servers.

1. Do i need to execute the following command for the 1st time to sync the server to the time servers?
$su -
#<type the root password>
#service ntpd stop
#ntpdate -u <ip of the server with which you want to synchronise>
#ntpdate -u <ip of the server with which you want to synchronise>
#ntpdate -u <ip of the server with which you want to synchronise>
#service ntpd start
2. Can you also advice how long does it take for the Linux server to sync to the time servers?

3. Do we need to stop ntpd and manually synchronize the time?

Thanks Smilie
# 2  
Old 01-31-2012

1. restarting ntp daemon on the local server should suffice for the daemon to re-read its configuration file. Check if ntp server are behind a firewall (udp port 123 needs to be open for connecctions fromyour local server to the ntp server).

2. it may vary, but usually I saw synchronization after a few minutes (you can also query with ntpq -p to see infos about the peers).

3. no, see answer 1.

anyway, which distro/version are you running on the local linux server?

see ya
# 3  
Old 02-01-2012
Hi Fra, thanks for your reply.
Can you advise me whether is there an interval time for subsequent sync?
If yes, how can i change the interval time?

---------- Post updated at 06:51 PM ---------- Previous update was at 04:24 PM ----------

What is the max & min polling interval?
How can i change it on the Linux server?

Previous Thread | Next Thread
Test Your Knowledge in Computers #278
Difficulty: Easy
A monolithic kernel is an operating system architecture where the entire operating system is working in kernel space.
True or False?

10 More Discussions You Might Find Interesting

1. Red Hat

Ntp client sync with local over ntp server

Hi, I have two ntp servers in my cluster and I want all the nodes in my cluster to sync with either of the ntp servers or just one. Unfortunately it keep rotating the sync, between my ntp server 1, ntp server 2 and local. Is there anyway I can change the sync to avoid local? # ntpq -p ... (3 Replies)
Discussion started by: pjeedu2247
3 Replies

2. Linux

How often does Linux NTP server update its time with the external NTP server?

All here, thank you for listening. Now I've set up a Linux NTP server by adding a external windows NTP server in /etc/ntp.conf. Then I start the ntpd daemon. But how often does the Linux NTP server update its time with the external NTP server? I've looked up everywhere but found no information... (1 Reply)
Discussion started by: MichaelLi
1 Replies

3. Red Hat

ntp error: time sync and frequency error

Hi Expert, One on my server keep logging this error below, how to fix this issue? Thank you. Reggy. pluton02:/home/reggy --> sudo grep "ntpd" /var/log/messages | tail Oct 6 00:26:18 pluton02 ntpd: time reset -6.588403 s Oct 6 00:26:18 pluton02 ntpd: frequency error -512 PPM exceeds... (0 Replies)
Discussion started by: regmaster
0 Replies

4. Solaris

NTP time sync in Solaris 10

Ok, I have 4 production systems. There is one NTP server for all four systems. In each system there is one Solaris 10 box that points to that NTP server. All of the other machines in the system point to the Solaris 10 machine to get their time sync. All four Solaris 10 machines have essentially... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

5. UNIX for Advanced & Expert Users

How to set NTP server to +1 hour time?

Hello, colleges! I need to synchronize time on several thousands device (UTM-1 Edge Appliances - All inclusive, all secure, all branch offices.) which don`t understand summer time at all. But in my country summer time are used. I plan to sync it with NTP server with modificated time: plus one... (2 Replies)
Discussion started by: chmelvv
2 Replies

6. UNIX for Advanced & Expert Users

Sync Time/date with NTP server

Hello all, What would be the most convienint and proper way on syncing up the time and date on Solaris 8 servers with an NTP server? Any help would be appreciated. Thanks (2 Replies)
Discussion started by: Sunguy222
2 Replies

7. SuSE

unable to sync the time with ntp server

Hi folks, The server time is no tgetiing synched up with the NTP server. I tried ntpdate -u <ipadress> this is not working. please help out. regards, Sag. (7 Replies)
Discussion started by: sag71155
7 Replies

8. UNIX for Dummies Questions & Answers

3 questions about NTP server

Folks; I'm setting up a new NTP server to sync time for our network. I have one Linux server that needs to point to that NTP server My 3 questions are: 1. I added the IP address for the NTP server to the "/etc/hosts" file on the Linux server. Is that all i need to do to make the Linux server... (5 Replies)
Discussion started by: Katkota
5 Replies

9. UNIX for Advanced & Expert Users

How To Provide Time Sync Using Nts-150 Time Server On Unix Network?

can anybody tel lme,how to instal NTS -150 on a unix network,it needs some patch to fetch time frm serve,,?? (2 Replies)
Discussion started by: pesty
2 Replies

10. UNIX for Dummies Questions & Answers


Is there a utility which offers the ability to utilize NTP to sync time on machine. If so please point to man page or web site (3 Replies)
Discussion started by: SmartJuniorUnix
3 Replies

Featured Tech Videos