4.1 Diagnose network faults using debug, traceroute, ping, SNMP and syslog
ENCOR 350-401 v1.2 · 4.0 Network Assurance
Troubleshooting is a method, not a guess. ENCOR expects you to choose the right tool for each question: ping for reachability, traceroute for the path, debug for what a process is doing, conditional debugs to keep it safe, and SNMP and syslog for what happened when you were not looking.
What you must know
- Use extended ping and traceroute options: source, size, DF bit, repeat, timeout.
- Read traceroute output, including
* * *and!H,!N,!Acodes. - Run debugs safely:
debug condition, logging to the buffer,undebug all. - Use syslog levels and SNMP traps to find when and where a fault started.
Ping and traceroute
R1# ping 10.2.2.2 source Loopback0 size 1500 df-bit repeat 100
Type escape sequence to abort.
Sending 100, 1500-byte ICMP Echos to 10.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
Packet sent with the DF bit set
M.M.M.M.M.
Success rate is 0 percent (0/100)| Ping code | Meaning |
|---|---|
| ! | Reply received |
| . | Timeout |
| U | Destination unreachable |
| M | Could not fragment (MTU) |
| Q | Source quench |
| & | TTL exceeded |
Sourcing a ping from a loopback tests the return route as well as the forward route. Traceroute sends probes with increasing TTL and lists each hop that answers; * * * means a hop did not reply (often an ACL or rate limit, not always a failure), and codes such as !H (host unreachable), !N (network unreachable) and !A (administratively prohibited, an ACL) show where it stops.
Debug safely
R1# debug condition interface GigabitEthernet0/1
R1# debug ip ospf adj
R1(config)# logging buffered 128000 debugging
R1(config)# no logging console
...
R1# show logging
R1# undebug allDebugs run at high priority and can overload a busy router's CPU. Narrow them with debug condition (an interface, address or username) or an ACL (debug ip packet 101 detail), send output to the buffer rather than the console, and stop everything with undebug all when done.
SNMP and syslog for history
Syslog and SNMP traps record when a fault started and on which device (1); ping and traceroute show where traffic stops now (2). Accurate NTP time on every device is what lets you line the events up.
Commands
ping <ip> source <intf> size <n> df-bit | Extended ping from a chosen source, with size and DF bit. |
traceroute <ip> source <intf> numeric | Path, hop by hop. |
show debugging | Which debugs are running. |
show logging | Buffered messages and logging settings. |
Exam traps
undebug all(oru all) stops every debug.* * *in a traceroute does not always mean failure: the hop may just not answer.- Pinging from a loopback tests the return path too.
Min a ping means an MTU problem with the DF bit set.
Check yourself
- A ping with
df-bit size 1500returnsM. What does it show? - A link in the path has an MTU below 1500 and the packet cannot be fragmented.
- How do you limit a debug to one interface?
debug condition interface <intf>before starting the debug.- Traceroute shows
!Aat hop 3. What does it mean? - Administratively prohibited: an ACL at that hop blocks the probe.
Labs
Try it live: Watch the network: syslog, SNMP and debug