[ntp:questions] ntp server with two default routes misbehaving

Jason Rabel jason at extremeoverclocking.com
Sun Apr 20 02:27:04 UTC 2014


> I've got a Debian Linux system which uses ntp to synchronise its
> clock, and is itself used by my internal systems for time
> synchronisation.  This system has two Internet connections for
> resilience and load balancing, configured using Linux advanced routing
> and with two default routes to the two ISP routers.
>
> Up until about a week ago, I was running ntp 4.2.4p4 (Debian Lenny),
> which was running without any issues.  I've recently upgraded to
> 4.2.6p2 (Debian Squeeze), and the ntp server seems to be misbehaving.
>
> Every ten minutes, the ntp server seems to switch between the two
> external routes, and logs the following messages to syslog:

I did a little searching and came across this note:

http://www.ntp.org/ntpfaq/NTP-s-config-adv.htm#AEN4122


I can guess why it resets when things go out via a different IP & gateway. I think NTP keeps track of the relationships via Local IP
<-> Remote IP. So when your local IP is being forced to change because of the load balancing it breaks that relationship. 
 
As a work-around I would simply configure all NTP traffic to go through one interface / route unless it fails. We are only talking
about 128 byte packets, it's not going to put any load on one network link. Or possibly move the NTP server further in your network
that is going to use one IP as its default gateway. In your case since the links are the same ISP I don't think there would be a
latency mis-match.

While your situation isn't unique, I would imagine it would take a LOT of coding (and debugging) to resolve a situation like that,
for only a very very very small handful of users. Most load balancers are on the edge of the network while NTP servers tend to be
more internal.

Just my two cents...



More information about the questions mailing list