Local NTP server configuration on RHEL 6 Virtual server assistance needed
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Local NTP server configuration on RHEL 6 Virtual server assistance needed
Greetings all,
I am relatively new to Linux...just taking the RHCSA 124 class...and am trying to work on my first servers.
I have installed a host RHEL 6 OS with just Virtualization.
I created 2 RHEL6 VMs and have been trying to configure one as a NTP server. These are standalone with no internet access.
I have been unsucessfully been trying to configure one of the VMs as the NTP server...but every website solution that I have tried has failed. Every solution I have tried...I still get no suitable server for sync found.
Can anyone assist with the /etc/ntp.conf files...on what needs to be included?? I am using a host system with no ethernet configured..but the VM Manager environment is setup for a default network 192.168.1.0 /24 w/ DHCP disabled.
The VM server is setup with manual ip as 192.168.1.10, and the client is 192.168.1.11 . Both systems are able to ping each other. This is the first service I am trying to setup after doing the initial install...so there are no DHCP/DNS/etc services configured.
Your ntp.conf file just needs to have your ntp server listed and a drift file defined. You should also set a "fake" ip for the server itself (this will help if the ntp server doesn't respond or you're having a network issue). So I would look for lines like this:
server 127.127.1.0 => these 2 lines are usually in there by default
fudge 127.127.1.0 stratum 10
server 192.168.1.10
driftfile /etc/ntp/drift
Once you get that working, you can start adding a "restrict" line to the ntp.conf file.
One thing to keep in mind, the sync between the server and client is not instantaneous so wait it out. Change the system clock by 30 minutes or so, then I would check back either at the end of the day or even the next day.
Again...i am just a beginner...so another question is...do these entries have to be in any particular section of the ntp.conf file?? Should the client ntp.conf file be the same as the server?
Not sure about the restrict lines....there are already several restrict lines in the default ntp.conf files (server/client)
Can I wipe the whole file and just put in these couple of entries that you provided??
On my previous attempts at configuring NTP with other intruction...I have left them up for days...and have not seen any sync between the client and server.
Continuing on my NTP configuration problems...also tried the below documentation provided via other threads...and still am not getting any closer to setting up the NTP server....I edited both the server and client ntp.conf files, restarted the services...tried the updates, leaving the times slightly off to see if server/client would eventually sync...but so far still getting no suitable server to sync messages..... Can anyone provide assistance...thanks,
Example server “/etc/ntp.conf” file
restrict default nomodify notrap noquery
restrict 127.0.0.1
# Keys file.
keys /etc/ntp/keys
By default, anything can query the server for what the time is, but no more.
The localhost (127.0.0.1) has almost no restrictions.
At least three remote servers are used for the best possibility of getting real time. Using less than three means you might have to decide between two servers that don't agree with each other, and how would you tell which was right? Hopefully, using three avoids a stalemate. Using more than three will slow things down (a bit) as they're all compared, and there isn't (at this time) a 4.pool.ntp.org set of DNS records for servers. To use more than three, you'll need to find some servers that you're allowed to use (try your own ISP).
A local server is fudged with a medium stratum value (9).
The drift file is used by the server to compensate for errors.
I suspect the system maintains the delay value itself, though all of my servers are showing the same “0.008” value.
The “keys” file is ignored on my systems, as they're not set up to use authentication. It's just there as a default setting, in case they're reconfigured to use authentication.
# --- OUR TIMESERVERS -----
# 192.168.1.2 is the address for my timeserver,
# use the address of your own, instead:
server 192.168.1.2 iburst
server 127.127.1.0
# --- NTP MULTICASTCLIENT ---
# --- GENERAL CONFIGURATION ---
# Undisciplined Local Clock.
fudge 127.127.1.0 stratum 12
# Keys file.
keys /etc/ntp/keys
This configuration uses the local time server as the only remote server, it also uses itself as a lesser quality server (stratum 12) if it can't reach the main server (so it'll keep on running, rather than abort).
# service ntpd stop
# ntpdate -u 192.168.1.10
# ntpdate -u 192.168.1.10
# ntpdate -u 192.168.1.10 => yes run this command 3x. It must be run with the ntpd service stopped
# service ntpd start
I left the server ntp.conf file the way it was...and deleted everything out of the client ntp.conf file except for the ip address of the ntp server...and it seems to be working now
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.