Red Hat Certified System Administration 8



Exercise 01 : Configuring an NTP Time Client and Server

Prerequisites

panda.lab.tg 10.0.0.11/24 used as NTP Server
client1.lab.tg 10.0.0.50/24 used as NTP Client

Server Configuration


  1. On panda, open a root shell.

  2. In /etc/chrony.conf file Disable the line pool 2.rhel.pool.ntp.org by putting a # sign in front of it.

  3. Include the line allow 10.0.0.0/24 to allow access from all clients that use a local IP address starting with 10.0.0.

  4. Also include the line stratum 8. This ensures that the local time server is going to advertise itself with a stratum of 8, which means it will be used by clients, but only if no Internet time servers are available. Next, close the configuration file.

  5. Use systemctl restart chronyd to restart the chrony process with the new settings.

  6. Still on panda, type firewall-cmd --add-service ntp --permanent, followed by firewall-cmd reload. This opens the firewall for time services.

Client Configuration


  1. Open a root shell on client1.

  2. On client1, open the configuration file /etc/chrony.conf and disable the line pool 2.rhel.pool.ntp.org.

  3. Add the line server server1.example.com. Make sure that name resolution to server1.example.com is configured, and if not, use the IP address of server1 instead.

  4. Type systemctl restart chronyd to restart the chrony service with the new settings.

  5. On client1, type the command chronyc sources. It should show the name or IP address of server1, the stratum of 8 that is advertised, and a synchronization status indicating that server2 has successfully synchronized its time.



+ Correction

Eninam BAGNABANA     |         |     bagnadavid@outlook.fr     |