NTP client Linux - akoston/McK-CCDC GitHub Wiki

Configure NTP Client (Ubuntu)

###Package for Installation ntp ntp-simple ntpdate

###Modify ntp.conf on NTP Client /etc/ntp.conf

- Dirft file location
	driftfile /var/lib/ntp/ntp.drift

- Enable logging
	#Remove the # sign to enable logging
	statsdir /var/log/ntpstatus
	
	-Log settings
	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

- Sepcify log file
	logfile /var/log/ntp.log

- Specify the NTP server to communicate with
	#Must list more than one server
	server ip-of-ntp-server-you-made prefer
	server time.nist.gov
	server 0.pool.ntp.org
	server 1.pool.ntp.org
	
- Restrict the type of access you allow these servers
	restrict default notrust nomodify nopeer
	
- Localhost configuration
	#no trailing restrictions on these servers
	restrict 192.168.1.1
	restrict 127.0.0.1

###Initial Sync This command synchronizes the time with your NTP server manually. ntpdate –u 192.168.1.1

###Start the NTP Daemon /etc/init.d/ntp start or restart

###Check the NTP Status ntpq -np

ntpdc -c sysinfo
	
	system peer:          thegeekstuff.com
	system peer mode:     client
	leap indicator:       00
	stratum:              4
	precision:            -23
	root distance:        0.00279 s
	root dispersion:      0.06271 s
	reference ID:         [192.168.1.1]
	reference time:       d70bd07b.f4b5cf2b  Wed, Apr 30 2014 15:41:47.955
	system flags:         auth monitor ntp kernel stats
	jitter:               0.000000 s
	stability:            0.000 ppm
	broadcastdelay:       0.000000 s
	authdelay:            0.000000 s