Tuesday, March 19, 2013

Configure NTP (Network Time Protocol) clients on AIX

How to configure NTP on client with a NTP server .Our NTP servers  are   time_server01 and  time_server02

  1. Verify that you have a server suitable for synchronization offset  must  be smaller  then 1000 ms 
    #ntpdate -d time_server01
  2. Check if it is  running  or  not (configured  before)
    #lssrc -ls xntpd
  3. Specify your ntp servers in /etc/ntp.conf  .Comment out the “broadcastclient” line (if applicable )
    #vi /etc/ntp.conf

    server    time_server01 prefer
    server    time_server02
    driftfile /etc/ntp.drift
    tracefile /etc/ntp.trace
    #broadcastclient
  4. Be sure  that  you can rach time servers .if you define  a server  name  (not an IP be sure that you can  reach it ).You can add it  in /etc/hosts

    #vi /etc/hosts
    10.1.1.10       time_server01
    10.1.1.11       time_server02

    #ping  time_server01
    #nslookup time_server01
  5. start  stop
    #stopsrc -s xntpd
    #startsrc -s xntpd
  6. check  if it is  running  and  Sys peer should display the IP address or name of your xntp server. This process may take up to 15 minutes

    #lssrc -ls xntpd
    #lssrc -ls xntpd|grep "Sys peer"
    #ntpq -p
  7. Uncomment xntpd from /etc/rc.tcpip so it will start on a reboot.

    # vi /etc/rc.tcpip
    Uncomment the following line:
    start /usr/sbin/xntpd "$src_running"