Sponsored Content
Full Discussion: [ASK] Redhat NTP Set up
Homework and Emergencies Emergency UNIX and Linux Support [ASK] Redhat NTP Set up Post 302389796 by flekzout on Monday 25th of January 2010 11:53:16 PM
Old 01-26-2010
Quote:
Originally Posted by Loic Domaigne
master/server ntp.conf
Code:
# A very simple client-only ntp configuration.
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10 
driftfile /etc/ntp/drift
restrict default ignore
restrict 192.168.10.20 netmask 255.255.255.0 nomodify notrap
authenticate no

client ntp.conf
Code:
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10 
driftfile /etc/ntp/drift
restrict default ignore
authenticate no
server 192.168.10.20

Don't forget to configure the /etc/ntp/step-tickers

HTH,
Loïc
Hi, thanks, I will try and get back to you, but what is step-tickers? what do I need to configure there? same configuration? Smilie

btw my drift file is located in /var/lib/ntp/drift I guess its redhat default, I check but there is no drift in directory /etc/ntp/

---------- Post updated at 12:53 PM ---------- Previous update was at 12:35 PM ----------

Hi,
I tried again but still unsuccessful, below is the configuration /etc/ntp.conf file from server and client.

This is SERVER
Code:
[root@server ntp]# more /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 ignore

# 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 127.0.0.1

# -- CLIENT NETWORK -------
# Permit systems on this network to synchronize with this
# time service.  Do not permit those systems to modify the
# configuration of this service.  Also, do not use those
# systems as peers for synchronization.
# restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict 192.168.10.20 netmask 255.255.255.0 nomodify notrap
authenticate no
client ntp.conf

# --- OUR TIMESERVERS -----


# --- NTP MULTICASTCLIENT ---
#multicastclient                        # listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 nomodify notrap
# restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap


# --- GENERAL CONFIGURATION ---
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
server  127.127.1.0     # local clock
fudge   127.127.1.0 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
broadcastdelay  0.008

#
# Keys file.  If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
#
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
# systems might be able to reset your clock at will. Note also that
# ntpd is started with a -A flag, disabling authentication, that
# will have to be removed as well.
#
keys            /etc/ntp/keys

THIS IS CLIENT
Code:
[root@client]# more /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 nomodify notrap noquery
restrict default ignore
authenticate no

# 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 127.0.0.1

# -- CLIENT NETWORK -------
# Permit systems on this network to synchronize with this
# time service.  Do not permit those systems to modify the
# configuration of this service.  Also, do not use those
# systems as peers for synchronization.
# restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap


# --- OUR TIMESERVERS -----
server 192.168.10.20

# --- NTP MULTICASTCLIENT ---
#multicastclient                        # listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 nomodify notrap
# restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap


# --- GENERAL CONFIGURATION ---
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
server  127.127.1.0     # local clock
fudge   127.127.1.0 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
broadcastdelay  0.008

#
# Keys file.  If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
#
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
# systems might be able to reset your clock at will. Note also that
# ntpd is started with a -A flag, disabling authentication, that
# will have to be removed as well.
#
#keys           /etc/ntp/keys

Both of them throwing this output

Code:
[root@server]# more step-tickers
192.168.10.20

[root@client]# more step-tickers
192.168.10.20

[root@server/client ntp]# /etc/init.d/ntpd restart
Shutting down ntpd:                                        [  OK  ]
ntpd: Synchronizing with time server:                      [FAILED]
Starting ntpd:                                             [  OK  ]

[root@server/client]# ntpdate -b 192.168.10.20
26 Jan 12:32:58 ntpdate[30963]: the NTP socket is in use, exiting


Last edited by pludi; 01-26-2010 at 02:21 AM.. Reason: code tags, please...
 

10 More Discussions You Might Find Interesting

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

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

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

4. UNIX for Advanced & Expert Users

Where to set the right "Apache" to run after reboot on a RedHat 5 machine ?!

Hi, I'am working on a RedHat server (V5) and having on it 2 Apache instances, but after each reboot i have the wrong one starting so that i have to stop it doing "httpd -k stop" and than launch the right one doing "/etc/init.d/httpd -k start". For more Details, you may see the link i inserted... (4 Replies)
Discussion started by: mehdi1973
4 Replies

5. Red Hat

[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... (1 Reply)
Discussion started by: flekzout
1 Replies

6. Red Hat

Cache line size set incorrectly - Installing Redhat 9.0

Hi everyone, my name is chinx. I am new to Linux and new to this forum. I am trying to install Red Hat 9.0 on my MSi Laptop. But when I try to boot the CD, after selecting either GUI or CLI type of installation, I get this: PCI: 00.03.3 PCI cache line size set incorrectly (32 bytes) ... ... (1 Reply)
Discussion started by: LinuxNewbs
1 Replies

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

8. Red Hat

How to set password for file using vim in Linux/redhat?

Hello All, I have one query is "How to set the password for file using vi utility in linux. Please reply to my queries. I am waiting for reply. Thanks in advance. Thanks. Kuddus Shaikh (4 Replies)
Discussion started by: kuddusrhce
4 Replies

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

10. Red Hat

Ntp issue redhat 5.11

HI Admin, We are facing a weird issue with NTP. A physical server RHEL 5.11 is migrated as P2V. NTP was running & clocks are in sync on source server before migration. After the SVMotion, On the target Linux guest, the ntpd is not able to sync with any of the clocks except local. Forcefully... (1 Reply)
Discussion started by: snchaudhari2
1 Replies
All times are GMT -4. The time now is 06:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy