|
|
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
- On panda, open a root shell.
- In /etc/chrony.conf file Disable the line pool 2.rhel.pool.ntp.org by putting a # sign in front of it.
- 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.
- 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.
- Use systemctl restart chronyd to restart the chrony process with the new settings.
- Still on panda, type firewall-cmd --add-service ntp --permanent, followed by firewall-cmd reload. This opens the firewall for time services.
Client Configuration
- Open a root shell on client1.
- On client1, open the configuration file /etc/chrony.conf and disable the line pool 2.rhel.pool.ntp.org.
- 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.
- Type systemctl restart chronyd to restart the chrony service with the new settings.
- 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
|
|
|