1830177 Members
2339 Online
109999 Solutions
New Discussion

NTP Server Configuration

 
Muhammad Shamroze
Frequent Advisor

NTP Server Configuration

How do I set a Redhat AS 3.0 machine to act as local time server since we dont have Internet Access. And how will the client machines (all RHEL) should be configured to sync there time with this local server.
10 REPLIES 10
Ragu_3
Trusted Contributor

Re: NTP Server Configuration

You can use "chronyc" of the chrony package on the client RHEL machines to sync with the main local time server with RHAS.

If this RHAS machine does not have an Internet presence always, use chrony to sync with an external time source atleast intermittently via dial-up. The use of the "ntp" package is not recommended; "ntpdate" is deprecated now and the "ntp" package contains the "ntp-server" component.
Debian GNU/Linux for the Enterprise! Ask HP ...
Ivan Ferreira
Honored Contributor

Re: NTP Server Configuration

In the host that will be NTP server, modify /etc/ntp/ntp.conf:

Comment the following lines:

server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org

Ensure that you have this line:

server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10

In the hosts that will be client of your NTP server:

server x.y.z.p

Where x.y.z.p is the IP of your local ntp server just configured.

You should have more than one local ntp server. These servers should synchronize with an external source and also should bee peers.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Muhammad Shamroze
Frequent Advisor

Re: NTP Server Configuration

Hello,
I have total 4 ML370 servers on which Redhat AS 3.0 installed all server time are different with each other, i want to sync one time to all servers..for that i want to use ntp server configuration...As there is no internet connection..so from these 4 server ..i have to made one local ntp server and the rest its client ntp servers...As i want steps how to configure local ntp server and its client so that the time appears to be same in all servers.. the ip address and host name are as follows

for ntp server
ip=172.22.36.110 hostname=ABC_UDB01
for client ntp servers
ip=172.22.36.112 hostname=ABC_UDB02
ip=172.22.36.114 hostname=ABC_UAPP01
ip=172.22.36.116 hostname=ABC_UAPP02

so kindly tell me steps so that i can configure ntp server and ntp client on Redhat Linux AS 3.0

Waiting for your reply as soon as poosible..?
Steven E. Protter
Exalted Contributor

Re: NTP Server Configuration

Shalom Muhammad,

You choose one of the machines to connect to the outside world, see that it can actually sync to an outside server with the ntpq -p command. In this case the outside world should be a time server designated by your network admin. If no such machine is available then pick the system with the most accurate system lock.

Then you modify the ntp.conf files on of the other systems to point to the designated server.

chkconfig ntpd (or xntpd) on
service ntpd start

ntpq -p to check syncing is happening.

It is not possible to time sync if the servers time is too far off reality so a manual adjustment with the date command may be called for.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Muhammad Shamroze
Frequent Advisor

Re: NTP Server Configuration

why we use stratum 3 instead of stratum 10 in configuring the local ntp server
for example

server 127.127.1.0
fudge 127.127.1.0 stratum 3
Ivan Ferreira
Honored Contributor

Re: NTP Server Configuration

This is just to indicate that the server is a highly reliable source.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
rick jones
Honored Contributor

Re: NTP Server Configuration

But if it is only syncing to itself, it probably shouldn't be listed as a stratum 3. In that case 10 would be better.
there is no rest for the wicked yet the virtuous have no pillows
Muhammad Shamroze
Frequent Advisor

Re: NTP Server Configuration

when on redhat website it saying the following while configuring the local ntp server that is

Issue:
How do I set up a Network Time Protocol (NTP) Server on a LAN with no Internet access?
Resolution:
On the system that will be the NTP server, add the following lines in /etc/ntpd.conf file:
Under --- CLIENT NETWORK --- add:
restrict mask notrust nomodify notrap
Under --- GENERAL CONFIGURATION --- edit the line:
fudge 127.127.1.0 stratum 10
to read:
fudge 127.127.1.0 stratum 3
This will present the internal clock as a stratum 3 clock to NTP clients. The clients will now sync to the NTP server, assuming their own internal clocks are left at stratum 10.
---------------------


so i want to know that it will resolve the issue as if i use stratum 3 instead of stratum 10 as my local ntp server is not syncing when i use to start the service is showing syncing fialed...kindly help me out in this regards
rick jones
Honored Contributor

Re: NTP Server Configuration

Given you are isolated, the only real issue would be if you were to include a "real" stratum 3 server in the future, or connect to the internet. If your clients have been configured to sync to their own clocks and also to your server, then you could just as easily (IIRC) make the server stratum 9 rather than 10.
there is no rest for the wicked yet the virtuous have no pillows
Ivan Ferreira
Honored Contributor

Re: NTP Server Configuration

The stratum 3 is needed if you want this server as ntp server for other clients.

To ensure if your server is starting ntp with internal clock, use the following command:

ntpq -pn

You should see an output like this:

*127.127.1.0 127.127.1.0 12 l 19 64 377 0.000 0.000 0.977

If you see the "*" symbol, then you are using that server as the NTP server, in this case, your local clock. If you see blank then you are not syncing your server.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?