I am developing an application which requires intricate testing involving exact time stamps of various events.
As an example, lets say we have two hosts: h1 and h2.
Now if I run a tcpdump on h1, I get an associated timestamp. Same goes for h2.
Now, suppose h1 sends an ICMP packet to h2. The packet should, as I understand be logged on h1's tcpdump at the time it leaves h1 and on h2's tcpdump when h2 receives the same.
Now I am simulating the hosts as Ubuntu machines using VirtualBox.
So I have two questions:
One, are my assumptions about tcpdump correct?
Second, can I be absolutely certain about the central time being the same for both the virtual machines. I know that this is not possible in a physical network. However, since Virtual machines share a common system, I was wondering whether the same holds true. If not, is there any other way to ensure synchronization while testing?
[CONCLUDING REMARKS]: For those who may be curious, VirtualBox comes configured with NTP and if you have a similar task, setting up NTP can be stricken off your to-do list.