1890
Comment:
|
1588
|
Deletions are marked like this. | Additions are marked like this. |
Line 10: | Line 10: |
* 192.168.1.38 ntp01 * 192.168.1.39 ntp02 |
* 192.168.1.40 ntp01 * 192.168.1.41 ntp02 |
Line 24: | Line 24: |
Jan 30 22:02:30 haproxy01 ntpd[759]: receive: KoD packet from 192.168.1.40 has inconsistent xmt/org/rec timestamps. Ignoring. | If the following show up in the NTP servers log, the NTP server is synchronizing against itself. |
Line 26: | Line 26: |
Jan 30 07:03:09 ntp02 ntpd[511]: receive: KoD packet from 192.168.1.40 has inconsistent xmt/org/rec timestamps. Ignoring. | Jan 30 06:39:30 ntp01 ntpd[464]: receive: KoD packet from 192.168.1.41 has inconsistent xmt/org/rec timestamps. Ignoring. |
Line 28: | Line 28: |
While getting its IP-address via DHCP, the system will also ask the DHCP-server for any available NTP-servers. This causes the NTP server to synchronize time against itself, which again causes it to loose track of time. The solution is to tell its DHCP-client to not request the NTP informatino from the DHCP-server. | While getting its IP-address via DHCP, the system will also ask the DHCP-server for any available NTP-servers. This causes the NTP server to synchronize time against itself, which again causes it to loose track of time. The solution is to tell its DHCP-client to not request the NTP information from the DHCP-server. |
Line 32: | Line 32: |
{{{ | |
Line 36: | Line 34: |
# Begin added by Kallenberg | |
Line 38: | Line 35: |
# End added by Kallenberg As we are getting the NTP server via DHCP. This will create a loop, where the NTP server synchronises its time from itself. The solution is to remove the NTP part from the DHCP client configuration. |
}}} |
NTP
Keeping time is important. Especially when debugging an issue between servers. It is a pain comparing logfiles with a time skew. For that reason we will configure two NTP servers that all clients will synchronize their time to.
Configuring a redundant NTP server does not really make any sense. The DHCP server sends option ntp-servers to the DHCP clients, so if one NTP server is down, then the other will get the request instead.
Network
The NTP servers will have fixed IP-addresses. That is configured in the DHCP servers list of statically assigned IP-adresses by using the Domains MAC address.
- 192.168.1.40 ntp01
- 192.168.1.41 ntp02
Software
Set the Time
apt-get install ntpdate ntpdate pool.ntp.org hwclock --systohc
DHCP
If the following show up in the NTP servers log, the NTP server is synchronizing against itself.
Jan 30 06:39:30 ntp01 ntpd[464]: receive: KoD packet from 192.168.1.41 has inconsistent xmt/org/rec timestamps. Ignoring.
While getting its IP-address via DHCP, the system will also ask the DHCP-server for any available NTP-servers. This causes the NTP server to synchronize time against itself, which again causes it to loose track of time. The solution is to tell its DHCP-client to not request the NTP information from the DHCP-server.
Make the following changes in /etc/dhcp/dhclient.conf
#rfc3442-classless-static-routes, ntp-servers; rfc3442-classless-static-routes;
Install the NTP Daemon
apt-get install ntp