Traceroute
Preparation
- Perform this stage using your functioning PC.
- Download the traceroute source code from ftp://ftp.ee.lbl.gov/.
- Visit ftp://ftp.ee.lbl.gov/.
- Click on the link for the source code of the latest version of traceroute. You will need the source code in
.tar.gzformat.- At the time of writing the latest version of traceroute was kept in the file
traceroute.tar.gz.
- At the time of writing the latest version of traceroute was kept in the file
- You will be asked to where you wish to save the file. Chose a safe place and make a note of it.
- The download is about 72kb and will take less than a minute over a modem, and a lot less over a broadband connection.
- If you are using a download accelerator program, it will save the file to your default download directory.
- Burn the file
traceroute.tar.gzto a CD. This page assumes that the subdirectory/appsis used for the.tar.gzfile. The CD-ROM can be a multi-session disk.- Use your CD burning software to create an ISO9660 disc image with the file
traceroute.tar.gzin the/appsdirectory. - Burn the CD and verify the data stored on it.
- Use your CD burning software to create an ISO9660 disc image with the file
Booting
- Perform this stage and subsequent stages, unless otherwise stated, using your Core Linux PC.
- Boot your Core Linux PC.
- Login as
root. You will need to enter the password at the prompt.- Wait for the following text to appear:
localhost login: - Type
rootand press Enter. - The screen will display this message:
Password:- Enter the password for
rootthat you set earlier.- You will be shown a prompt that looks like this:
[~]#Extract the source
- Place the CD-R in the CD-ROM drive. Mount the CD-ROM drive under
/mnt/cdrom.- At the prompt enter:
mount /dev/hdb /mnt/cdrom - You will see the following line appear:
mount: block device /dev/hdb is write-protected, mounting read-only
- At the prompt enter:
- Change to the
/appsdirectory on the CD-R.- At the prompt enter:
cd /mnt/cdrom/apps - The prompt will change to:
[/mnt/cdrom/apps]#
- At the prompt enter:
- Copy the
traceroute.tar.gzfile to the directory/usr/src.- At the prompt enter:
cp traceroute.tar.gz /usr/src - The system will not display a message if everything is OK.
- At the prompt enter:
- Change to the
/usr/srcdirectory and extract the source from the.tar.gzfile.- At the prompt enter:
cd /usr/src - The prompt will change to:
[/usr/src]# - At the prompt enter:
tar -zxvf traceroute.tar.gz - A long stream of unzipping files and directories should scroll up the screen for about a second.
- At the prompt enter:
Configure and compile
- Change to the
/usr/src/traceroute-1.4a12directory.- At the prompt enter:
cd traceroute-1.4a12 - The prompt will change to:
[/usr/src/traceroute-1.4a12]#
- At the prompt enter:
- Change the value of the
MANDESTvariable in the fileMakefile.into/usr/man.- At the prompt enter:
nano Makefile.in - The screen will show the contents of
Makefile.inwith information about the file at the top and bottom of the screen. - Scroll down the document until you see the lines:
# Pathname of directory to install the man page
MANDEST = @mandir@ - Change the line to read:
MANDEST = /usr/man - Save the file and exit the text editor.
- Press Ctrl+x on the keyboard.
- The contents of the white line at the bottom of the screen will change to read:
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ? - Type
y. - The contents of the white line at the bottom of the screen will change to read:
File Name to write: Makefile.in - Press Enter.
- You will be returned to the system prompt.
- At the prompt enter:
- Run the
./configurescript.- At the prompt enter:
./configure - A few lines of code should should scroll up the screen for about five seconds.
- The script finishes with the line:
creating Makefile
- At the prompt enter:
- Run the
makeprogram.- At the prompt enter:
make - A long stream of processes should scroll up the screen for about five seconds.
- The program finishes with the line:
gcc -O -DHAVE_MALLOC_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_NET_ROUTE_H=1 -DHAVE_STRERROR=1 -DHAVE_USLEEP=1 -DHAVE_SETLINEBUF=1 -DBYTESWAP_IP_HDR=1 -DHAVE_ICMP_NEXTMTU=1 -I. -Ilinux-include -o traceroute traceroute.o ifaddrlist.o findsaddr-linux.o version.o
- At the prompt enter:
- Add the user
binto the system.- At the system prompt enter:
useradd bin - The system will not display a message if everything is OK.
- At the system prompt enter:
- Add the group
binto the system.- At the system prompt enter:
groupadd bin - The system will not display a message if everything is OK.
- At the system prompt enter:
- Run the
makeprogram with the argumentinstall.- At the prompt enter:
make install - The system displays finishes with the line:
/usr/bin/ginstall -c -m 4555 -o root -g bin traceroute /usr/local/sbin
- At the prompt enter:
- Link the executable
tracerouteto the/usr/bindirectory.- At the system prompt enter:
ln -s /usr/src/traceroute-1.4a12/traceroute /usr/bin/traceroute - The system will not display a message if everything is OK.
- At the system prompt enter:
- Run the
makeprogram with the argumentinstall-man.- At the prompt enter:
make install-man - The system displays finishes with the line:
/usr/bin/ginstall -c -m 444 -o bin -g bin traceroute.8 /usr/man/man8
- At the prompt enter:
Testing traceroute
- At the system prompt enter:
where
traceroute www.domain.comwww.domain.comis the domain to which you want to trace the route.- If the trace is successful, a numbered list of host names/IP addresses will appear until the destination is reached. Information regarding response times will be displayed as well.

The text of this page is licensed under a Creative Commons License.
- Enter the password for
- Wait for the following text to appear:
