Expert · Troubleshooting and the CCNA exam · topic 55 of 57 · 35 min
Troubleshooting tools and common faults
Explanation
ping
ping sends ICMP echo requests and waits for echo replies. ICMP (Internet Control Message Protocol) is the helper protocol IP uses for tests and error messages. A reply proves two-way reachability at layer 3. On a Cisco device, ! means a reply, . means a timeout, and U means a router said the destination is unreachable.
R1# ping 10.10.50.20 source GigabitEthernet0/1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.50.20, timeout is 2 seconds:
Packet sent with a source address of 10.10.30.1
!!!!!
Success rate is 100 percent (5/5)Typing ping on its own in privileged EXEC mode starts an extended ping, which asks for the target, repeat count, size, source address and more. It is useful to test from a specific interface or with large packets.
traceroute and tracert
traceroute shows each router on the path. It sends packets with TTL (time to live) 1, then 2, then 3. Each router lowers the TTL by one, and the router where it reaches zero drops the packet and sends back an ICMP time exceeded message, revealing itself. Windows uses tracert, which sends ICMP echoes; Cisco IOS and Linux traceroute send UDP probes by default. A row of * * * means no reply from that hop: often a firewall that filters these messages, or the point where the path breaks.
Checking the host
ipconfig /all # Windows: IP, mask, gateway, DNS servers, DHCP, MAC
ip addr # Linux: addresses on each interface
ip route # Linux: the default gateway
nslookup billing.hospital.local # does DNS resolve this name?Cisco show commands
| Command | What it tells you |
|---|---|
| show ip interface brief | Every interface with its IP address, status (layer 1) and protocol (layer 2) |
| show interfaces | Speed, duplex, errors (CRC, collisions), input and output rates |
| show vlan brief | Which VLANs exist and which access ports are in each |
| show interfaces trunk | Which ports are trunks, their native VLAN and the VLANs allowed and active |
| show ip route | The routing table: is there a route (or a default route) to the destination? |
| show ip ospf neighbor | OSPF neighbours and their state; FULL is healthy |
| show cdp neighbors | Directly connected Cisco devices and the ports they connect on: a live map |
| show logging | Recent log messages, such as links going up and down or ports err-disabled |
SW1# show ip interface brief
Interface IP-Address OK? Method Status Protocol
Vlan1 10.10.1.2 YES manual up up
GigabitEthernet1/0/1 unassigned YES unset up up
GigabitEthernet1/0/2 unassigned YES unset down down
GigabitEthernet1/0/3 unassigned YES unset administratively down downdebug, with care
debug commands print live messages about what a protocol is doing, such as debug ip ospf adj for OSPF neighbour forming. They are powerful but can use so much CPU that a busy router stops responding. Use them in a quiet period, as narrowly as possible, and turn them off with undebug all (or no debug all). Over SSH you also need terminal monitor to see the messages.
Common faults and their symptoms
| Fault | Symptom | Check with |
|---|---|---|
| Wrong default gateway on the PC | Reaches PCs in its own subnet, nothing outside | ipconfig /all |
| Wrong subnet mask | Some hosts reachable, others not; strange one-way problems | ipconfig /all, compare with the IP plan |
| Port in the wrong VLAN | Link is up but the PC cannot ping its gateway or neighbours | show vlan brief |
| Trunk does not allow the VLAN | A VLAN works on one switch but not across the trunk | show interfaces trunk |
| Duplex mismatch | Link up but very slow; late collisions on the half-duplex side, CRC errors on the other | show interfaces |
| ACL blocking | Gateway answers, but certain traffic beyond it fails | show access-lists (watch the match counters) |
| DNS failure | ping 8.8.8.8 works, but names do not resolve | nslookup, ipconfig /all (DNS server) |
| OSPF mismatch | No neighbour, or stuck in EXSTART: area, hello or dead timers, subnet, authentication or MTU differ | show ip ospf neighbor, show ip ospf interface |
| Port err-disabled | Link dead after a port security violation or BPDU guard | show interfaces status err-disabled, show logging |
Need help?
Stuck on a word or an idea? Search this course, or every course, and jump straight to the explanation or a worked question.
Try:
Watch the lesson
Troubleshooting tools and common faults · 1/8
In this lesson you will meet the tools that find most network faults, and the symptoms of the common ones.
Prefer a video by a teacher? Find free videos on “Cisco troubleshooting show ip interface brief ping traceroute common faults CCNA” on YouTube ↗
In real life: Finance cannot reach the internet, but HR can
At a startup in Pune, the finance team says the internet is down. The engineer pings 8.8.8.8 from a finance PC: it works. ping google.com fails with "could not find host". ipconfig /all shows the DNS server as 10.0.5.53, an old server switched off last week, while HR PCs use 10.0.1.53. The finance VLAN's DHCP scope was never updated. She fixes the DHCP option, the PCs renew their leases, and names resolve again. Five minutes, three commands.
Practice (0/3 done)
In show ip interface brief, an interface shows "administratively down" and "down". What is the cause?
Write not_up_up(output) that takes the text of show ip interface brief and returns a list of the interface names that are NOT up/up, in order. Skip the header line (it starts with "Interface") and blank lines. Careful: the status can be two words, "administratively down". The interface name is the first word and the protocol is the last word.
Write likely_fault(s) using the bottom-up order. s is a dict of True/False test results with the keys "link" (link light on), "dhcp" (got a real address, not 169.254), "gateway" (ping to the default gateway works), "remote_ip" (ping to a remote IP such as 8.8.8.8 works) and "dns" (names resolve). Return the FIRST failing check as: "cable", "dhcp", "vlan or ip settings", "routing or acl", "dns". If everything passes, return "application".
Quick quiz
Read more (free)
Related help
Before this, learn
This topic builds on these. If something here feels new, open them first.
Related topics
- The CCNA 200-301 exam and your study planTroubleshooting and the CCNA exam · same module
- Networking careers in India and beyondTroubleshooting and the CCNA exam · same module
- DHCP: automatic addressesIP services: DHCP, DNS, NAT and more
- Static and default routesRouting: static routes and OSPF
- Inter-VLAN routingSwitching and VLANs
- Linux networking for DevOpsDevOps: Git, Docker, Kubernetes and CI/CD · Linux for DevOps
Questions people ask about this
Open a question to see the answer and why. The first ones are this topic's own quiz, so try the quiz above before you peek.
A PC can ping 8.8.8.8 but not www.irctc.co.in. What is the most likely problem?
Answer: DNS
Reaching an IP address proves routing works. Failing on a name points to name resolution (DNS).
Which command shows the VLANs allowed on a trunk?
Answer: show interfaces trunk
show interfaces trunk lists trunk ports, the native VLAN, and the VLANs allowed and active on each.
How does traceroute find each router on the path?
Answer: It sends packets with TTL 1, 2, 3 and so on; each router where the TTL expires replies
Each router lowers the TTL; where it reaches zero, the router sends an ICMP time exceeded message and so reveals itself.
Two OSPF routers on the same link never become neighbours. Which mismatch can cause this?
Answer: Different hello and dead timers
Neighbours must agree on area, hello and dead timers, subnet and authentication. Hostnames and banners do not matter.
What should you always run after finishing with debug on a router?
Answer: undebug all
undebug all (or no debug all) stops every debug, so the router's CPU is not overloaded.
Which command shows the ARP cache on a Cisco router?Related
Answer: show ip arp
show ip arp lists IP-to-MAC mappings on IOS; arp -a is the Windows command.
Which command shares a router's static default route with its OSPF neighbours?Related
Answer: default-information originate
default-information originate, under router ospf, advertises the default route as O*E2.
Where do you configure ip helper-address?Related
Answer: On the router interface facing the DHCP clients
The relay must be on the interface that receives the clients' broadcasts, which is their default gateway.
The main path is learnt by OSPF. Which AD makes a static route a correct floating backup?Related
Answer: 130
The backup must have a higher AD than OSPF's 110, so 130 works. The others would beat OSPF.
Pass the quiz (60% or more) or mark this topic as done when you are ready.
Your progress is saved on this device only.
Next steps
- 2 more topics in “Troubleshooting and the CCNA exam” before its exam: The CCNA 200-301 exam and your study plan, Networking careers in India and beyond.
- Module 12 exam: Troubleshooting and the CCNA exam · 13 questions · 20 min, without help. 4 topics of this module still to finish first.
- 57 topics left in the course before the final exam.