Skip to main content

Discovering Internet Timetellers

An experiment designed to discover Internet time-serving hosts and evaluate the quality of their indications was conducted over a nine-day interval in August 1989. This experiment is an update of previous experiments conducted in 1985 [MIL85b] and early 1988 [MIL88a]. It involved sending time-request messages in each of three time distribution protocols, ICMP Timestamp, TIME and NTP, to every Internet address that could reasonably be associated with a working host. Previously, lists of such addresses were derived from the Internet host table maintained by the Network Information Center (NIC) at SRI International and widely known as the file "hosts.txt". The NIC host table as of 10 August 1989 contained 6382 distinct host and gateway addresses.

With the proliferation of the Internet domain-name system used to resolve host addresses from host names [MOC87], the NIC host table has become increasingly inadequate as a discovery vehicle for working host addresses. In a comprehensive survey of the domain-name system, Mark Lotter of SRI International recently compiled a revised host table of 137,484 entries. Each entry includes two lists, one containing the Internet addresses of a single host or gateway and the other containing its associated domain names. For the experiment this 9.4-megabyte table was sorted by address and extraneous information deleted, such as entries containing missing or invalid addresses, to produce a control file of 112,370 entries.

The experiment itself was conducted with the aid of the control file and a specially constructed experiment program written for the Fuzzball operating system [MIL88b]. The data were collected using experiment hosts located at the University of Delaware and connected to the University of Delaware campus network and SURA regional network. The experiment program reads each entry from the control file in turn and sends time-request messages to the first Internet address found. If no reply is received after one second, the program tries again. If no reply is received after an additional second, the program abandons the attempt and moves to the next entry in the control file. The program accumulates error messages and sample data for up to eight samples in each of the three time protocols. It abandons a host upon receipt of an ICMP error message [DAR81] and abandons further hosts on the same network upon receipt of an ICMP net-unreachable message. Using this procedure, attempts were made to read the clock for 107,799 distinct host addresses.

In the first series of experiments the clock offsets were measured for each of the three time protocols relative to the experiment host local clock, which is synchronized via radio to NBS standards to within a few milliseconds (see below). The maximum, minimum and mean offset for up to eight replies in each protocol was computed and written to a statistics file. It can happen that more than one reply is received for a single time-request message if the roundtrip interval is longer than one second, in which case only the first reply is counted. The inherent design of all three protocols is resistant to message duplication.

Figure 2. Error Distribution by Protocol
ProtocolValidTimeoutErrorUnknown
ICMP1153361343265532
TIME844114002293na
NTP7847136956na

Table 1. Time Responses by Protocol

The resulting raw statistics file was then cleaned to remove miscellaneous and unrelated commentary, including occasional duplicates resulting from multiple occurrences of the same name with different addresses. The resulting file contains valid responses, ICMP error messages of various kinds, timeout messages and other error indications. In the tabulation shown in Table 1 the timeout column shows the number of occasions when no reply was received, while the error column shows the error messages received, including ICMP time-exceeded, ICMP host-unreachable and ICMP port-unreachable messages. The unknown column tabulates occurrences of a specially marked ICMP Timestamp reply that indicates the host supports the protocol, but does not have a synchronized time-of-day clock.

In summary, of the 107,799 host addresses surveyed, 94,260 resulted in some kind of entry in the statistics file. Of these 20,758 hosts (22%) were successful in returning an apparently valid indication. Note that there may be more than one attempt to read a host clock and that some clocks were read using more than one protocol.

Then, the list of 20,758 apparently valid responses was processed to remove all entries except the first for each address and protocol. In addition, if a host replied to an NTP request, all other entries for that host were deleted, while, if a host did not reply to an NTP request, but did for a TIME request, all other entries for that host were deleted. This results in a list of 8455 hosts which provided an apparently valid time indication, 3694 for ICMP Timestamp, 7666 for TIME and 789 for NTP.

In order to discover as many NTP hosts as possible, the NTP synchronization subnet operating in the Internet was searched starting from the known primary servers using the Unix NTP-monitoring program ntpdc and its Fuzzball counterpart netspy. This search, together with the 789 hosts discovered using the domain-name system and additional information gathered by other means, resulted in a total of about 990 NTP hosts. These hosts were then surveyed again, while keeping track of ancillary information to determine whether the implementation and configuration were correct. This resulted in a list of 946 hosts apparently synchronized to the NTP subnet and operating correctly.

2.1. Evaluation of Timekeeping Quality​

