tonywhitmore.co.uk  

      blog : gallery : wiki : articles : projects : shell scripts : wallpaper : cv : links :
 Project Homepage

Traceroute

Preparation

  1. 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.gz format.
      • At the time of writing the latest version of traceroute was kept in the file traceroute.tar.gz.
    • 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.
  2. Burn the file traceroute.tar.gz to a CD. This page assumes that the subdirectory /apps is used for the .tar.gz file. 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.gz in the /apps directory.
    • Burn the CD and verify the data stored on it.

Back to simple version

Booting

  1. Boot your Core Linux PC.
  2. Login as root. You will need to enter the password at the prompt.
    • Wait for the following text to appear:
      localhost login:
    • Type root and press Enter.
    • The screen will display this message:
      Password:
    • Enter the password for root that you set earlier.
    • You will be shown a prompt that looks like this:
      [~]#

Back to simple version

Extract the source

  1. 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
  2. Change to the /apps directory on the CD-R.
    • At the prompt enter:
      cd /mnt/cdrom/apps
    • The prompt will change to:
      [/mnt/cdrom/apps]#
  3. Copy the traceroute.tar.gz file 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.
  4. Change to the /usr/src directory and extract the source from the .tar.gz file.
    • 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.

Back to simple version

Configure and compile

  1. Change to the /usr/src/traceroute-1.4a12 directory.
    • At the prompt enter:
      cd traceroute-1.4a12
    • The prompt will change to:
      [/usr/src/traceroute-1.4a12]#
  2. Change the value of the MANDEST variable in the file Makefile.in to /usr/man.
    • At the prompt enter:
      nano Makefile.in
    • The screen will show the contents of Makefile.in with 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.
  3. Run the ./configure script.
    • 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
  4. Run the make program.
    • 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
  5. Add the user bin to the system.
    • At the system prompt enter:
      useradd bin
    • The system will not display a message if everything is OK.
  6. Add the group bin to the system.
    • At the system prompt enter:
      groupadd bin
    • The system will not display a message if everything is OK.
  7. Run the make program with the argument install.
    • 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
  8. Link the executable traceroute to the /usr/bin directory.
    • 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.
  9. Run the make program with the argument install-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

Back to simple version

Testing traceroute

  1. At the system prompt enter:
    traceroute www.domain.com
    where www.domain.com is 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.

Back to simple version

Creative Commons License
The text of this page is licensed under a Creative Commons License.


Valid CSS!     Valid HTML 4.0!     Valid RSS
Original design © For oswd.org by SquireCD