How do I display the route to a website (eg www.google.com)?
Solution 1
traceroute. See here for all the options.
EDIT: Essentially, when your computer wants to visit a web page, there is generally no direct path that you can take, and it must go through a series of hops. When you run the traceroute command, it simply prints the hops. Usually, this process takes fractions of a second, but sometimes, if there is a failure point, it may never complete.
In those cases, traceroute is used to figure out the point of failure. One will see the hops made, and can in many cases conclude that it is the fault of the last hop. Unfortunately, if there were a way around this failed node, it most probably would have been found by the routing algorithm itself, so generally you just have to wait for someone to fix the server.
Solution 2
traceroute www.google.com
Note that large sites like Google use a content distribution network (CDN) so may dynamically route requests to different server pools depending on load. So it isn't definite that a traceroute will follow the same path, but likely if done near to the time the page was loaded.
Related videos on Youtube
kfmfe04
Updated on September 18, 2022Comments
-
kfmfe04 over 1 year
What is the Linux command for display the route taken to a website?
-
dbasnett over 12 yearsWhy do you need this info? Are you the person responsible for the network infrastructure?
-
kfmfe04 over 12 yearsFor detecting flaky network problems with my ISP, and yes, I maintain all the machines on my network.
-
dbasnett over 12 yearsSo all you really need to test is that you reach the ISP's gateway successfully.
-
kfmfe04 over 12 yearsWhich would be correct, if your assumption that my flaky third-world ISP is competent in routing around network problems is accurate. In any case, traceroute helps let me know what is going on.
-
dbasnett over 12 yearsSometimes knowing makes us feel better. My US ISP is not very large and in the beginning there were a lot of problems, I have a 3 hop WIFI connection to their main site. I found out that reporting that I couldn't ___________ (browse, receive emails, etc.) was really all they wanted to know. Maybe your ISP is different and wants your insights into how their network appears to work.
-
-
dbasnett over 12 yearsIf the traceroute is using multiple tries at each TTL value it isn't even certain that those will take the same route. Also, it isn't uncommon for ICMP to be given a lower priority, so the results are close to meaningless.
-
Ivo Flipse over 12 yearsCare to elaborate on what it does?
-
soandos over 12 years@IvoFlipse done, sorry about that.
-
Ivo Flipse over 12 yearsMuch better now +1
-
squareborg over 12 yearsBTW tcp doesn't find routes its done on the layer below it.