Home » Categories » Multiple Categories |
How To Use Traceroute and MTR to Diagnose Network Issues |
Article Number: 202 | Rating: Unrated | Last Updated: Fri, Dec 27, 2013 at 1:15 AM
|
IntroductionAn important part of administering servers is monitoring network connectivity.There are a few tools that are simple to use, but valuable to know. In this guide, we will discuss how to use a tool called We will also look at a utility called How To Use TracerouteTraceroute is a simple tool to show the pathway to a remote server. This can be anything from a website that you are attempting to visit, to a printer on your local network.The traceroute program is installed by default on just about every Linux distribution, so you shouldn't need to install it. To call it, we simply need to provide a website or IP address that we would like to explore:
How To Read Traceroute's OutputThe first line tells us the conditions that traceroute is operating under:
It gives the specified host, the IP address that DNS returns for that domain, the maximum number of hops to check, and the size of the packet that will be used. The maximum number of hops can be adjusted with the
You can adjust the size of the packet that is sent to each hop by giving the integer after the hostname: traceroute google.com 70 traceroute to google.com (173.194.38.128), 30 hops max, 70 byte packets 1 192.241.160.254 (192.241.160.254) 0.364 ms 0.330 ms 0.319 ms 2 192.241.164.237 (192.241.164.237) 0.284 ms 0.343 ms 0.321 ms After the first line, each subsequent line represents a "hop", or intermediate host that your traffic must pass through to reach the computer represented by the host you specified. Each line has the following format:
Here is an example of a hop you might see:
Here is what each field means:
If you would like to forgo the reverse DNS lookup to speed up the trace, you can pass the
If your traceroute dissolves into some asterisks (*), there is a problem with the route to the host.
What Does a Route Issue Mean?If your traceroute attempt stops at a particular hop or node and cannot find a route to the host, you have a problem.While the hop where the route fails to return may be the location of the networking issue, it isn't always that easy to diagnose. Due to the fact that each ping represents a round-trip packet, and the situation where packets often use different pathways in either direction, it may indicate a problem in a completely different, possibly closer route. It also may be the case that the problem is with the hop directly after the last hop you see. It is difficult to diagnose the exact location of the problem unless you can get a return traceroute from that specific hop. This is usually not possible outside of your own network. How To Use MTRA dynamic alternative to the traceroute program ismtr .
Combining the functionality of ping and traceroute, mtr allows you to
constantly poll a remote server and see how the latency and performance
changes over time.
Unlike traceroute, mtr is not installed by default on most systems. You can get it by typing the following commands. Ubuntu/Debian:
CentOS/Fedora:
Arch:
Once it is installed, you can call it by typing:
While the output may look similar, the big advantage over traceroute is that the output is constantly updated. This allows you to accumulate trends and averages, and also allows you to see how the network performance varies over time. If you ran a traceroute, there is a possibility that the packets that were sent to each hop happened to make the trip without incident, even in a situation where the route is suffering from intermittent packet loss. The mtr utility allows you to monitor for this situation by gathering data over a wider range of time. It is also possible to run mtr with the
This can be useful when you don't necessarily want to measure in real-time, but you want a greater range of data than traceroute provides. ConclusionWith traceroute and mtr, you can get a sense as to which servers on your way to a specific domain or address are causing problems. This can be useful when troubleshooting an internal network, and also when trying to provide information to support members or ISPs when you are experiencing network problems. |
Attachments
![]()
There are no attachments for this article.
|
The Basics of Using the Sed Stream Editor to Manipulate Text in Linux
Viewed 6572 times since Fri, Dec 27, 2013
An Introduction to Linux Basics
Viewed 6505 times since Fri, Dec 27, 2013
How To Set Up a Postfix Email Server with Dovecot: Dynamic Maildirs and LMTP
Viewed 3664 times since Mon, Dec 30, 2013
How To Setup Ruby on Rails with Postgres
Viewed 11656 times since Mon, Dec 30, 2013
How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack on Debian 7
Viewed 3932 times since Fri, Dec 27, 2013
How To Use Dokku Plugins to Access Additional Functionality
Viewed 4733 times since Sun, Dec 29, 2013
How To Install and Use Memcache on Ubuntu 12.04
Viewed 3594 times since Tue, Dec 24, 2013
How To Install Wordpress on Arch Linux
Viewed 2637 times since Sun, Dec 29, 2013
How To Create a SSL Certificate on Apache for Debian 7
Viewed 2487 times since Fri, Dec 27, 2013
How To Install and Use PostgreSQL on Ubuntu 12.04
Viewed 6316 times since Mon, Dec 30, 2013
|