Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
Wat het doet
tracepath sends UDP packets with a growing TTL. Each router that drops a packet answers, so you see the path hop by hop with times. It also finds the path MTU (pmtu).
It works like traceroute but needs no special rights and is installed on RHEL by default (iputils). For a live view use mtr.
Zo schrijf je het
tracepath [-4] [-6] [-n] [-b] [-l PKTLEN] [-m MAX_HOPS] [-p PORT] DESTINATIONOpties 8
Meest gebruikt
Niets past bij dit filter.
Voorbeelden 10
$ als gewone gebruiker# als root (of met sudo)
1Path to a host
tracepath -n www.redhat.com 1?: [LOCALHOST] pmtu 1500 1: 192.168.122.1 0.512ms 2: 10.0.0.1 2.104ms 3: no reply ..."no reply" = a router that does not answer (common).
2Names and addresses
tracepath -b server2.example.comShows both for each hop.
3Find the path MTU
tracepath -n 10.20.0.5 | grep pmtuA pmtu under 1500 explains hanging SSH or HTTPS over VPN.
4IPv6 path
tracepath -6 -n 2001:db8:10::1Check IPv6 routes separately from IPv4.
5Limit the hops
tracepath -n -m 5 8.8.8.8Only the first part of the path (your own network).
6Compare with the routing table
ip route get 8.8.8.8 8.8.8.8 via 192.168.122.1 dev enp1s0 src 192.168.122.10 uid 1000The first hop must be this gateway.
7Check if traffic goes through the VPN
tracepath -n 10.50.1.10The first hop should be the VPN address, not the home router.
8Save the path for a ticket
tracepath -n www.example.com > /tmp/path-$(date +%F).txtGive it to the network or hosting team.
9Use a fixed port
tracepath -p 33434 -n server2Some firewalls only allow certain UDP ports.
10When tracepath stops early
tracepath -n 192.168.200.5Endless "no reply" after hop 1: no route or a firewall after your gateway.
Niets past bij dit filter.
Exitcodes
0 :: The destination was reached. 1 :: Not reached or error.