I understand how a client can trace a route to a server (using traceroute, or tracert). But is there a way for a server to trace a route to a client?
The problem is that I have a group of internet users who live in a remote area and they are complaining that their internet access is slow. I am planning to build some software that allows them to run a download test easily, then store the results. Once we have collected a reasonable amount of data we will hopefully be able to find a pattern.
In conjunction with the download data it would be great to have traceroute data. I can't see how I could initiate this from the client without writing some client software, which is something I don't want to do. Thus I am trying to find a mechanism which collects route information but is initiated by the server.
My preference would be to work with a linux server.
You don't want to do this. A traceroute run from the server to the client is not guaranteed to return the same result as one run from the client to the server.
The route a packet takes from Node A to Node B can easily be different from the route traveled in the opposite direction.* The exact route taken by any given IP packet is determined by the intervening routers along the packet's path. A router may have multiple routes to the destination network (e.g. for redundancy) and is at liberty to decide which route to use based on things such as network congestion, failed links, etc.
Therefore it's not possible to initiate a meaningful trace of the route from A to B from Node B (i.e. the "server") since there's no guarantee the reported route is the one actually used for packets sent from Node A to B.
If the server is indeed to "initiate" the traceroute from the client to the server the server must simply command the client to run a traceroute to the server. This of course is no different than there being a scheduled or triggered command configured on the client to do the exact same thing.
*It's even possible for some packets sent from Node A to B to take different routes from their counterparts, though in practice this doesn't usually happen across otherwise stable networks.