Create Configuration Files
About this task
Perform the following steps as user root on the machine:
Procedure
- Create file
/etc/ntp/step-tickers
. You can back up any existing version of the file. The file contains the host names or IP addresses of the NTP servers to contact during startup to initially set the time. If you use the NTP server pool, you must use host names, which requires DNS.For example, if the two NTP servers to use are 1.2.3.4 and 5.6.7.8, then use the following commands to create the file:echo 1.2.3.4 > /etc/ntp/step-tickers echo 5.6.7.8 >> /etc/ntp/step-tickers
- Create file
/etc/ntp.conf
with the following commands. You can back up any existing version of the file.echo restrict default ignore > /etc/ntp.conf echo restrict 127.0.0.1 >> /etc/ntp.conf echo driftfile /var/lib/ntp/drift >> /etc/ntp.conf
-
Add entries by using the
restrict
andserver
keywords for each NTP server. The following example adds entries for the hypothetical 1.2.3.4 and 5.6.7.8 NTP servers. The mask, nomodify, notrap, and noquery options prevent the server from modifying the NTP service on the Network Capture host machine.nullecho restrict 1.2.3.4 mask 255.255.255.255 nomodify notrap noquery >> /etc/ntp.con echo server 1.2.3.4 >> /etc/ntp.conf echo restrict 5.6.7.8 mask 255.255.255.255 nomodify notrap noquery >> \ /etc/ntp.con echo server 5.6.7.8 >> /etc/ntp.conf