In evaluating the quality of standard time distribution it is important to understand the effects of errors on the applications using the service. For many applications the maximum error under all conditions is more important than the mean error under controlled conditions. In these applications conventional statistics such as mean and variance are insufficient. A useful statistic has been found to be the error distribution plotted on log-log axes and showing the probability P(x>a) that a sample x from the population exceeds the value a on the x axis. Figure 2 shows the error distributions for each of the three time protocols included in the survey. The top line in Figure 2 is for ICMP Timestamp, the next down is for TIME and the bottom is for NTP.

The graphs shown in Figure 2 suggest several tentative conclusions. First, the time accuracy of the various hosts varies dramatically over at least nine decades from milliseconds to over 11 days. To be sure, not many hosts showed very large errors and there is cause to believe these hosts either were never synchronized or were operating improperly. In the case of NTP, for example, which is designed expressly for time synchronization, eight hosts showed errors above ten seconds, a value considered barely credible for a host synchronized by NTP in the Internet. It is very likely that some or all of these hosts, representing about one percent of the total NTP population, were using an old NTP implementation with known bugs. On the other hand, one percent of the ICMP Timestamp hosts show errors greater than a day, while one percent of TIME hosts show errors greater than a few hours. Clearly, at least on some machines for the latter two protocols, time is not considered a cherished service.

At the other end of the scale, Figure 2 suggests that at least 30 percent of the hosts in all three protocols make some attempt to maintain accurate time to about 30 ms with NTP, a minute with TIME and a couple of minutes with ICMP Timestamp. Between this regime and the one-percent regime the accuracies deteriorate; however, in general, NTP hosts maintain time about a thousand times more accurate than either of the other two protocols.

2.2. Discussion​

While this experiment was designed to assess the ubiquity and quality of Internet time service, several interesting facts have emerged. The experiment identified almost 100,000 hosts in the composite domain-name database; however, there is every suspicion that the domain-name survey did not capture the entire collection of hosts identifiable by that means. There may be hidden servers, servers that were down during the survey and network errors of various kinds that occurred during the survey. In addition, there were a few instances where the same address appeared in the domain-name database with different names, which would tend to slightly overestimate the number of distinct hosts.

Years of experience with the Internet have demonstrated the utility of ICMP error messages as useful indicators of network problems. One of the goals in system design is to avoid "black holes," where an attempt to reach a host results in no response at all. The success, or lack thereof, in attaining this goal is apparent in the data above. Of 94,260 attempts to reach a distinct host, 63,456 resulted in no response at all, or about a 67% failure rate. Some of the failures are probably due to the fact that not all hosts support the ICMP Timestamp message or even ICMP messages at all. A conforming host should return an ICMP error message in case of inability to deliver an ICMP echo, timestamp or information-request message; however, this detail of the ICMP specification is not always implemented.

There is reason to believe that many, perhaps most hosts are connected to local nets, most often Ethernets. While it is in principle possible to determine (from address-resolution failures) that a particular host is unreachable, there are few if any gateways that do that. In fact, some gateway implementations drop the first datagram arriving for a host that requires address resolution. This is one of the factors that drove the experiment design to make two attempts for each address rather than one.

The design of the experiment suppresses attempts using TIME if ICMP Timestamp fails and suppresses attempts using NTP if TIME fails. The intent of this design is to avoid network overhead for attempts unlikely to succeed. In the TCP/IP implementations derived from the various recent Berkeley Unix distributions, the standard configuration includes support for ICMP Timestamp and TIME, but not NTP. Some configurations elect not to support either TIME or NTP; however, ICMP Timestamp is supported by the kernel, so is highly likely to be available, even if the others are not.

From the design of the experiment, it would be expected that only those hosts that respond to ICMP Timestamp would be surveyed for TIME. In fact, there are somewhat more hosts surveyed than this. This may be due to any of several factors, including the fact that some hosts are represented more than once in the control file with different names and may behave differently due to network errors on subsequent attempts. In the case of ICMP Timestamp attempts, most of the errors were due to miscellaneous ICMP host-unreachable and time-exceeded messages, but the incidence is well down in the statistical noise. On the other hand, in the case of TIME most of the errors were due to ICMP port-unreachable messages as expected. There seems little justification for the surprisingly high level of timeouts in these cases, since implementations capable of returning ICMP Timestamp messages would ordinarily be capable of returning ICMP port-unreachable messages in case the user-datagram protocol module itself or TIME or NTP was not implemented.