[ASK] NTP Set up

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat [ASK] NTP Set up
# 1  
Old 01-25-2010
[ASK] NTP Set up

Hi,

I would like to set up NTP locally in my servers and client locally. I have no internet connection, what I want to do is all my servers synchronized to one server. lets say I have 5 servers, so 1 of this will be act as a master while the rest is client. I only want those clients to get the time from the server itself.

I tried to configure in /etc/ntp.conf but somehow my configuration wont works. Is there anyone of you have the working configuration that I can use?

lets say
my server IP is 192.168.10.20 (master/server)
my 1st client IP is 192.168.10.30 (client-I want this to sync with the master)
my 2nd client IP is 192.168.10.40 (client-I want this to sync with the master)
and so on...

Please help me on this, I've been trying to configure but somehow it just refuses to.
# 2  
Old 01-30-2010
Lightbulb

Hi flekzout,

This may be of help:

<snip>
29.10.3 Configuring Your Machine

29.10.3.1 Basic Configuration
If you only wish to synchronize your clock when the machine boots up, you can use ntpdate(8). This may be appropriate for some desktop machines which are frequently rebooted and only require infrequent synchronization, but most machines should run ntpd(8).

Using ntpdate(8) at boot time is also a good idea for machines that run ntpd(8). The ntpd(8) program changes the clock gradually, whereas ntpdate(8) sets the clock, no matter how great the difference between a machine's current clock setting and the correct time.

To enable ntpdate(8) at boot time, add ntpdate_enable="YES" to /etc/rc.conf. You will also need to specify all servers you wish to synchronize with and any flags to be passed to ntpdate(8) in ntpdate_flags.

29.10.3.2 General Configuration
NTP is configured by the /etc/ntp.conf file in the format described in ntp.conf(5). Here is a simple example:

server ntplocal.example.com prefer
server timeserver.example.org
server ntp2a.example.net

driftfile /var/db/ntp.drift
The server option specifies which servers are to be used, with one server listed on each line. If a server is specified with the prefer argument, as with ntplocal.example.com, that server is preferred over other servers. A response from a preferred server will be discarded if it differs significantly from other servers' responses, otherwise it will be used without any consideration to other responses. The prefer argument is normally used for NTP servers that are known to be highly accurate, such as those with special time monitoring hardware.

The driftfile option specifies which file is used to store the system clock's frequency offset. The ntpd(8) program uses this to automatically compensate for the clock's natural drift, allowing it to maintain a reasonably correct setting even if it is cut off from all external time sources for a period of time.

The driftfile option specifies which file is used to store information about previous responses from the NTP servers you are using. This file contains internal information for NTP. It should not be modified by any other process.

29.10.3.3 Controlling Access to Your Server
By default, your NTP server will be accessible to all hosts on the Internet. The restrict option in /etc/ntp.conf allows you to control which machines can access your server.

If you want to deny all machines from accessing your NTP server, add the following line to /etc/ntp.conf:

restrict default ignore
Note: This will also prevent access from your server to any servers listed in your local configuration. If you need to synchronise your NTP server with an external NTP server you should allow the specific server. See the ntp.conf(5) manual for more information.
If you only want to allow machines within your own network to synchronize their clocks with your server, but ensure they are not allowed to configure the server or used as peers to synchronize against, add

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
instead, where 192.168.1.0 is an IP address on your network and 255.255.255.0 is your network's netmask.

/etc/ntp.conf can contain multiple restrict options. For more details, see the Access Control Support subsection of ntp.conf(5).
<snip end>


You can check out the following link for detailed information:

Clock Synchronization with NTP


I hope this is of help

Jnike
Login or Register to Ask a Question

Previous Thread | Next Thread

9 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. Shell Programming and Scripting

Help needed with shell script to search and replace a set of strings among the set of files

Hi, I am looking for a shell script which serves the below purpose. Please find below the algorithm for the same and any help on this would be highly appreciated. 1)set of strings need to be replaced among set of files(directory may contain different types of files) 2)It should search for... (10 Replies)
Discussion started by: Amulya
10 Replies

3. HP-UX

Setting up NTP HP-UX clients from solaris NTP server

Hi I wonder if its possible to setup NTP clients running HP-UX o.s. from a solaris 10 NTP server? FR (3 Replies)
Discussion started by: fretagi
3 Replies

4. 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

5. UNIX for Dummies Questions & Answers

How to set server's ip address, router, network mask and set if it is an internal or external ip?

Hello, I need to write a program which sets server's ip address, router, network mask. Program also should set if it is an internal or external ip. Maybe someone can help me ? Any information from u is very useful :b: I stopped at .. :( #!/bin/sh A=`hostname -i` echo "server ip address is $A"... (4 Replies)
Discussion started by: zagaruika
4 Replies

6. Emergency UNIX and Linux Support

[ASK] Redhat NTP Set up

Hi, I would like to set up NTP locally in my servers and client locally. I have no internet connection, what I want to do is all my servers synchronized to one server. lets say I have 5 servers, so 1 of this will be act as a master while the rest is client. I only want those clients to get the... (7 Replies)
Discussion started by: flekzout
7 Replies

7. 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

8. UNIX for Advanced & Expert Users

set up NTP

I am going to set NTP on sun solaris 8 and 9 servers. There Oracle Databases on hose server. Any Impact to Oracle DBs with NTP. Thanks. (2 Replies)
Discussion started by: sriny
2 Replies

9. Solaris

ntp server and ntp client

All, How do you set a Solaris 9 server which received ntp updates from a ntp server to broadcast them on a local subnet. I have created a /etc/inet/ntp.conf file to receive the updates from a server on network and need to make this server become like a ntp relay from the main server. Any... (1 Reply)
Discussion started by: bubba112557
1 Replies
Login or Register to Ask a Question