यह गाइड MTR और Traceroute से कनेक्टिविटी समस्याएँ, विलंबता और पैकेट लॉस विश्लेषण सिखाती है।
📋 पूर्वापेक्षाएँ
- root/sudo VPS, SSH
- Ubuntu/Debian
🔧 इंस्टॉलेशन
Bash# On Ubuntu/Debian sudo apt update sudo apt install traceroute -y
Bash# On Ubuntu/Debian sudo apt update sudo apt install mtr-tiny -y # For the full version with graphical interface (optional) sudo apt install mtr -y
Bash# Verify that traceroute is installed traceroute --version # Verify that MTR is installed mtr --version
🛠️ Traceroute
Bash# Traceroute to a destination traceroute google.com # Traceroute to an IP traceroute 8.8.8.8 # Limit the number of hops (default 30) traceroute -m 20 google.com # Specify timeout in seconds traceroute -w 5 google.com
Bash# Use UDP (default) traceroute -U google.com # Use TCP (more reliable) traceroute -T google.com # Use ICMP (like ping) traceroute -I google.com # Don't resolve DNS names (faster) traceroute -n google.com
उदाहरण:
traceroute to google.com (142.250.185.14), 30 hops max, 60 byte packets
1 10.0.0.1 (10.0.0.1) 0.123 ms 0.089 ms 0.067 ms
2 192.168.1.1 (192.168.1.1) 5.234 ms 5.189 ms 5.145 ms
3 * * *
4 8.8.8.8 (8.8.8.8) 12.456 ms 12.389 ms 12.334 ms
...
🚀 MTR (अनुशंसित)
MTR ping + traceroute जोड़कर रीयल-टाइम आँकड़े देता है।
Bash# MTR in interactive mode (recommended) mtr google.com # MTR with report (non-interactive) mtr --report google.com # MTR with 10 test packets mtr --report --report-cycles 10 google.com # MTR to an IP mtr --report 8.8.8.8
Bash# Specify the number of packets to send mtr --report --report-cycles 50 google.com # Use TCP instead of ICMP mtr --tcp --port 80 google.com # Use UDP mtr --udp --port 53 8.8.8.8 # Don't resolve DNS names mtr --no-dns google.com
इंटरैक्टिव मोड: d विवरण, n DNS, r रीसेट, q बाहर।
📊 परिणाम व्याख्या
विलंबता
- < 50 ms: उत्कृष्ट
- 50–100 ms: अच्छा
- 100–200 ms: स्वीकार्य
- > 200 ms: उच्च
पैकेट लॉस
- 0%: परफेक्ट
- < 1%: सामान्य
- > 5%: जाँच आवश्यक
तारांकन (*)
एक * = उस पैकेट पर कोई प्रतिक्रिया नहीं; तीन * = timeout या फ़ायरवॉल।
🎯 उपयोग केस
Bash# Test to Google DNS mtr --report --report-cycles 30 8.8.8.8 # Test to Cloudflare DNS mtr --report --report-cycles 30 1.1.1.1 # Test with TCP to bypass ICMP filters mtr --tcp --port 443 --report --report-cycles 50 google.com
Bash#!/bin/bash echo "=== MTR Test to Google DNS ===" mtr --report --report-cycles 30 8.8.8.8 echo -e "\n=== MTR Test to Cloudflare DNS ===" mtr --report --report-cycles 30 1.1.1.1 echo -e "\n=== MTR Test to your domain ===" mtr --report --report-cycles 30 your-domain.com
Bash# Save report to a file mtr --report --report-cycles 30 google.com > mtr-report-$(date +%Y%m%d).txt # With CSV format mtr --report --report-cycles 30 --csv google.com > mtr-report.csv
✅ सर्वोत्तम अभ्यास
- MTR को traceroute पर प्राथमिकता
- कई गंतव्य और समय पर परीक्षण
- ICMP फ़िल्टर हो तो TCP उपयोग करें
- मध्यवर्ती hop की उच्च विलंबता हमेशा समस्या नहीं — अंतिम विलंबता मायने रखती है
🆘 समस्या निवारण
Bash# If MTR doesn't work in interactive mode, use report mode mtr --report destination.com # Check MTR version mtr --version
Bash# Reinstall MTR sudo apt update sudo apt install mtr-tiny -y # Or install the full version sudo apt install mtr -y
सभी hop * दिखाएँ:
Bash# Your firewall is blocking ICMP # Test with TCP instead mtr --tcp --port 443 --report destination.com # Check firewall rules sudo ufw status sudo iptables -L
बैंडविड्थ परीक्षण: Speedtest गाइड
❓ अक्सर पूछे जाने वाले प्रश्न
प्र: Traceroute और MTR में अंतर?
उ: Traceroute कुछ पैकेट; MTR निरंतर आँकड़े — निदान के लिए बेहतर।
प्र: मध्यवर्ती hop की उच्च विलंबता?
उ: अंतिम विलंबता अच्छी हो तो चिंता न करें।
प्र: MTR में पैकेट लॉस?
उ: < 1% सामान्य; > 5% जाँच करें।
स्पष्ट नेटवर्क निदान! 🔍