First off, DNS can absolutely NOT provide any clue here.
Edit: [following Grumdrig's remark] ... other than the the clues associated with the timing of DNS messages to perform a round trip to these servers. What I mean by the original statement is that there is nothing intrinsic to the DNS protocol that makes it more suited for this purpose than say HTTP, ICMP, FTP or whatever protocol may cause the server to return some message.
Second, the easy way to do this is to have software/access, directly on either H1 or H2, but I'm assuming that's the spirit of the question really is:
How can we estimate the delay between H1 and H2, without having direct access to either host?
An estimation can be done, by using the readings (timing and routes) between H1 or H2 and several workstations (not just one). (as well as having the routes between these many workstations).
This process would be akin to triangulating for finding distances or positions in a plain 2D or 3D euclidean space, but of course, remembering that
- network routes are dynamic (unlike segments in geometry)
- distances are not so linear ;-)
Another possible trick to estimate this distance is available, in a special case:
- if H1 or H2 happens to be a server which can be queried from a third location
and
- if this server requires the services of the other host to honor such request.
For example if H1 is a web server which uses a webservices located on H2 to produce a particular web page. By taking multiple measurements for such requests to H1, and by deducting the distance/delay between H1 and our workstation, we can probably estimate the distance/delay between H1 and H2. We need to be careful to
- take multiple measurements for the purpose of averaging many factors, including the non-network portions of the this chain (say the time it takes for the web server to parse the request, crunch some numbers whatever...)
- take into various possibilities such as possible caching etc...
- estimate the non-network related portion of the chain
A special case of this special case, is if by chance H1 [or H2] is on the very route between the third point and H2 [or H1]. In that case, and assuming that the ICMP packets associated with traceroute are not filtered/stopped on the way, a simple traceroute would answer the question. This situation is however relatively unlikely...