9

I see two commands giving similar output but have no idea if there is a difference between the two or not. For e.g.

[$] tracepath debian.org                                                                                                           
 1?: [LOCALHOST]                      pmtu 1500
 1:  _gateway                                              0.819ms 
 1:  _gateway                                              0.780ms 
 2:  _gateway                                              0.751ms pmtu 1400
 2:  ???                                                  43.462ms 
 3:  ???                                                  43.907ms asymm  4 
 4:  ???                                                  48.361ms 
 5:  ???                                                  46.492ms 
 6:  ???                                                  48.009ms asymm 10 
 7:  ???                                                  74.740ms asymm  9 
 8:  ix-ae-4-2.tcore1.CXR-Chennai.as6453.net              69.183ms asymm 10 
 9:  if-ae-13-2.tcore1.SVW-Singapore.as6453.net          285.982ms asymm 17 
10:  if-et-23-2.hcore2.KV8-Chiba.as6453.net              204.874ms 
11:  10ge4-5.core1.pao1.he.net                           298.418ms asymm 15 
12:  isc.gige-g4-17.core1.pao1.he.net                    299.967ms asymm 14 
13:  debian.org                                          307.865ms reached
     Resume: pmtu 1400 hops 13 back 14 

and

[$] traceroute debian.org                                                                                                          
    traceroute to debian.org (149.20.4.15), 30 hops max, 60 byte packets
     1  _gateway (192.168.1.1)  0.538 ms  1.083 ms  1.474 ms
     2  117.195.64.1 (117.195.64.1)  26.240 ms  28.890 ms  31.076 ms
     3  218.248.164.82 (218.248.164.82)  34.412 ms  37.050 ms  39.784 ms
     4  218.248.235.197 (218.248.235.197)  45.841 ms  47.977 ms  50.955 ms
     5  218.248.235.198 (218.248.235.198)  52.842 ms  56.184 ms  57.904 ms
     6  61.246.195.185 (61.246.195.185)  61.216 ms  62.437 ms 115.113.165.93.static-mumbai.vsnl.net.in (115.113.165.93)  64.571 ms
     7  172.17.169.202 (172.17.169.202)  94.358 ms 125.62.187.214 (125.62.187.214)  145.327 ms *
     8  ix (180.87.36.9)  48.755 ms  54.609 ms  56.072 ms
     9  if (180.87.36.83)  274.598 ms 100ge4-1.core1.nyc4.he.net (72.52.92.166)  309.468 ms  310.433 ms
    10  100ge14-1.core1.sjc2.he.net (184.105.81.213)  295.462 ms  295.832 ms if (180.87.67.33)  198.356 ms
    11  10ge4 (72.52.92.69)  299.283 ms  304.763 ms  297.574 ms
    12  isc.gige (72.52.94.70)  310.593 ms  313.728 ms  286.095 ms
    13  debian.org (149.20.4.15)  274.097 ms if-ae-7-2.tcore1.PDI-Palo-Alto.as6453.net (209.58.86.74)  259.125 ms debian.org (149.20.4.15)  279.229 ms

While I understand that both might have taken different routes, although had the same number of hops. I do see that the latter/second traceroute gives slightly more information about the servers in-between i.e. instead of just giving the static IP numbers, give the name/URL if somebody wants to address or figure out in-between address.

For what it's worth, here are the two packages/commands -

[$] dpkg -L iputils-tracepath | grep /usr/bin/tracepath                                                                            
/usr/bin/tracepath

and

[$] traceroute: /usr/bin/traceroute.db

I have read the manpages, and at least for tracepath it says the main thing is giving the MTU and if my guess is right, that MTU is probably the gateway of my ISP which it shares as PMTU (I'm not sure what the P stands for)

 _gateway                                              0.751ms pmtu 1400

all other connections are asymmetric which means they are prone to change.

Update - The link shared by the commentator seems to have some outdated info.

As far as I can tell neither of the commands need to be root anymore -

[$] which traceroute                                                                                                               
/usr/bin/traceroute

[$] which tracepath                                                                                                                
/usr/bin/tracepath

It has been hinted in one of the links shared on the askubuntu.com fora https://www.techwalla.com/articles/differences-between-traceroute-tracepath that traceroute has some more advanced commands

Unfortunately, that web-page is outdated so I'm not sure how good or bad it holds up today

[$] aptitude show traceroute | grep Version                                                                                        
Version: 1:2.1.0-2

[$] aptitude show iputils-tracepath | grep Version                                                                                 
Version: 3:20161105-1

It would be nice if somebody could compare between the two and share some of the findings.

Also could somebody share of the advanced commands that traceroute can do but tracepath cannot?

Looking forward to know.

2

traceroute is the traditional UNIX command. tracepath is a newer command which added in support for detecting the MTU. Since traceroute now has an --mtu option and can be run as an ordinary user, I don't even bother to install tracepath on my machines.

If you want to try something fancier and more useful than either of those, give mtr (apt install mtr-tiny) a shot. It's like a combination of traceroute and ping. In particular, I find the stripchart when using --displaymode 1 to be very useful for diagnosing exactly where network problems are occurring.

                             My traceroute  [v0.87]
            example.lan                           Sun Mar 25 00:07:50 2017

                                       Packets                Pings
Hostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. example.lan                        0%   11   11     1    1    1      2
 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14
 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14
 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31
 5. ae-1.ebr1.Washington1.Level3.ne   28%    8   11    22   18   24     30
 6. ge-3-0-0-53.gar1.Washington1.Le    0%   11   11    18   18   20     36
 7. 63.210.29.230                      0%   10   10    19   19   19     19
 8. t-3-1.bas1.re2.yahoo.com           0%   10   10    19   18   32    106
 9. p25.www.re2.yahoo.com              0%   10   10    19   18   19     19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.