Where are my packets going?

If you’ve ever had a slow, unable connection to a server it could be that you’re suffering from some packet loss between you and the server.

This might not be noticeable for web browsing or e-mail but if you’re doing any sort or VOIP or gaming it can be critical to know the quality of the connection between 2 points.

A simple tool for this is mtr. This is normally included in modern Linux ditros – if you’re a RedHat/CentOS/Fedora person just run –

yum install mtr

Now you can fire it up by running –

/usr/sbin/mtr www.digg.com

My traceroute  [v0.71]
server.sysadminman.net (0.0.0.0)
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
Packets               Pings
Host                                                 Loss%  Last   Avg  Best  Wrst StDev
1. 38.105.81.98                                      0.0%   0.1   0.1   0.1   0.2   0.0
2. gi0-6.na21.b003328-0.dca01.atlas.cogentco.com     0.0%   1.2   1.1   0.7   2.6   0.3
3. te9-3.3888.ccr02.dca01.atlas.cogentco.com         2.8%   0.8   4.6   0.7 171.8  19.9
4. te3-4.ccr02.bos01.atlas.cogentco.com              0.0%  12.6  14.7  12.0 183.1  17.4
5. te3-2.ccr02.ord01.atlas.cogentco.com              0.0%  33.7  35.6  33.2 190.6  15.1
6. te4-3.ccr02.mci01.atlas.cogentco.com              1.4%  45.7  49.1  45.4 199.4  20.8
7. te3-4.ccr02.sfo01.atlas.cogentco.com              0.0%  79.9  90.4  79.8 273.0  32.2
8. te4-4.ccr02.sjc01.atlas.cogentco.com              0.7%  80.9  82.6  80.7 261.1  15.2
9. te3-1.mpd01.sjc06.atlas.cogentco.com              0.0%  81.2  85.7  81.1 213.0  16.6
10. 38.104.134.14                                    0.0%  81.7 100.2  81.3 425.2  63.2
11. digg.com                                         0.0%  82.8  82.9  82.3  84.6   0.4

So, we can see to www.digg.com from one of my servers I’m getting a small amount of packet loss and a latency of 82ms.

And below is an mtr to voicestick.com. If this connection was being used for voip, even though the ping time is better than the one to digg, the quality would probably be awful due to the packet loss.

My traceroute  [v0.71]
server.sysadminman.net (0.0.0.0)
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
Packets               Pings
Host                                                 Loss%  Last   Avg  Best  Wrst StDev
1. 38.105.81.98                                      0.0%   0.1   0.1   0.1   0.2   0.0
2. gi0-6.na21.b003328-0.dca01.atlas.cogentco.com     0.0%   1.4   0.9   0.7   1.5   0.2
3. te9-3.3888.ccr02.dca01.atlas.cogentco.com         0.0%   1.0   1.9   0.8  19.1   3.7
4. te4-1.mpd01.dca02.atlas.cogentco.com              4.2%   1.3   1.6   1.2   3.4   0.5
5. vl3497.mpd01.iad01.atlas.cogentco.com             0.0%   1.7   1.7   1.3   2.7   0.3
6. ber1-ge-7-39.virginiaequinix.savvis.net           0.0%   1.6   1.8   1.4   2.5   0.3
7. cr1-tengig0-7-2-0.washington.savvis.net          60.9%   3.7   2.8   2.4   3.7   0.4
8. cr2-pos-0-0-3-1.Atlanta.savvis.net                0.0%  34.8  34.9  34.4  35.4   0.2
9. acr2-so-4-0-0.Atlanta.savvis.net                  0.0%  34.4  34.6  34.2  35.5   0.2
10. internap.Atlanta.savvis.net                      0.0%  17.0  20.3  14.4 115.4  21.4
11. border5.pc2-bbnet2.acs.pnap.net                  0.0%  16.0  32.0  14.4 205.1  47.3
12. i2telecom-2.border5.acs.pnap.net                 0.0%  15.1  15.1  14.6  15.6   0.3
13. 72.5.80.120                                      0.0%  15.6  17.4  15.2  56.4   8.5