An NTP client shows stratum 3, root delay 0.8 ms and root dispersion 1.2 ms; what error bound do these give, and how did they accumulate?
answer
- two fields that summarise the whole path
- round trip added hop by hop
- dispersion grows while you wait
- half the delay plus the dispersion
- 15 PPM, about 1.3 s per day
basics
~20 sRoot synchronization distance is root dispersion plus half the root delay: 1.2 + 0.8 / 2 = 1.6 ms, RFC 5905's bound on the client's error from all causes relative to the primary reference, assuming that reference itself is right.
solid answer
~50 sRFC 5905 defines `Root Delay` as the total round-trip delay to the reference clock and `Root Dispersion` as the total dispersion accumulated from it. Each hop adds its own measured round trip to its source's root delay, and adds its source's root dispersion to a fresh increment - its own measurement dispersion, jitter, the absolute offset, and frequency-tolerance growth of 15 PPM since the last update. From them the client computes the root synchronization distance, `EPSILON + DELTA / 2`: here 1.2 + 0.4 = 1.6 ms. Half the delay appears because an unknown path asymmetry can shift the offset by at most half the round trip. That bound, not the stratum 3, says how good the time is - a stratum 2 client fed over a 90 ms path starts with at least 45 ms.
go deeper
Recall that root delay and root dispersion describe the whole path back to the reference clock, not just the last hop, and that they bound how wrong the time can be.
Explain how each hop adds its measured round trip to root delay and its own increment to root dispersion, and compute dispersion plus half the delay.
Use root distance, not stratum, to judge whether a client meets its accuracy target, and explain how dispersion growth at 15 PPM retires a silent source in NTPv4.
Turn an accuracy requirement into a hierarchy budget: how many hops, what path delay and what update rate keep root distance inside the target, and how you will monitor it.
## Two fields that summarise the whole path Every NTPv4 header carries two 32-bit values in **NTP short format** (16 bits of seconds, 16 bits of fraction, a resolution of about 15 microseconds): - **`Root Delay`** - RFC 5905: "total round-trip delay to the reference clock". - **`Root Dispersion`** - "total dispersion to the reference clock". **Dispersion** is NTP's name for the maximum error inherent in a measurement: clock-reading precision, plus growth at the **frequency tolerance PHI**, which RFC 5905 sets at 15 PPM - about 1.3 s per day, or 54 ms per hour, if nothing refreshes it. These fields let a client judge the whole chain behind its source from one packet, without knowing the topology. ## How they accumulate down a hierarchy When a server accepts an update from its selected source, RFC 5905's system-variable update sets: - `s.rootdelay <- p.delta_r + delta` - the source's root delay plus the round-trip delay this host just measured to it; - `s.rootdisp <- p.epsilon_r + increment` - the source's root dispersion plus this hop's dispersion, jitter, PHI growth since the sample and the absolute offset, floored at a minimum value. Walk it through a data centre with two GPS-fed appliances, four internal servers and 2,000 clients: | Hop | Stratum | Measured round trip | Root delay advertised | |---|---|---|---| | GPS appliance | 1 | - | about 0 | | internal server | 2 | 0.3 ms | 0.3 ms | | client | 3 | 0.5 ms | 0.8 ms | Root dispersion grows the same way, one increment per hop, and keeps growing between updates at 15 PPM. ## From the fields to an error bound RFC 5905 defines the **root synchronization distance**: `LAMBDA = EPSILON + DELTA / 2` where `EPSILON` is root dispersion and `DELTA` root delay, and calls it "the maximum error due to all causes". For the client in the question: 1. Half the root delay: 0.8 / 2 = 0.4 ms. 2. Add the root dispersion: 0.4 + 1.2 = **1.6 ms**. Why only *half* the delay: NTP computes offset as if the outbound and return paths were equal. If they are not, the offset is wrong by at most half the round trip - the offset-and-delay arithmetic itself is a separate topic. Summed over every hop, that worst case is half the root delay. Two limits on what the bound means: - It is measured **relative to the primary reference**. If the GPS appliance itself is wrong, every downstream bound is honest about the path and still wrong about UTC; catching a wrong primary is what comparing several sources is for. - When the RFC's reference skeleton weighs a candidate source, it adds this hop's measured delay, dispersion and jitter to that source's advertised fields, so the figure a client works with for a source is a little larger than the source's own fields alone. ## Why this beats reading the stratum Compare a client that follows a public stratum 1 server across a 90 ms intercontinental path. It is **stratum 2** - shallower than our stratum 3 client - but its root delay is at least 90 ms, so its root distance is at least 45 ms before any dispersion. The stratum 3 client is bounded at 1.6 ms. Stratum counts hops; root distance bounds error. ## What happens when updates stop - NTPv4 does **not** flip a silent association to stratum 16, as NTPv3 did. Instead its dispersion keeps growing at PHI until the distance exceeds the **distance threshold MAXDIST of 1 s**, after which the source is unfit for synchronisation. - A packet advertising `rootdelay / 2 + rootdisp` of **16 s (MAXDISP)** or more fails a sanity check and is ignored. - The NTPv5 Internet-Draft (draft-ietf-ntp-ntpv5-09) refines these fields to about 4 ns resolution; until it is an RFC, NTPv4's short format applies. ## Interview takeaway State both definitions, show the hop-by-hop accumulation, compute `dispersion + delay / 2` correctly, and use it to explain why a deeper stratum can carry the tighter bound.
- Why does NTP's root synchronization distance use half the root delay rather than all of it?NTP's offset estimate assumes the outbound and return legs take equal time. If they do not, the true offset can differ from the estimate by at most half the round trip. Summed across every hop to the reference clock, that worst case is half the root delay, so RFC 5905 defines distance as root dispersion plus root delay over two.
- If an NTP server stops hearing from its source, how fast does its root dispersion grow?At the frequency tolerance PHI, 15 PPM in RFC 5905: about 54 ms per hour or 1.3 s per day. In NTPv4 that growth, rather than a jump to stratum 16, is what eventually pushes the synchronization distance past the 1 s threshold and makes the source unfit.
saying these in an interview costs you the question
- Root delay is the delay to the immediate upstream server only
- The error bound is root delay plus root dispersion, in full
- A stratum 2 source always has a smaller error bound than stratum 3
- Root dispersion stays constant between updates
- Root distance also proves the stratum 1 reference is correct