Routing Troubleshooting Tools
# CHAPTER 16
Routing Troubleshooting Tools
1. Introduction
A pristine, perfectly designed network architecture is useless if you cannot fix it when it inevitably breaks. When a user complains, "The application is down," the problem could exist anywhere along a path of 15 different routers. You cannot randomly guess which router has failed. Network Engineers rely on a specific, powerful toolkit of command-line diagnostic utilities to scientifically isolate routing failures. In this chapter, we will master the operational tools of routing—ping, traceroute, ip route, and netstat—and build a systematic, deductive methodology for troubleshooting network blackouts.
2. Learning Objectives
By the end of this chapter, you will be able to:- Establish a structured, hop-by-hop troubleshooting methodology.
-
Utilize the
pingcommand to verify end-to-end ICMP connectivity.
-
Master
tracerouteto pinpoint the exact router causing a network failure.
-
Read and interrogate a local operating system's routing table using
netstatandroute.
- Diagnose routing loops and missing default gateways.
3. The Troubleshooting Methodology (Divide and Conquer)
When an issue is reported, professional engineers do not start by checking the firewall in London. They start at the user's laptop and slowly work their way outward.- 1. Ping the Localhost (127.0.0.1): Is the laptop's network card actually working?
- 2. Ping the Default Gateway: Can the laptop reach the local Home/Office Router?
- 3. Ping the Internet (8.8.8.8): Can the local Router successfully navigate the ISP?
- 4. Ping the Destination (The Server): Can the packets reach the final endpoint?
4. Tool 1: ping (The Connectivity Test)
ping sends a tiny ICMP Echo Request packet. The destination router or server receives it and replies with an Echo Reply.
-
Command:
ping 8.8.8.8
-
Output:
Reply from 8.8.8.8: bytes=32 time=14ms TTL=117
- What it proves: It proves that a valid, two-way routing path exists. It proves your router has a route to the destination, AND the destination has a route back to you.
*Note: If a ping times out, it does NOT definitively mean the server is dead. Many modern firewalls are configured to silently drop ICMP ping packets for security reasons.*
5. Tool 2: traceroute (The Path Finder)
Whileping tells you *if* a path exists, traceroute tells you *exactly what the path is*.
It does this by manipulating the TTL (Time to Live) field in the IP header.
-
Command (Windows):
tracert google.com
-
Command (Mac/Linux):
traceroute google.com
How it works:
- 1. It sends a packet with TTL=1. The very first router (Hop 1) receives it, decreases the TTL to 0, destroys the packet, and sends back an error: *"Time Exceeded."* You now know the IP of Hop 1!
- 2. It sends a packet with TTL=2. It passes Hop 1, hits Hop 2. Hop 2 destroys it and replies. You now know the IP of Hop 2!
- 3. It repeats this until the packet reaches the destination.
Troubleshooting Magic: If the internet is broken, traceroute will print:
Hop 1: 192.168.1.1
Hop 2: 10.0.5.1
Hop 3: * * * Request timed out.
You instantly know that the router at Hop 2 is working, but the link connecting Hop 2 to Hop 3 is completely broken. You have isolated the failure.
6. Tool 3: Interrogating the Local Routing Table
Often, the problem is not the network; the problem is the server itself. If a Linux server cannot reach a specific subnet, you must check its internal routing table.-
Command (Windows):
route print
-
Command (Mac/Linux):
ip routeornetstat -nr
What to look for:
Look for the 0.0.0.0/0 (Default) route. Does it point to the correct local router IP? If a server is moved to a new building but retains its old Default Gateway IP, it will be mathematically trapped and unable to route packets out of the room.
7. Diagnosing a Routing Loop
How do you know if you accidentally created a Routing Loop (as discussed in Chapter 4)? Run atraceroute.
If you see the output bouncing infinitely between two IP addresses until it fails, you have found a loop!
Hop 4: 10.0.1.1
Hop 5: 10.0.1.2
Hop 6: 10.0.1.1
Hop 7: 10.0.1.2
The routers are playing ping-pong with your packet. You must log into 10.0.1.1 and fix its static route.
8. Best Practices
-
Use IP Addresses, Not Domains: When troubleshooting routing, always
ping 8.8.8.8, notping google.com. If you pinggoogle.comand it fails, you do not know if you have a Routing problem or a DNS problem. By pinging a raw IP address, you completely bypass DNS and strictly test the routing layer.
9. Common Mistakes
- Ignoring the Return Path: A Junior Engineer uses traceroute to verify a packet reaches Router B. However, pings are still failing. They spend hours debugging the forward path. The mistake? They forgot to check Router B's routing table. The forward path is perfect, but Router B does not have a route *back* to the Junior Engineer's subnet. The packets reach the destination and are dropped on the return trip.
10. Mini Project: Trace the Global Path
Open your terminal right now.-
1.
Run
tracert 1.1.1.1(Windows) ortraceroute 1.1.1.1(Mac/Linux).
- 2. Count the number of hops.
- 3. Look at the latency (time in ms). Notice how the latency slowly increases the further the packet travels physically away from your house.
-
4.
If you see a hop containing an abbreviation like
chi-b21, you can guess the router is physically located in Chicago!
11. Practice Exercises
-
1.
Explain how the
traceroutecommand creatively exploits the IP Time-to-Live (TTL) field to map every router along a path.
-
2.
A server can successfully ping
192.168.1.1(its default gateway), but it fails to ping8.8.8.8. What step in the deductive troubleshooting methodology does this represent, and what is the likely point of failure?
12. MCQs with Answers
Which command-line utility provides a hop-by-hop list of every router a packet traverses to reach its final destination?
When troubleshooting a potential network outage, why is it recommended to ping 8.8.8.8 instead of ping google.com?
13. Interview Questions
-
Q: A user complains they have no internet. Walk me through the exact, step-by-step methodology you would use with the
pingcommand to isolate the failure.
-
Q: Explain the mechanical output of a
traceroutewhen a Routing Loop exists between two routers.
- Q: A server's forward route to a destination is verified as correct, yet two-way communication is failing. What critical routing concept dictates the necessity to examine the routing table of the destination server?
14. FAQs
Q: Why do some hops in my traceroute just show asterisks* * *?
A: That specific router is configured for high security. It is intentionally programmed to drop the TTL expired packets and refuse to send an error message back to you. The packet still routes *through* it perfectly, but the router refuses to identify itself to your traceroute tool.
15. Summary
In Chapter 16, we weaponized our theoretical knowledge into practical diagnostic skills. We established a strict, sequential troubleshooting methodology, working from the localhost outwards to the internet. We masteredping to verify two-way ICMP connectivity, and utilized traceroute to surgically isolate link failures and routing loops along the path. Finally, we emphasized the necessity of reading local server routing tables (ip route) to verify default gateways and ensure symmetrical return paths.