Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA Path: utzoo!watmath!clyde!cbosgd!ucbvax!daemon From: tcp-ip@ucbvax.ARPA Newsgroups: fa.tcp-ip Subject: voting on the time Message-ID: <9968@ucbvax.ARPA> Date: Sun, 18-Aug-85 13:02:12 EDT Article-I.D.: ucbvax.9968 Posted: Sun Aug 18 13:02:12 1985 Date-Received: Tue, 20-Aug-85 21:03:50 EDT Sender: daemon@ucbvax.ARPA Organization: University of California at Berkeley Lines: 39 From: jsq%tzec.UTEXAS@ut-sally.ARPA (John Quarterman) After the incident when dcn1's time was eight hours off, Dave Mills suggested that the client should check with a neighbor or two before believing what any host says about the time. I have followed this up and written a time client program for 4.2BSD which allows letting an arbitrary number of hosts vote on the time. It also can connect using either TCP or UDP, since the set of really accurate hosts which run time servers using either protocol is very small. The program is available by anonymous ftp from ut-sally.ARPA (soon to be sally.UTEXAS.EDU) as ~ftp/pub/netdate.c and ~ftp/pub/netdate.8. Here are a couple of usage examples from the manual entry: EXAMPLE The most accurate hosts are named first in each example. /etc/netdate -l 30 udp dcn-gateway tcp neighbor _D_c_n-_g_a_t_e_w_a_y is a hypothetical host which usually keeps time accurate to within milliseconds of Coordinated Universal Time, but may occasionally be eight hours off. _N_e_i_g_h_b_o_r is a neighbor of the local host which keeps time with moderate accuracy. The time will be set to that of _d_c_n-_g_a_t_e_w_a_y if that and _n_e_i_g_h_b_o_r agree to within thirty seconds, else it will not be set at all. This is almost good enough for most circumstances, but won't do when the local host's time is known to be wrong (e.g., after a long downtime or a bad crash) and must be set to something. If one of the hosts named is inaccurate or not responding, there is a problem. /etc/netdate -l 30 udp dcn-gateway tcp neighbor neighbor2 Only two of the three hosts named must agree on the time. The time will still be set (to that of the first neighbor), even if _d_c_n-_g_a_t_e_w_a_y is far off as long as the two neighbors agree. This is probably good enough for most cases. One can arbitrarily gerrymander the vote for more insurance (and less clarity), as in the following example. [end of excerpt]