Setup and observation
I have a PC equipped with an Intel i350 T2 NIC where I would like to capture on both interfaces simultaneously using tcpdump
. Both interfaces are connected to a 100mbit HUB (sic!) which forwards various traffic from an external traffic source to both interfaces at the "same time", so I can measure the difference of the timestamps done by the respective ethernet MACs.
Capturing simultaneously with:
user@rt:~$ sudo tcpdump -j adapter --time-stamp-precision nano -B 1048576 -i eth2 -w test_eth2.pcap
user@rt:~$ sudo tcpdump -j adapter --time-stamp-precision nano -B 1048576 -i eth3 -w test_eth3.pcap
After that I merge the two files together to compare the timestamps:
user@rt:~$ mergecap -F nseclibpcap -w merged.pcap test_eth2.pcap test_eth3.pcap
Wireshark then shows me, that for a few packets I get a timestamp diff of the duplicate frames of around 20-40nsec (which is nice and sufficient for my application!). But there are also lots of frames which show a difference of up to tens of microseconds when comparing the respective duplicates.
Environment
user@rt:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid
user@rt:~$ uname -r
3.19.0-28-generic
user@rt:~$ lscpu | grep "Model name"
Model name: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
Questions
- How/Who does the syncing of the adapter clock to CLOCK_REALTIME (I presume)
- How often does this syncing occur.
- Is there some room for tweaking without too much effort?
- Is it possible to use e.g.
phc2sys
to sync all adapter clocks to CLOCK_REALTIME? - Would (4) interfere with the mechanisms done by (1)?
THX for help or pointing out my mistakes!