[time-nuts] Re: how much is my router influencing time-keeping over the network

Magnus Danielson magnus at rubidium.se
Thu Sep 15 11:01:39 UTC 2022


Hi.

On 2022-09-15 11:02, folkert via time-nuts wrote:
>>> For fun I'm developing a router for HAM packet networks. What it does is
>>> route AX.25 packets between radios and tunnels (it can also bridge- and
>>> filter them).
>>> What I would like to measure now is, how bad does it influence time-keeping
>>> when syncing time takes place over a network. I could of course just setup
>>> tcp/ip and let two ntp instances sync over it and then calculate an allan
>>> deviation plot.
>> After an exchange of NTP packets, the client has 4 time stamps.
>>    The time the request packet left the client
>>    The time the request packet arrived at the server
>>    The time the reply packet left the server
>>    The time the reply packet arrived at the client
>>
>> There are 3 unknowns:
>>    Transit time client to server
>>    Transit time server to client
>>    Clock offset between client and server
>>
>> With the 4 time stamps, you can setup 2 equations.  You need one more.
>> NTP assumes the transit times are equal.
>>
>> If you have good clocks at both ends, you can assume the clocks are equal and
>> compute transit times in each direction.
> Indeed, but I also would like measure how good the path between the two
> points is. I mean: if the network randomly delays packets (or so), then
> that would influence the syncing I think?
Yes, it will work on both the mean value and variance. The variance will 
increase with additional noise. Some of that will be filtered out by the 
control loop, but it will leak through. The mean value of the forward 
and backward packet path will vary and not in equal amount, so the 
produced time difference will shift along on that difference.
>
> In any case, I've done a little experiment with that: I invoke a ping
> 100k times and then write down the time when the reply was received.
> I've explained it further at: https://vanheusden.com/time/ping-test/

For this I would recommend you to look at MTIE and TDEV rather than 
ADEV. ADEV if frequency deviation where as MTIE is a maximum of 
systematic in time and TDEV is time deviation.

ADEV and TDEV is intended to handle random noise, and with random noise 
we talk about the noises in the Leeson model and not some systematic 
effect with what looks like random trafic. I've found that TDEV can be 
somewhat of interest too, but MTIE and other TE/TIE types of measures be 
much more of interest.

It's only when the time properties is understood that produced frequency 
deviation becomes of interest.

>> I would like to see some graphs of network transit times over radio links.
>> How noisy is yor radio link?  It will be interesting to see if if you can get
>> a decent ADEV graph.
> I'm currently working on that. The two radios are close to each other, with
> signal levels of -57dB and SNR of 10.5. Ping times of around 8.3 seconds
> (yes, seconds).
>
>> Timings will depend a lot on network traffic.  It would be neat if you can get
>> data under both light load and heavy load.  Do you know about bufferbloat?  ...
> I do know about bufferbloat yes.

Measure over a week or two. Compare phase with GPS if you can.

Over a window span, measure average, variance and peak-to-peak for 
starters. As buffers fill up and empty, you will for sure see that and 
you will see it vary over time if you do measures over suitable 
time-periods.

Network noise can be nasty, all dependent on the network and cross-traffic.

Cheers,
Magnus




More information about the Time-nuts_lists.febo.com mailing list