Search code examples
linuxtraceroute

How to run a program with a URL or IP address parameter?


I want to run the traceroute program with a URL parameter (eg bbc.co.uk), and also a IP address (eg 134.170.188.221) but i'm at loss. Do I just type 'traceroute bbc.co.uk'? Also an explanation of the output would be great.


Solution

  • When you use traceroute, you just type the command followed by options and the url/IP you want to traceroute to.

    for example as you stated :

    traceroute www.google.com

    traceroute 192.168.0.1

    Depending on your linux distribution, you may find another command, traceroute6 wich only use IPV6. You also have options for IPV4/IPV6:

    traceroute -4 192.168.0.1

    traceroute -6 www.google.com

    The output is the route a tcp packet follow to reach the destination. The output will be formated like this :

    traceroute to www.google.com (77.95.65.106), 30 hops max, 60 byte packets

    1 192.168.0.1 (192.168.0.1) 0.404 ms 0.465 ms 0.321 ms

    2 mk1072-l1b-v500.rezopole.net (77.95.71.197) 20.743 ms 18.531 ms 16.897 ms

    3 * * *

    The first part is the address ot the network equipment responding to your traceroute. The second is the IP address of this network equipment. The rest of the line is the respond time. If the network equipment doesn't respond, you have a star.