Ping and Traceroute

This is a little post for Keat on how to use these tools on the MAC to see where her IP traffic is going and hence get an idea of where the latencies in her network and hence issues for gaming are occurring.

Step 1: Go to the applications directory, open the utilities folder and run the terminal application. This brings up a terminal window which will be in the form ip-address (on the local network):- your user ID$

192-168-1-1:~ UID$

Step 2: Use Ping to ping the IP address or the URL of the server you are trying to connect to. Type ^C to end the ping session. Some servers do not let you ping or the pings may fail. If you say send 10 pings you will get an idea if there is packet loss on the network. If a ping does not work you will get the following message: Request timeout for icmp_seq 0.

192-168-1-1:~ UID$ ping yewenyi.net
PING yewenyi.net (122.201.79.205): 56 data bytes
64 bytes from 122.201.79.205: icmp_seq=0 ttl=59 time=23.258 ms
64 bytes from 122.201.79.205: icmp_seq=1 ttl=59 time=24.456 ms
64 bytes from 122.201.79.205: icmp_seq=2 ttl=59 time=24.503 ms
64 bytes from 122.201.79.205: icmp_seq=3 ttl=59 time=23.204 ms
64 bytes from 122.201.79.205: icmp_seq=4 ttl=59 time=24.375 ms
^C
--- yewenyi.net ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 23.204/23.959/24.503/0.596 ms

Step 3: Use Trace Route to determine where the packets are going. Normally you will be able to tell where the packets went. Here they go through several routers who’s names indicate that they are in Sydney. This packet does not leave Sydney as I and the server are both in Sydney.

192-168-1-1:~ UID$ traceroute yewenyi.net
traceroute to yewenyi.net (122.201.79.205), 64 hops max, 52 byte packets
1  mygateway1.ar7 (192.168.1.1)  2.921 ms  1.932 ms  1.571 ms
2  syd-pow-cla-bras2-lo-20 (10.20.20.125)  22.511 ms  22.202 ms  21.810 ms
3  syd-pow-cla-csw2-vlan-1 (202.7.166.198)  22.700 ms  23.469 ms  24.537 ms
4  syd-pow-cla-crt2-ge-4-0 (202.7.162.9)  21.570 ms  21.928 ms  22.144 ms
5  syd-nxg-men-crt1-po8 (202.7.171.161)  22.726 ms  22.423 ms  22.850 ms
6  as9512.sydney.pipenetworks.com (218.100.2.74)  22.847 ms  23.035 ms  22.890 ms
7  122.201.79.205 (122.201.79.205)  22.967 ms  23.859 ms  23.450 ms

Some routers do not respond with their details so you will see a line with stars. If a packet was lost you will also see a star. In this next example, the fourth hop router did not respond. After that the packet crosses the pacific ocean to what I’d guess is Palo Alto in California on line 6 and then San Jose in California in line 7 where it arrives at Twitter.

traceroute to twitter.com (199.59.148.83), 64 hops max, 52 byte packets
1  mygateway1.ar7 (192.168.1.1)  2.169 ms  1.396 ms  1.447 ms
2  syd-pow-cla-bras2-lo-20 (10.20.20.125)  21.588 ms  23.976 ms  33.908 ms
3  syd-pow-cla-csw1-vlan-10 (202.7.166.65)  42.009 ms  23.921 ms  22.441 ms
4  * * *
5  97.65.99.17 (97.65.99.17)  164.854 ms  164.679 ms  164.946 ms
6  pao1-pr1-ge-3-0-0-0.us.twtelecom.net (66.192.242.70)  179.233 ms  180.050 ms  188.583 ms
7  twitter-inc.car1.sanjose2.level3.net (4.59.0.238)  179.983 ms  179.417 ms  178.883 ms
8  199.16.159.29 (199.16.159.29)  183.950 ms  184.919 ms  184.617 ms
9  twitter.com (199.59.148.83)  183.934 ms  184.647 ms  185.724 ms

Here is an interesting example. The packet bound for london goes first to San Jose, then to New York, Washington, Frankfurt and then to London. Hence it has a higher delay than if it went directly via an Indian Ocean path. There are three routers in line 13 as there must be some load sharing on multiple links going on. As you can see, getting to London, even going via the USA and Germany takes about 340 ms, which is not unreasonable.

