Q. How do I find out the network path and/or router that is being used to reach a particular host on the internet?

A. You need to use traceroute command, which display the route packets take to network host on the Internet. It traces a packet from your computer to an Internet host, showing how many hops the packet requires to reach the host and how long each hop takes. Very useful to troubleshot network problem.

As you may be aware that the Internet is a large and complex aggregation of network hardware, connected together by gateways. Tracking the route one’s packets follow (or finding the miscreant gateway that’s discarding your packets) can be difficult.

Tracing routes under Linux/UNIX

Use traceroute command as follows:
$ traceroute cyberciti.biz

1  gateway-29.0.vsnl.net.in (  0.706 ms  0.887 ms  5.442 ms
2 (  1.123 ms  0.597 ms  0.566 ms
3 (  0.633 ms  1.109 ms  0.627 ms
4  nny-mum-6th-stm1.Bbone.vsnl.net.in (  211.014 ms  217.451 ms  210.244 ms
5 (  213.922 ms  213.965 ms  213.777 ms
6  ge-0-0-9.p812.pat1.dce.yahoo.com (  229.726 ms  220.475 ms  219.694 ms
7  vlan240-msr1.re1.yahoo.com (  220.287 ms ge-3-1-0.p440-msr1.re1.yahoo.com (  230.317 ms *
9  p5w4.geo.re2.yahoo.com (  346.741 ms  346.824 ms  346.111 ms

Tracing routes under MS-Windows NT/XP/2000/2003/Vista

Use tracert command. Click on Start > Run and type following command:
tracert cyberciti.biz
Please note that traceroute utilizes the IP protocol time to live field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to some host. For security reason some ISP / network admin (stupid move IMPO) may block access to traceroute. You can bypass this restriction with tcptraceroute command for most common firewall filters.

You can also try out online traceroute from leading Indian ISP (Internet/broadband service provider’s web site):

  1. Net4India Ltd, Delhi
  2. Software Technology Parks of India, Lucknow

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 0 comments... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum