[ntp:questions] NTP client basic

Danny Mayer mayer at ntp.isc.org
Thu Mar 8 01:35:54 UTC 2007


Peter Martinez wrote:
> 
> Although clearly a repeated NTP response is meaningless (there's no such 
> thing as 'old' time), you cannot deduce "the network should never repeat an 
> NTP packet". NTP is transported in UDP packets but UDP isn't aware of that. 
> There is no law which says UDP (or the levels below it) must not repeat 
> packets if they thought it was a good idea, and I can see that other uses 
> for UDP (eg DNS) would not malfunction if repeats occured. Classic 
> communication theory knows all about this - it's safe for me to use UDP to 
> say "my name is Peter" twice, but unsafe to for me to repeat "I owe you 
> $100", even if I thought you were a bit deaf!

Peter,

UDP is defined in RFC 768, see http://www.ietf.org/rfc/rfc768.txt for
the full text. There is *no* provision at all for UDP sending packets on
its own for *any* reason, especially as it has no idea whether or not it
has been received by the recipient of the packet. The "U" in UDP also
stands for "Unreliable" though technically it's supposed to stand for
User. Since the sender has no way of knowing if the packet was received
it has no way of deciding to send another packet. The protocol won't do
it and that's intentional. If the protocol using it decides to send
another packet that's a decision that the protocol definers that utilize
it as a transport mechanism make. UDP does not send another packet and
NTP doesn't do that either. If you want reliable protocol you use TCP.
You *can* deduce that the network should never repeat since there is
nothing in the network protocol that says that should be done. UDP is
over 25 years old, and still going strong. Network retransmissions can
occur because a node thought it hadn't been transmitted but they
likelihood of that is becoming rarer and rarer with increasingly
reliable networks.

BTW, DNS will ignore duplicate packets as they are more likely to be
spoofers, not because of retransmission.

Danny



More information about the questions mailing list