"traceroute" - Trace Route to Remote Host

This section provides a tutorial example on how to use 'traceroute' command to trace route (or gateways) between the local host and a given remote host.

"traceroute" is a command line tool that allows to trace route between the local host and a given remote host. "traceroute" utilizes the IP protocol "TTL (Time To Live)" field and attempts to elicit an ICMP TIME_EXCEEDED (Time To Live Exceeded) response from each gateway along the path to some host.

First install "traceroute" using the APT command.

herong$ sudo apt install traceroute 

Then try to find the network route to bing.com.

herong$ traceroute bing.com 

 1  _gateway (10.0.0.1)  2.878 ms  2.889 ms  3.219 ms
 2  75.138.242.57 (75.138.242.57)  23.509 ms  23.428 ms  23.384 ms
 3  po-rur303.newyork.comcast.net (...)  19.627 ms  19.591 ms  21.377 ms
 4  * * *
 5  * be-21-0.ibr02.by4.ntwk.msn.net (104.44.21.7)  30.091 ms *
 6  be-21-0.ibr02.by4.ntwk.msn.net (104.44.21.7)  32.414 ms  34.056 ms *
 7  * 51.10.4.48 (51.10.4.48)  33.945 ms  33.199 ms
 8  51.10.4.50 (51.10.4.50)  33.133 ms 
    be-5-0.ibr01.nyc30.ntwk.msn.net (104.44.7.102)  27.300 ms *
 9  ae25-0.ear05.nyc30.ntwk.msn.net (104.44.33.216)  35.497 ms 
    be-5-0.ibr01.nyc30.ntwk.msn.net (104.44.7.102)  23.759 ms 
    ae24-0.ear04.nyc30.ntwk.msn.net (104.44.33.206)  25.149 ms
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *

Here is how to read the output.

Again, Internet routes are not static. This is why 3 TTL=9 requests were responded by 3 different gateways.

If an ECHO_REQUEST did not receive a response (an ECHO_RESPONSE, or an TIME_EXCEEDED), it is usually the result of gateway's setting to not respond on TIME_EXCEEDED error.

Table of Contents

 About This Book

 Introduction to Ubuntu Systems

 GNOME - Desktop Interface and Environment

 Shell - The Command-Line Interpreter

 Process Management

 Memory Management

 Files and Directories

 APT (Advanced Package Tool)

Network Connection on Ubuntu

 Connect to Wi-Fi with GNOME Settings

"traceroute" - Trace Route to Remote Host

 "ifconfig" - Trace Routes to Remote Host

 "route" - Manage Routing Table

 "netstat" - Display Network Statistics

 "lsof" - List of Open Files

 Internet Networking Tools

 SSH Protocol and ssh/scp Commands

 Administrative Tasks

 References

 Full Version in PDF/EPUB