Configuring an NTP master server

(Hyper-V only) This procedure configures an NTP master server on the Control Center master host. Perform this procedure only if the host does not have internet access.

  1. Gain access to the Control Center host, through the console interface of your hypervisor, or through a remote shell utility such as PuTTY.
  2. Start a command-line session as root as follows:
    1. In the Appliance Administration menu, select Root Shell.
    2. Select Run, and then press Enter.
    The menu is replaced by a command prompt similar to the following example:
    [root@hostname ~]#
  3. Create a backup of the NTP configuration file.
    cp -p /etc/ntp.conf /etc/ntp.conf.orig
  4. Edit the NTP configuration file as follows:
    1. Open /etc/ntp.conf with a text editor.
    2. Replace all lines in the file with the following lines:
      # Use the local clock
      server 127.127.1.0 prefer
      fudge  127.127.1.0 stratum 10
      driftfile /var/lib/ntp/drift
      broadcastdelay 0.008
      
      # Give localhost full access rights
      restrict 127.0.0.1
      
      # Grant access to client hosts
      restrict ADDRESS_RANGE mask NETMASK nomodify notrap
    3. Replace ADDRESS_RANGE with the range of IPv4 network addresses that are allowed to query this NTP server.
      For example, the following IP addresses are assigned to the hosts in a Control Center cluster:
      • 203.0.113.10
      • 203.0.113.11
      • 203.0.113.12
      • 203.0.113.13

      For the preceding addresses, the value for ADDRESS_RANGE is 203.0.113.0.

    4. Replace NETMASK with the IPv4 network mask that corresponds with the address range.
      For example, the network mask for 203.0.113.0 is 255.255.255.0.
    5. Save the file and exit the editor.
  5. Stop Control Center.
    systemctl stop serviced
  6. Enable and start the NTP daemon as follows:
    1. Enable the ntpd daemon.
      systemctl enable ntpd
    2. Configure ntpd to start when the system starts.
      Currently, an unresolved issue associated with NTP prevents ntpd from restarting correctly after a reboot, and the following commands provide a workaround to ensure that it does.
      echo "systemctl start ntpd" >> /etc/rc.d/rc.local
      chmod +x /etc/rc.d/rc.local
    3. Start ntpd.
      systemctl start ntpd
  7. Start Control Center.
    systemctl start serviced