traceroute doesn't find all hops - tracert does
I am trying to find out what can be the reason for this difference:
1. When I try to traceroute from my linux desktop to the remote host there are several hops which are lost. (I used -I for ICMP) 2. When I do the same from windows with tracert (same PC) all those previously lost hops are present. I tried already several parameter changes: -w for wait -z 5 for wait between pings -N 1 for number of packets sent out simultaneously Its always the same. So the trace to the host misses 4 hops with linux compared to windows :(. I know that it must work because with mtr I can see all the hops but I cannot find out how it does. :scratch: |
copy/paste them here. there could be duplicates in the tracert that are being skipped in traceroute. you can also run mtr as root to get a better picture on the linux box.
|
from my win7 box
Code:
Microsoft Windows [Version 6.1.7601] Code:
ssma-imac:~ ssma$ traceroute google.com and on my CentOS 6.3 box i had the following results: Code:
[ray@centos ~]$ traceroute google.com Code:
My traceroute [v0.75] |
Thanks for your answer. I can see that you get the same for CentOS as win7 - so this is not usual and you also use just simple traceroute google.com as I do. So what can cause that I get on my CentOS (and also on my Slackware) something like this:
(I use your results as example) Quote:
Quote:
What means that the network must be absolutely the same. I am really confused. Right now I am trying to compare the complete traffic by wireshark on both - what is different in the win7 tracert. |
please use your own data so we can help troubleshoot. all you did is show that one traceroute had timeouts and the other didnt. nothing out of the ordinary there.
|
Quote:
The point here is that from same location linux behaves differently like windows its the same notebook connected to the same physical network. It must be something wrong in the traceroute utility itself - its not reliable. Why is this important for me: I need to write a script which can be run by simple user privileges under CentOS. The script should create a text file with lots of data in it - network configuration, ping data to several locations, traceroute data to several locations. This text file should serve for administrators to track down user connection problems. Since this is a mixed environment - Linux and Windows too the same script exists for windows. The problem: - The windows script (with tracert) can be run without any problems under simple user privileges. - The linux script can not - actually I can use traceroute without the -I switch as user, but I get no valid data (only stars). Since linux uses UDP as default and this doesn't work (all hops get stars). See: http://www.linuxquestions.org/questi...f-icmp-815625/ Question 1: Did you get the above results (in CentOS) with UDP traceroute??? - And the actual problem is: even if I run traceroute as root with -I ICMP packets I do not get the same data as in windows with tracert - And tracert can be run by simple user account - no need to be an administrator (again its a same physical connection point in my local network) What is a good point in the linked thread above: Question 2: Why is that - that ping, which uses ICMP doesn't need root privileges and traceroute needs when used with ICMP? The result is that I cannot create an linux like user script which does the same as the windows one. Windows bat file Code:
ping google.com >> "C:\debug.txt" Code:
#!/bin/bash |
if you only want the user to have access to traceroute -I then put it in sudo. then it can be called by the user you gave permissions for that specific call.
as you are using centOS you would add it as root via visudo then you would add the following command to the users line: /bin/traceroute -I place a comma after or before as will be required depending on its location in the line. operator ALL= /bin/traceroute -l, /sbin/shutdown -r now, /sbin/shutdown -h now in the above example the username=operator ALL means from anyplace the user 'operator' and execute the following ROOT level commands /bin/traceroute -l /sbin/shutdown -r now /sbin/shutdown -h now so in your script you would call traceroute with sudo and its full path: Code:
sudo /bin/traceroute -l |
nm, that might not work with traceroute... as the -l requires an argument to function and that is not in the visudo file...
sorry mate im over my head with this one. sadly im not much more help. |
Quote:
The root execution I partly solved - although the users must input their passwords as an extra step and also edit the /etc/sudoers file to be able to do sudo. This can be pretty annoying for non-admin-like users. But I think its a usable solution. I replaced the traceroute with MTR (my traceroute) utility which gives good results for the network paths. Unfortunately this also requires root privileges. Anyway, I need to investigate why the traceroute itself gives wrong results. Maybe I am doing something wrong. :scratch: If there are some of you outside who can try to do several tests for me and post the result it would be good point to start. NOTE I don't need the complete result list (your paths) - its enough if you compare this three methods: traceroute google.com (did you get any hop values?) traceroute -I google.com ( is this the same as the previous?) mtr -r -c 4 google.com (are some of the hops in traceroute result missing which are present in the mtr result?) This can answer the question whether this problem has everybody with linux traceroute or something is wrong with my network or the way I use traceroute. Thanks |
traceroute still doesn't work using -I option in su mode
Hello,
I am posting on this chain after long time. Facing similar issue on my Ubuntu Linux PC. tracert on windows display all the hops. But traceroute on Ubuntu fails to display all the last hop. When tried using -I (ICMP Echo's) option in sudo. Output displays the last hop but intermediate hops are missing in the output. Does the cause for this issue found. Thanks Prathap G |
Hi Parthap G,
Not really. As a workaround I have used the mtr utility instead. |
All times are GMT -5. The time now is 06:22 AM. |