Study of mtr Command

 

Experiment

Study of mtr Command

๐ŸŽฏ Aim

To analyze network connectivity and performance using the mtr command.


๐Ÿ“˜ Objective

By the end of this experiment, students will be able to:

  • Combine the functionality of ping and traceroute
  • Monitor real-time network path performance
  • Identify packet loss and latency at each hop
  • Diagnose network issues effectively

๐Ÿ“– Theory

The mtr (My Traceroute) command is a powerful network diagnostic tool that:

  • Combines ping (latency measurement)
  • Combines traceroute (path discovery)

๐Ÿ‘‰ It continuously sends packets and displays:

  • Route path (like traceroute)
  • Packet loss percentage
  • Round-trip time statistics

๐Ÿ‘‰ Unlike traceroute, it provides real-time dynamic updates.


๐Ÿงพ Syntax

mtr [options] <destination>

๐Ÿ”ง Common Options

  • -c <count> → Number of packets to send
  • -n → Do not resolve hostnames
  • -r → Report mode (non-interactive)
  • -w → Wide report format
  • -i <interval> → Set interval between packets
  • -u → Use UDP instead of ICMP

๐Ÿงฐ Prerequisites

  • Linux system
  • Internet connectivity
  • mtr installed

Installation:

sudo apt install mtr

๐Ÿ”ฌ Procedure & Commands

1️⃣ Run mtr (Interactive Mode)

mtr google.com

๐Ÿ‘‰ Displays real-time updates of network path.


2️⃣ Run in Report Mode

mtr -r google.com

๐Ÿ‘‰ Generates a summary after completion.


3️⃣ Set Number of Packets

mtr -c 10 google.com

4️⃣ Disable Hostname Resolution

mtr -n google.com

5️⃣ Wide Report Format

mtr -rw google.com

๐Ÿ–ฅ️ Sample Output

HOST: local Loss% Snt Last Avg Best Wrst StDev 1. 192.168.1.1 0.0% 10 1.2 1.1 1.0 1.5 0.2 2. 10.0.0.1 0.0% 10 5.3 5.1 5.0 5.6 0.3 3. 172.217.160.78 0.0% 10 20.4 21.0 19.8 22.5 0.8

๐Ÿ” Output Interpretation

FieldMeaning
Loss%    Packet loss percentage
Snt    Number of packets sent
Last    Last RTT
Avg    Average RTT
Best    Minimum RTT
Wrst    Maximum RTT
StDev    Variation in delay

๐Ÿ“ Exercises for Students

  1. Run mtr to a website and observe live updates.
  2. Identify hops with high latency.
  3. Detect packet loss in the route.
  4. Compare results with ping and traceroute.
  5. Use report mode and analyze statistics.

❓ Viva Questions

  • What is mtr?
  • How is mtr different from ping?
  • How is mtr different from traceroute?
  • What does packet loss indicate?
  • Why is mtr preferred for troubleshooting?

⚠️ Precautions

  • Continuous monitoring may generate network traffic
  • Some routers may block probes
  • Use in controlled lab environments

✅ Result

The mtr command is an advanced network diagnostic tool that provides real-time insights into network paths, latency, and packet loss, making it highly useful for troubleshooting.

Comments

Popular posts from this blog

Networks Lab PCCSL507 Semester 5 KTU CS 2024 Scheme - Dr Binu V P

Analysis of HTTP Protocol using Wireshark

Study and Use of ifconfig Command