Lab

Traceroute:-

Print the route packets trace to network host.

It provides information number of routes presents between source to destination. It is important command to understand network flow. It takes maimum 30 hops to traceoute route,it does not means that their is only 30 routers/intermediate routers , it estimated & takes only main ISP & forwared information.

Usage:-

    traceroute [-46dFITUnreAV] [-f first_ttl] [-g gate,...]
      [-i device] [-m max_ttl] [-p port] [-s src_addr]
      [-q nqueries] [-N squeries] [-t tos]
      [-l flow_label] [-w waittime] [-z sendwait] [-UL] [-D]
      [-P proto] [--sport=port] [-M method] [-O mod_options]
      [--mtu] [--back]
      host [packet_len]
    traceroute6  [options]
    tcptraceroute  [options]
    lft  [options]

Options:-

1. traceroute domain_name/IP_addr

ex. traceroute www.google.com

It gives the route information to reach destination address. Maximum 30 hops are their whin that limit only it provide route information. If we get asterisks * signs its because some ICMP packets block by firewall or not respond in timely manner.(here its because i use virtualbox). same command i run on my local machine it gives me full path as shown below:-


2. tracerout –mtu domain_name/IP_addr

ex. traceroute --mtu www.google.com

It gives information of mtu(maximum trasmistion unit) for hop, if firewall settings not blocking it. In the form of F=number.


3. traceroute –V

It tells the version traceroute used on your local machine.


4. traceroute –m count domain_name/IP_addr

ex. traceroute -m count 3 www.google.com

We know maximunm hop count is 30 we can limit that with this command with option m & providing count along with it,so it only show that no of hops. It count from starting incremental manner.

as shown below it just look upto first 3 hosts.(its virtual machine so its unable to dermine path)

same output on my local machine (as its windows so "-h" oprion used with traceoute)


5. traceroute –n domain_name/IP_addr

ex. traceroute -n www.google.com

With –n option it eliminates FKDN only shows ip address, only shows output in numerical form.

as its output on windows machine "d" option i used , as shown below its just show IP address No FKDN .


6. traceroute -4 /-6 domain_name

ex.traceroute -4 www.google.com

traceroute -6 www.google.com

Explicitly force to use IPv4 or IPv6 addressing scheme for tracerouting. By default it automatically choose protocol & resolve name.


7. traceroute -I domain_name/IP_addr

ex. traceroute -I www.google.com

It forces to choose ICMP_ECHO method for tracerouting.


8. traceroute -T domain_name/IP_addr

ex. traceroute -T www.google.com

It forces to choose TCP_SYN method for tracerouting.


9. traceroute -q domain_name/IP_addr

ex. traceroute -q www.google.com

option '-q' allows to change number of retries (default is 3).


10. traceroute domain_name/IP_addr packet_len

ex. traceroute www.google.com 80 It is use to modify original packet length using this command.

length of treaceroute packet here is 60 byte.as you can see below:

modified lenth of packet:


11. traceroute –F domain_name/IP_addr

ex. traceroute -F www,google.com

It means do not fragments or splits the original probes packet.


12. traceroute –f [first_ttl] domain_name/IP_addr

ex. traceroute -f 4 www.google.com

It specifies from which ttl to start routing , by default it start from 1.


13. traceroute -g [gateway] domain_name/IP_addr

Tells traceroute to add an IP source routing option to the outgoing packet that tells the network to route the packet through the specified gateway (most routers have disabled source routing for security reasons).


14. traceroute –i [interface] domain_name/IP_addr

We can mention interface so that from which interface traceroute should send packets. By default it is selected according to routing table.


15. traceroute [–N squeries] domain_name/IP_addr

With this we can specify maximum no. of prob packets send simultaneously. Maximum vaue is 16. But if we incease size their is chances of packet get lost. Same side it is speed up response


16. traceroute [-s source_addr] domain_name/IP_addr

With this we can choose alternative souce address from interfaces, default outgoing interface address used.


17. traceroute [-p port] domain_name/IP_addr

Used for UDP port


18. traceroute [-w timeout_time] domain_addr/IP_addr

It is used to set time to respond for each probe . by default it is 3 sec.