Traceroute mit mtr 0.92.56 (network diagnostic tool) auf dem Pi oder Traceroute + Ping = mtr

Manchmal will man das Netzwerk analysieren und sehen wie der Weg zum Zielrechner läuft. Das geht mit Traceroute. Also z.B. traceroute wenzlaff.de

traceroute wenzlaff.de
traceroute to wenzlaff.de (81.169.145.80), 30 hops max, 60 byte packets
 1  home (x.x.x.x)  1.647 ms  1.675 ms  2.276 ms
 2  x.x.x.x (x.x.x.x)  10.776 ms  10.113 ms  9.227 ms
 3  f-ed3-i.F.DE.NET.DTAG.DE (62.154.14.138)  16.637 ms  16.677 ms  16.472 ms
 4  xe-3-0-1.atuin.as6724.net (62.157.249.198)  16.257 ms  16.188 ms  16.091 ms
 5  vl481.fiddlersriddle.as6724.net (81.169.144.121)  16.120 ms  16.333 ms  17.368 ms
 6  w80.rzone.de (81.169.145.80)  17.462 ms  18.176 ms  18.442 ms

Interesannter wird es in Verbindung mit dem ping. Dazu installieren wir das mtr programm mit sudo apt-get install mtr und schauen uns die Hilfe des Programms mit mtr -h an:

wenzlaff.info@pi-zero:/home/pi $ mtr -h
usage: mtr [--help] [--version] [-4|-6] [-F FILENAME]
		[--report] [--report-wide] [--displaymode MODE]
		[--xml] [--gtk] [--curses] [--raw] [--csv] [--json] [--split]
		[--no-dns] [--show-ips] [-o FIELDS] [-y IPINFO] [--aslookup]
		[-i INTERVAL] [-c COUNT] [-s PACKETSIZE] [-B BITPATTERN]
		[-Q TOS] [--mpls]
		[-a ADDRESS] [-f FIRST-TTL] [-m MAX-TTL] [-U MAX_UNKNOWN]
		[--udp] [--tcp] [--sctp] [-P PORT] [-L LOCALPORT] [-Z TIMEOUT]
		[-G GRACEPERIOD] [-M MARK] HOSTNAME
See the man page for details.

Ok, wir starten nun mtr mit dem Zielhost z.B. mit mtr wenzlaff.de und erhalten einen interaktiven Dialog. Wir klicken nun die d Taste und erhalten den Status in Echtzeit der letzten 70 Pings in einem schönen Diagramm:

Traceroute mit mtr 0.92.56 (network diagnostic tool) auf dem Pi oder Traceroute + Ping = mtr

Mit der h Taste, gibt es Hilfe:

Command:
  ?|h     help
  p       pause (SPACE to resume)
  d       switching display mode
  e       toggle MPLS information on/off
  n       toggle DNS on/off
  r       reset all counters
  o str   set the columns to display, default str='LRS N BAWV'
  j       toggle latency(LS NABWV)/jitter(DR AGJMXI) stats
  c <n>   report cycle n, default n=infinite
  i <n>   set the ping interval to n seconds, default n=1
  f <n>   set the initial time-to-live(ttl), default n=1
  m <n>   set the max time-to-live, default n= # of hops
  s <n>   set the packet size to n or random(n<0)
  b <c>   set ping bit pattern to c(0..255) or random(c<0)
  Q <t>   set ping packet's TOS to t
  u       switch between ICMP ECHO and UDP datagrams
  y       switching IP info
  z       toggle ASN info on/off

Das Programm kann auch einen Report im JSon Format ausgeben mit: mtr –json wenzlaff.info und in XML mit mtr –xml wenzlaff.info oder CSV analog.

Man kann sich auch selbst eine Version compilieren, den C-Code gibt es auf GitHub (https://github.com/traviscross/mtr). Folgende Schritte sind nötig und in ein paar Minuten auf dem Raspberry Pi erstellt:

# git repo clonen
git clone https://github.com/traviscross/mtr.git

# in das Verzeichnis gehen
cd mtr

# compilieren und bauen
./bootstrap.sh & ./configure & make

# nach ein paar minuten ist das Programm gebaut wurden und kann gestartet werden mit
sudo ./mtr wenzlaff.de 

# wenn wir die Version installieren wollen noch ein
sudo make install

Und schon hat man die aktuelle Version 0.92.56:

Traceroute mit mtr 0.92.56 (network diagnostic tool) auf dem Pi oder Traceroute + Ping = mtr

Aber nur auf die eigenen Server loslassen 😉

Ähnliche Artikel:

  1. Besser als ping ist noping auf dem Raspberry Pi
  2. Überwachung: Automatischer Ping an Server mit NodeRED auf Raspberry Pi (مراقبة)
  3. Raspberry Pi: “Es ist später als Du denkst!” oder Network Time Protocol (ntp) Sicherheitsupdate für Debian und Mac OS X veröffentlicht

wallpaper-1019588
Mit Kindern über gleichgeschlechtliche Liebe reden
wallpaper-1019588
[Comic] Seven Sons
wallpaper-1019588
Momentary Lily: Original-Anime angekündigt
wallpaper-1019588
LUCK LIFE: Band feiert Europapremiere auf der Connichi