User Tools

Site Tools


user:ryoung12:portfolio:ntp:client

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user:ryoung12:portfolio:ntp:client [2010/05/21 03:24] ryoung12user:ryoung12:portfolio:ntp:client [2010/05/21 20:58] (current) ryoung12
Line 1: Line 1:
 +=====Configuring a NTP Client on a Virtual Machine=====
 +<html><p style="margin:0em; padding:0em;">Again, you need to edit <span style="font-style:italic; font-weight:bold;">/etc/ntp.conf</span> using the editor of your choice to tailor things to your needs.</p></html>
 +<cli>
 +sudo vim /etc/ntp.conf
 +</cli>
 +<html><p style="margin:0em; padding:0em;">The ntp.conf file on our client is as follows:</p></html>
 +<code bash>
 +# /etc/ntp.conf
  
 +# Disable the panic threshold to allow irregular clock offsets
 +tinker panic 0 
 +
 +# Local clock oscillation file
 +driftfile /var/lib/ntp/ntp.drift
 +
 +# Allow statistics to be logged.
 +statsdir /var/log/ntpstats/
 +
 +# Logging configuration
 +statistics loopstats peerstats clockstats
 +filegen loopstats file loopstats type day enable
 +filegen peerstats file peerstats type day enable
 +filegen clockstats file clockstats type day enable
 +
 +# Access control configuration
 +restrict default kod nomodify notrap nopeer noquery # Deny everybody by default
 +restrict 127.0.0.1                                  # Allow unrestricted access to self
 +
 +# NTP servers to syncronise with
 +server vmserver03.student.lab
 +</code>
 +<html><p style="margin:0em; padding:0em;"> The main difference between our client and our server ntp.conf files is that the client file does not have a restrict directive that allows it to serve time to other systems. It also does not look to itself as a server.<br />
 +We need to do some additional configuration before we restart the NTP service to apply the changes on our virtual macines.</p></html>
 +
 +====Special Settings for Virtual Machines====
 +<html><p style="margin:0em; padding:0em;">Because the NTP clients for the purposes of this portfolio will be used on Xen Virtual  Machines, a few special configuration enhancements need to be made. The first, is the line <span style="font-style:italic;">tinker panic 0</span> from our client version of the ntp.conf. This allows the NTP client to update from the NTP server, regardless of differences in current system time -- there are instances where the VM will begin adjusting it's clock automatically due to various system errors. The other requirement is to create a <span style="font-style:italic; font-weight:bold;">step-tinkers</span> file and place it in <span style="font-style:italic; font-weight:bold;">/etc/ntp</span> directory. (You may need to create this directory as it is not created by default as part of the installation process for NTP.)</p></html>
 +<cli>
 +sudo sh -c "mkdir /etc/ntp && vim /etc/ntp/step-tinkers"
 +</cli>
 +<code bash>
 +# /etc/ntp/step-tinkers
 +vmserver03.student.lab
 +</code>
 +\\
 +<html><p style="margin:0em; padding:0em;">Restart the NTP service to implement the changes.</p></html>
 +<cli>
 +sudo /etc/init.d/ntp restart
 +</cli>