Table of Contents

Time server act as server

add the following lines to /etc/ntp.conf and restart or start xntpd demon (at restart, uncomment the line xntpd into /etc/rc.tcpip)

#broadcastclient
server 127.127.1.0
fudge 127.127.1.0 stratum 10
server 10.1.1.150
server 10.1.1.151
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace

Time server client

I started the xntpd daemon from smitty xntpd and now its running. add the following lines to /etc/ntp.conf and restart or start xntpd demon (at restart, uncomment the line xntpd into /etc/rc.tcpip)

#broadcastclient
server 10.1.1.150 prefer
server 10.1.1.151
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace

Test connexion between host and time server (test UDP connection on a port using nc instead of telnet which is used for TCP), on AIX you can download it as rpm package:

root@timeclient:~# nc -vzu timesrv01 123
timesrv01.mydomain.org [192.168.0.45] 123 (ntp) open

Logging of NTP

There are two basic approaches to how to obtain logs from ntp:

In configuration file of ntp specify logfile:

logconfig =syncevents +peerevents +sysevents +allclock
logfile /var/log/ntp.log

Directly to the syslog according to facility: Add this line to the /etc/ntp.conf

logconfig =all

Add this line to the /etc/syslog.conf file:

daemon.debug   /var/log/syslog.log

make sure that file /var/log/syslog.log exists start/restart syslog via commands

stopsrc -s syslogd 
startsrc -s syslogd

Slew parameter

Slew mode is used to avoid any unwanted time jumps - especially for a Cluster or DB environment. If you only care about preventing time from stepping backward, then use the “-x” flag. This is the most common scenario. If you want to always slew the clock, then use “slewalways yes” in ntp.conf.

chssys -s xntpd -a "-x"

and add the following line into the /etc/ntp.conf:

slewalways yes

Disable NTP mode 6 and 7 queries

Access restrictions

restrict default notrust nomodify nopeer noquery notrap
restrict 127.0.0.1
server 10.11.12.13
restrict 10.11.12.13 nomodify notrap noquery

Restart xntpd daemon