traceroute to bbc.co.uk (212.58.224.138), 64 hops max, 52 byte packets
1  mygateway1.ar7 (192.168.1.1)  2.059 ms  1.439 ms  1.393 ms
2  syd-pow-cla-bras2-lo-20 (10.20.20.125)  21.675 ms  47.108 ms  23.941 ms
3  syd-pow-cla-csw2-vlan-1 (202.7.166.198)  21.458 ms  27.799 ms  22.386 ms
4  syd-pow-cla-crt2-ge-4-0 (202.7.162.9)  21.704 ms  25.149 ms  22.392 ms
5  97.65.99.17 (97.65.99.17)  181.061 ms  163.916 ms  164.947 ms
6  pao1-pr1-ge-3-0-0-0.us.twtelecom.net (66.192.242.70)  178.788 ms  178.872 ms  179.320 ms
7  vlan60.csw1.sanjose1.level3.net (4.69.152.62)  178.650 ms  179.457 ms  178.936 ms
8  ae-61-61.ebr1.sanjose1.level3.net (4.69.153.1)  179.912 ms  180.220 ms  179.915 ms
9  ae-2-2.ebr2.newyork1.level3.net (4.69.135.186)  249.597 ms  248.157 ms  247.732 ms
10  ae-6-6.ebr2.newyork2.level3.net (4.69.141.22)  248.889 ms  248.412 ms  248.120 ms
11  ae-1-100.ebr1.newyork2.level3.net (4.69.135.253)  254.041 ms  248.557 ms  248.335 ms
12  ae-3-3.ebr2.washington1.level3.net (4.69.132.89)  253.735 ms  253.094 ms  253.401 ms
13  ae-43-43.ebr2.frankfurt1.level3.net (4.69.137.57)  341.351 ms
ae-41-41.ebr2.frankfurt1.level3.net (4.69.137.49)  342.898 ms
ae-42-42.ebr2.frankfurt1.level3.net (4.69.137.53)  343.004 ms
14  ae-24-24.ebr2.london1.level3.net (4.69.148.197)  349.566 ms  351.267 ms  349.580 ms
15  ae-21-52.car1.london1.level3.net (4.69.139.98)  351.361 ms  350.056 ms  351.703 ms
16  195.50.118.242 (195.50.118.242)  374.795 ms  383.621 ms  389.235 ms
17  212.58.238.153 (212.58.238.153)  384.954 ms  390.703 ms  390.643 ms

Here is a Sydney to Melbourne example. The packets hop onto the Telstra network in Sydney and then route to Melbourne. Again, the delays are what you would expect to see. Though you can see it takes longer for the packet to get from the router in my local exchange to the sydney ISP routers (22 ms) than it does for the packet to get from Sydney to Melbourne (about 10 ms). In optic fibre the speed of light is very close to 1 ms for every 100 km. So Sydney Melbourne being about 800 km (or more) would take at lease 8 ms. The other delays are likely due to buffering.

traceroute to telstra.com (144.140.108.23), 64 hops max, 52 byte packets
1 mygateway1.ar7 (192.168.1.1) 6.612 ms 1.734 ms 1.829 ms
2 syd-pow-cla-bras2-lo-20 (10.20.20.125) 21.779 ms 24.298 ms 22.256 ms
3 syd-pow-cla-csw1-vlan-10 (202.7.166.65) 22.280 ms 21.761 ms 21.960 ms
4 syd-pow-cla-crt1-ge-7-0 (202.7.162.141) 23.006 ms 22.623 ms 22.068 ms
5 syd-nxg-men-crt1-po7 (202.7.171.229) 21.845 ms 29.975 ms 22.035 ms
6 119.225.5.237 (119.225.5.237) 22.429 ms 22.784 ms 23.136 ms
7 * * *
8 bundle-ether15.ken39.sydney.telstra.net (165.228.132.205) 24.633 ms 23.534 ms 26.551 ms
9 bundle-ether6.ken-core4.sydney.telstra.net (203.50.6.145) 22.886 ms 22.725 ms 23.065 ms
10 bundle-pos3.win-core1.melbourne.telstra.net (203.50.11.13) 36.557 ms 35.503 ms 35.863 ms
11 tengigabitethernet8-1.exi2.melbourne.telstra.net (203.50.80.154) 34.898 ms 34.134 ms 33.820 ms
12 telstr312.lnk.telstra.net (139.130.1.246) 34.011 ms 34.727 ms 34.375 ms
13 * * *

Step 4: Type exit to end you terminal session. You can close it from the file menu.

192-168-1-1:~ UID$  exit
logout

[Process completed]

Leave a Reply

Your email address will not be published. Required fields are marked *