Forrest logo
tool overview
On this page you find all important commands for the CLI tool mtr. If the command you are looking for is missing please ask our AI.

mtr

MTR, short for "My Traceroute," is a command line networking tool used for network diagnostics and troubleshooting. It combines the functionality of both traceroute and ping commands into a single utility.

MTR provides a detailed analysis of the path taken by network packets from the source to the destination, showing hop-by-hop information such as IP addresses, round-trip time (RTT), packet loss, and network latency.

One of the key features of MTR is its continuous mode, where it constantly monitors the network path and updates the statistics in real-time. This allows users to identify intermittent issues, packet drops, and performance problems that may occur over time.

MTR includes various options and parameters to customize its behavior. Users can set the packet size, interval between packets, number of packets sent, and maximum hop count to define the scope of the analysis. It also offers options for resolving hostnames, enabling IPv6 support, and displaying ICMP or UDP based traceroutes.

As MTR traces the route, it performs both ICMP echo requests (ping) and ICMP time exceeded messages (traceroute). This allows it to provide comprehensive information about network connections between hosts.

The results generated by MTR are presented in a continuously updating screen, showing the statistics for each hop in a tabular format. It includes packet loss percentage, minimum, average, and maximum round-trip times, as well as standard deviation values.

MTR is available for various operating systems including Unix-like systems (Linux, macOS) and Windows. It is an open-source tool and widely used by network administrators, engineers, and enthusiasts for network analysis, diagnosing network problems, and monitoring network performance.

The tool uses a combination of UDP and ICMP protocol for its operations. UDP is used to send packets and ICMP is used for receiving ICMP time exceeded and ICMP echo replies.

MTR is an invaluable tool in network troubleshooting, as its real-time monitoring capabilities provide instantaneous feedback on network performance and connectivity issues, helping users pinpoint problems and resolve them efficiently.

List of commands for mtr:

  • mtr:tldr:0834c mtr: Traceroute to a host and continuously ping all intermediary hops.
    $ mtr ${host}
    try on your machine
    explain this command
  • mtr:tldr:21616 mtr: Display the Autonomous System Number (ASN) for each hop.
    $ mtr --aslookup ${hostname}
    try on your machine
    explain this command
  • mtr:tldr:50527 mtr: Force IP IPv4 or IPV6.
    $ mtr -4 ${host}
    try on your machine
    explain this command
  • mtr:tldr:a2b9a mtr: Disable IP address and host name mapping.
    $ mtr -n ${host}
    try on your machine
    explain this command
  • mtr:tldr:cabde mtr: Wait for a given time (in seconds) before sending another packet to the same hop.
    $ mtr -i ${seconds} ${host}
    try on your machine
    explain this command
  • mtr:tldr:f0bf5 mtr: Generate output after pinging each hop 10 times.
    $ mtr -w ${host}
    try on your machine
    explain this command
tool overview