Traceroute
Traceroute
Section titled “Traceroute”Traceroute maps the sequence of routers between the MikroTik device and a destination by sending probes with incrementally increasing TTL values. Each router that decrements TTL to zero returns an ICMP Time Exceeded message, revealing its address and the round-trip time to that hop.
Use traceroute when ping confirms reachability loss but you need to know where in the path the problem occurs.
Basic Usage
Section titled “Basic Usage”/tool traceroute address=8.8.8.8RouterOS displays results as hops are discovered. Press q or Ctrl+C to stop.
Properties
Section titled “Properties”Core Parameters
Section titled “Core Parameters”| Property | Description |
|---|---|
| address | Destination IP address or hostname |
| count | Number of probes per hop (default: 3) |
| timeout | Time to wait for each probe reply (default: 1s) |
| max-hops | Maximum number of hops before stopping (default: 30) |
Source and Interface Parameters
Section titled “Source and Interface Parameters”| Property | Description |
|---|---|
| src-address | Source IP address to use for probes. Use on multihomed routers to test a specific egress path |
| interface | Force probes out a specific interface |
Protocol Parameters
Section titled “Protocol Parameters”| Property | Description |
|---|---|
| protocol | Probe protocol: icmp (default) or udp. Switch to UDP to bypass firewalls that filter ICMP |
| port | Destination port for UDP probes (default: 33434) |
Examples
Section titled “Examples”Basic Path Discovery
Section titled “Basic Path Discovery”/tool traceroute address=8.8.8.8Tune Probe Count and Timing
Section titled “Tune Probe Count and Timing”/tool traceroute address=1.1.1.1 count=3 timeout=2sIncrease timeout if intermediate hops have high latency.
Force a Specific Source Address
Section titled “Force a Specific Source Address”/tool traceroute address=203.0.113.10 src-address=198.51.100.2Useful to verify egress path selection on routers with multiple WAN addresses.
Force a Specific Egress Interface
Section titled “Force a Specific Egress Interface”/tool traceroute address=203.0.113.10 interface=ether2Forces probes out a specific interface. Useful to test which path a given WAN link takes.
Use UDP Probes
Section titled “Use UDP Probes”/tool traceroute address=198.51.100.10 protocol=udp port=33434UDP probes match the behavior of traditional Unix traceroute.
Interpreting Output
Section titled “Interpreting Output”Each row in the output represents one hop:
# ADDRESS STATUS TIME1 TIME2 TIME31 192.168.88.1 sent=3 received=3 1ms 1ms 1ms2 10.0.0.1 sent=3 received=3 5ms 5ms 6ms3 * sent=3 received=0 timeout timeout timeout4 8.8.8.8 sent=3 received=3 12ms 12ms 13ms| Output | Meaning |
|---|---|
| IP address with RTT values | Hop responded to TTL-expired probes |
* (asterisk) | No reply received within timeout — hop is filtered or rate-limiting ICMP |
| Increasing RTT at a specific hop | Congestion or queuing at that router |
| RTT drops at a later hop | Asymmetric routing — return path differs from forward path |
| Final destination unreachable | Routing break, firewall block, or host down |
Timeouts Are Not Always Failures
Section titled “Timeouts Are Not Always Failures”A * at hop 3 with successful replies at hop 4 means hop 3 silently forwarded the packet but filtered the ICMP Time Exceeded response. This is normal on carrier networks. The data plane is functioning; only ICMP is filtered.
Asymmetric Routing
Section titled “Asymmetric Routing”Traceroute shows only the forward path. Return ICMP packets may travel a different route. High RTT variations or unexpected * entries at specific hops can indicate asymmetric routing rather than a fault.
To verify asymmetry, run traceroute from both ends and compare paths.
Traceroute vs. Ping
Section titled “Traceroute vs. Ping”| Capability | Ping | Traceroute |
|---|---|---|
| Test end-to-end reachability | ✓ | ✓ |
| Measure round-trip latency | ✓ | Per-hop |
| Identify which hop has the problem | ✗ | ✓ |
| Detect routing loops | ✗ | ✓ |
| Test policy routing / VRF paths | Partial | ✓ |
Use ping first to confirm the problem, then traceroute to localize it.
Common Troubleshooting Patterns
Section titled “Common Troubleshooting Patterns”Routing Loop
Section titled “Routing Loop”If the same IP addresses repeat across multiple hops, a routing loop exists. Check for conflicting static routes or an OSPF/BGP misconfiguration at those routers.
Path Breaks at a Known Hop
Section titled “Path Breaks at a Known Hop”# Confirm break is at hop 3 by comparing two different destinations/tool traceroute address=8.8.8.8/tool traceroute address=1.1.1.1If both fail at the same hop with the same next-hop IP, the issue is upstream of that router.
Validate Egress Path per Interface
Section titled “Validate Egress Path per Interface”# Via first ISP interface/tool traceroute address=203.0.113.10 interface=ether1
# Via second ISP interface/tool traceroute address=203.0.113.10 interface=ether2Compare outputs to confirm each interface routes traffic via the expected upstream.
Troubleshooting
Section titled “Troubleshooting”Exit Code -1 with No Output
Section titled “Exit Code -1 with No Output”Symptom: /tool traceroute returns exit code -1 with no output.
Cause: Using a slash path separator instead of a space — /tool/traceroute is invalid RouterOS syntax.
RouterOS menu paths use spaces to separate menu levels in the CLI:
# Correct/tool traceroute address=8.8.8.8
# Wrong — returns exit code -1/tool/traceroute address=8.8.8.8The forward-slash form is accepted as a path-style command prefix but does not resolve to any command, producing no output and exit code -1.
All Hops Show *
Section titled “All Hops Show *”Every hop timing out usually means the destination is unreachable or ICMP is blocked end-to-end. Try a UDP probe:
/tool traceroute address=8.8.8.8 protocol=udpTraceroute Stops Before Destination
Section titled “Traceroute Stops Before Destination”The path may exceed the default 30-hop limit. Increase max-hops:
/tool traceroute address=8.8.8.8 max-hops=64Related Resources
Section titled “Related Resources”- Ping — Test reachability before using traceroute to localize the fault
- Torch — Real-time per-flow traffic inspection on an interface
- RouterOS Troubleshooting Methodology — Systematic layer-by-layer diagnostic approach