Differences
This shows you the differences between two versions of the page.
linux_wiki:synchronize_time_using_other_ntp_peers [2016/09/10 16:29] billdozor [NTP: Client Peering] |
linux_wiki:synchronize_time_using_other_ntp_peers [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Synchronize Time Using Other NTP Peers ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | About this page/ | ||
- | |||
- | ---- | ||
- | |||
- | ====== NTP: Time Server ====== | ||
- | |||
- | Setting up a local NTP server in order to practice the objective of synchronizing time. | ||
- | |||
- | \\ | ||
- | Install the ntp package | ||
- | <code bash> | ||
- | yum install ntp | ||
- | </ | ||
- | |||
- | \\ | ||
- | Enable and start ntpd | ||
- | <code bash> | ||
- | systemctl enable ntpd | ||
- | systemctl start ntpd | ||
- | </ | ||
- | |||
- | \\ | ||
- | Query NTP to view status | ||
- | <code bash> | ||
- | ntpq -p | ||
- | </ | ||
- | * -p -> | ||
- | |||
- | \\ | ||
- | NTP Statistics | ||
- | <code bash> | ||
- | ntpstat | ||
- | </ | ||
- | |||
- | \\ | ||
- | Configure NTP Pool Sources | ||
- | <code bash> | ||
- | vim / | ||
- | |||
- | # Comment out other servers, add the below | ||
- | server 127.127.1.0 | ||
- | </ | ||
- | * 127.127.1.0 -> Special IP address that syncs to the local server' | ||
- | |||
- | \\ | ||
- | Restart the service for the change to apply | ||
- | <code bash> | ||
- | systemctl restart ntpd | ||
- | </ | ||
- | |||
- | \\ | ||
- | Open the firewall for NTP | ||
- | <code bash> | ||
- | firewall-cmd --permanent --add-service=ntp | ||
- | firewall-cmd --reload | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ====== NTP: Client Peering ====== | ||
- | |||
- | Setup a NTP client to peer/sync with the NTP server. | ||
- | |||
- | \\ | ||
- | Install required package | ||
- | <code bash> | ||
- | yum install ntp | ||
- | </ | ||
- | |||
- | \\ | ||
- | Enable and start the service | ||
- | <code bash> | ||
- | systemctl enable ntpd | ||
- | systemctl start ntpd | ||
- | </ | ||
- | |||
- | \\ | ||
- | Edit the NTP config file | ||
- | <code bash> | ||
- | vim / | ||
- | |||
- | # Comment out all server lines, add peer for the newly created NTP server | ||
- | peer 192.168.1.200 | ||
- | </ | ||
- | |||
- | \\ | ||
- | Open the firewall for ntp | ||
- | <code bash> | ||
- | firewall-cmd --permanent --add-service=ntp | ||
- | firewall-cmd --reload | ||
- | </ | ||
- | |||
- | \\ | ||
- | Restart the service | ||
- | <code bash> | ||
- | systemctl restart ntpd | ||
- | </ | ||
- | |||
- | ---- | ||