Follow the path
Trace the route that traffic takes between two points, and find where it stops or goes the wrong way. You can travel the path from either end.
Also known as: follow-the-path, in Cisco training material. The same idea is used in other fields as tracing the route.
How it works
- Define the two ends: where the traffic starts, and where it should arrive.
- List the path between them, in order: the device, the local network, the gateway, any firewall, and the destination.
- Choose a direction. Starting at the source suits a fault reported by one user. Starting at the destination suits a fault reported by many users, or one that followed a change on the server.
- Test each step in turn and record the result.
- Stop at the first step that fails, or where the route is not the one you expected, and investigate there.
When to use it
- Something that used to be reachable now is not, and a path clearly exists between the two ends.
- You can reproduce the fault from one end of the path.
- The path is known, or easy to discover with a tool such as traceroute.
When another approach is better
- The path is long.Divide and conquerreaches the fault in fewer tests.
- The fault is in one application rather than on the path.Top-downstarts at the application.
- The fault comes and goes. A single pass may pass every step.
Worked example: from the source
Illustrative example
A user cannot reach an internal application. Starting from their machine, each step is tested in path order.
$ ping -c 3 192.0.2.1 3 packets transmitted, 3 received # default gateway: fine $ nslookup app.example.com Address: 198.51.100.20 # name resolves: fine $ traceroute 198.51.100.20 1 192.0.2.1 1.2 ms 2 10.0.0.1 3.4 ms 3 * * * # nothing after hop 2
The gateway answers, the name resolves, and the trace stops after the second hop. The third hop is where to look. A row of asterisks does not prove that device is faulty, because some devices do not answer probes. Confirm with a second test before acting.
Worked example: from the destination
Illustrative example
Everyone is getting errors from a web application. Starting on the server and working toward the users:
$ systemctl status app Active: active (running) # process is up $ ss -ltn | grep 8080 LISTEN 0 128 0.0.0.0:8080 # listening on all addresses $ curl -I http://127.0.0.1:8080/health HTTP/1.1 200 OK # works locally # from another host on the same subnet: $ curl -I http://192.0.2.10:8080/health curl: (7) Failed to connect
The service is healthy and answers locally, but a neighbour cannot reach it. The fault sits between the two, most likely a host firewall rule or a filter on the network.
Technique: packet capture and analysis
A trace shows where traffic stops. It does not say why. When a test shows a step failing, capturing the packets there shows what was sent and what came back. Packet capture is a technique that supports this method, and others, not a method of its own.
$ sudo tcpdump -ni eth0 host 198.51.100.20 and port 443 10:02:01 IP 192.0.2.50.51514 > 198.51.100.20.443: Flags [S] 10:02:02 IP 192.0.2.50.51514 > 198.51.100.20.443: Flags [S] 10:02:04 IP 192.0.2.50.51514 > 198.51.100.20.443: Flags [S]
The client sends a connection request three times and gets no reply. Capturing at the other end at the same time settles it. If the requests never arrive, something between the two is dropping them. If they arrive and nothing answers, look at the server and its own firewall. A reset instead would mean the host was reached and refused the connection.
Watch for
- Treating the first silent hop as the fault. Silence can mean "not answering probes", not "broken".
- Testing one direction only. The return path may be different, and may be the one that is broken.
- Using a different test from the user's. A successful ping does not mean the application can connect.
- Personal data in captures. A capture can contain credentials and private content. Capture only what you need, store it securely, and delete it when the work is done.
Related methodologies
-
Divide and conquer
: skip ahead by testing the middle.
-
Bottom-up
: work through the layers instead of the path.
-
Top-down
: start at the application.
Sources
- Method name and description:CCNP TSHOOT: Cisco Troubleshooting Techniques (Petri)andHow to Troubleshoot Networks (NetworkLessons).
- The worked examples and the direction guidance are this site's own.
$ traceroute 198.51.100.20
- Hop 1 Default gateway ✓ Forwarded
- Hop 2 Site router ✓ Forwarded
- Hop 3 No reply Nothing answers from here. Look here first. ✕ Dropped
- Hops 4 onward Later hops • Unreached
- Destination app.example.com • Unreached
In practice
Examples and contributions
Entries appear here when a contributor tags them with this methodology.