about

sometimes i want or need to know the AS path from here to there. i downloaded prtraceroute from the PRIDE/ISI guys and used it for a while, but it started to not work as needed on my home network. hence, i decided to write my own tool.

requirements

tracepath is coded in Tcl/expect and uses the system's traceroute to do that part of the job, so you'll need to have that too. that's it. i tested on OpenBSD with Tcl 8.3 and expect 5.32.1.

usage

its very simple: tracepath [hostname]. example: from my dinner table to the crimelabs bbs:
$ ./tracepath noname.crimelabs.net  
spawn sh
traceroute -w 5 -f 7 -n noname.crimelabs.net
$ traceroute -w 5 -f 7 -n noname.crimelabs.net
traceroute to gein.crimelabs.net (12.100.16.116), 64 hops max, 40 byte packets
Skipping 6 intermediate hops
 7  68.42.244.162  13.117 ms  21.198 ms  13.538 ms
 8  12.124.15.57  13.845 ms  16.500 ms  15.881 ms
 9  12.123.139.26  14.927 ms  17.109 ms  23.712 ms
10  12.122.2.194  66.964 ms  20.942 ms  28.147 ms
11  12.122.11.62  22.588 ms  22.910 ms  20.645 ms
12  12.123.193.229  91.4 ms  196.446 ms  39.400 ms
13  12.126.246.2  39.793 ms  25.959 ms  33.865 ms
14  63.242.65.100  58.7 ms  51.14 ms  56.315 ms
15  12.100.16.116  54.660 ms  54.260 ms  53.650 ms
$ calculating AS path ...
AS path is: AS22909 AS7018 AS7018 AS7018 AS7018 AS7018 AS7018 AS1740 AS7018
i wrote this thing while waiting for a pizza to cook, by the way.

license

# Copyright 2002 Jose Nazario 
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#                                     
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

download

you can download the tool here:

example use: internet mapping

one of the things you can do with tracepath is map the internet. it's not too hard if you have the patience ... i would reccomend running many in parallel. i did a rough estimate of how long the tools i was using would have taken to run and it was approximately 5100 hours, or about 212 days. i obviouisly did not map the whole internet, i only gave it about a day to get a very complex picture. the small picture above is a thumbnail of the resulting dot directed graph. the blue diamond is me, and the granularity is at the autonomous system level.

more detailed pictures are here:

you can download the tools i did this with and the raw data i captured: i actually encourage you to take my data (or run your own, but no way am i liable for you violating your terms of service!!!) and process it to return the weighted edge for dot based on the latency from the traceroute. then you'd have a really information rich graph. you should also make it far prettier than i did here and color, perhaps on distance. i really need to go back over this data and make it wall art.

Sat Jul 27 16:53:47 EDT 2002