BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Learning paths › CCNA › 1. Network Fundamentals

Network Diagnostics

Written reference: Systematic troubleshooting: duplex mismatches, cable faults, show interface errors, and ping/traceroute verification.

About 28 minutes

Why it matters

A fault is easier to fix when you work through it in order instead of guessing. This lesson gives you a method and the evidence behind each step.

Fixing Network Faults

Troubleshooting is a loop, not a lookup: state the symptom precisely, decide which layer to test, gather evidence that separates two candidate causes, change one thing, verify, and record it.

The line state and the protocol state are two different answers. up/down means the physical link succeeded and the protocol did not; down/down is usually physical; administratively down is somebody's shutdown; err-disabled is a feature switching the port off on purpose.

Counters say what kind of fault it is. CRC errors with almost no collisions point at the cable or at interference; late collisions point at a duplex mismatch; output drops point at congestion rather than at damage.

Ping proves Layer 3 reachability in both directions, traceroute finds the hop where that stops, and the exact wording of a failure tells you who gave up.

A Method That Survives Pressure

1. State the symptom in testable words. "The network is slow" is not testable; "copying a file from this host to that server takes four minutes and takes ten seconds from the host next to it" is. 2. Establish scope, because scope narrows cause faster than any command. One host, one port, one VLAN, one switch, or everything? Two hosts on the same switch behaving differently rules out the uplink immediately. 3. Choose a direction. Bottom-up when the symptom smells physical - one port, intermittent, recently recabled. Top-down when an application is involved and everything else works. Divide and conquer when you can test from the middle, which on a network usually means pinging from a router. 4. Form two candidate causes and find the evidence that separates them. This is the step that gets skipped, and it is the step that makes the difference between diagnosis and substitution. 5. Change one thing. Verify. If it did not help, put it back before trying the next thing - a half-reverted change is how a second fault joins the first. 6. Record what it was. The same fault returns, often to the same port.

Reading the Interface

show interfaces GigabitEthernet0/1 opens with the finding that decides where to look next:

GigabitEthernet0/1 is up, line protocol is up

The first state is the physical link - carrier present, negotiation complete. The second is whether the interface can pass traffic. The two together narrow the problem before anything else is read: • up/up and a complaint: the link is fine, so read the duplex, the speed and the counters. • up/down: Layer 1 succeeded and Layer 2 did not. On Ethernet this is rare; on a serial link it is an encapsulation mismatch or a missing clock rate; with keepalives involved it is the far end not answering. • down/down: physical. Cable, transceiver, media type, or the far end being shut down. • administratively down: somebody typed shutdown. No amount of cable testing will change it, and this is the single most common cause of a "dead port" that tests perfectly.

Then read the duplex and speed line, and read it on both ends. show interfaces status gives one line per port, which makes a mismatch visible by comparison rather than by memory. A port that negotiated 10 Mbps half duplex on modern hardware did not negotiate at all - it failed to, and fell back.

Duplex Mismatch, Mechanism and Fingerprint

Half duplex is CSMA/CD: listen before transmitting, and if another station starts at the same time, detect the collision, stop, back off, retry. Full duplex abandons that entirely - with one station at each end of a dedicated pair there is nothing to collide with, so a full-duplex interface transmits whenever it has something to send.

Put one of each on the same link. The full-duplex end sends mid-frame while the half-duplex end is transmitting. The half-duplex end detects that as a collision. Because it has already sent more than the 64-byte slot time, it is counted as a late collision - which is the fingerprint, because a late collision is impossible on a correctly configured link of any kind. It backs off, retries, and its own frame arrives at the other end truncated, where it is counted as a CRC error or a runt.

The reason this fault survives so long in production is the shape of its symptoms: • The link reports up/up. Nothing is down, so nothing alarms. • A ping works. One small packet each way rarely collides. • A file copy collapses. Sustained bidirectional traffic collides constantly, so throughput falls by an order of magnitude or more. • Each end shows different counters, so an engineer looking at one end sees half the story.

The fix is to make both ends agree: either both autonegotiating, or both hard-coded to the same speed and duplex. Hard-coding one end only is the usual cause in the first place, because an end that is hard-coded does not negotiate, and the other end then falls back to half duplex.

Symptom Patterns Worth Recognising On Sight

Some symptoms name their own cause, and recognising them saves the whole method: • A host with an address in 169.254.0.0/16 did not get a DHCP lease. It assigned itself that address, so the fault is DHCP - the server, the relay, the scope, or the port's VLAN - and not anything about the host's own configuration. • Ping by address works and ping by name fails. Connectivity and routing are fine; name resolution is not. Check the DNS server the host was given, and whether anything is filtering port 53. • Two hosts on the same switch cannot reach each other. Before anything else, check they are in the same VLAN and the same IP subnet. show interfaces status answers the first and the hosts' own addresses answer the second, and one of the two is wrong far more often than the switch is. • A port that works, but only about thirty seconds after something is plugged in. That is spanning tree moving through listening and learning. On a port with an end device attached it is what PortFast removes. • Everything on one subnet fails and everything else is fine. Suspect the gateway for that subnet - an SVI that is down, a VLAN that does not exist on the distribution switch, or a first-hop redundancy group with no active router. • The symptom appeared at the same moment as a change. Look at the change first, however unrelated it seems. Coincidence is real and is also the least likely of the two explanations.

Ping, Traceroute, and the Wording of a Failure

Ping sends ICMP echo requests and waits for replies, so a success proves a path in both directions. A failure needs reading rather than counting: • Request timed out - nothing came back. The request may be arriving perfectly and the reply may be what is lost, which is why a failing ping never proves the direction of the fault. • Destination host unreachable - an ICMP message from a device that gave up: your own host with no route or no gateway ARP, or a router with no matching route. The useful part is that it names the device that answered, which is the device whose routing table to read. • Destination net unreachable - the same from a router that had no route to the network, as opposed to no answer from the host.

Traceroute exploits TTL. The first packets go out with TTL 1, so the first router decrements it to zero, discards the packet and reports back with ICMP time exceeded; its address is the first hop. TTL 2 reaches the second router, and so on, until the destination replies. Two consequences: • Asterisks mean no reply from that hop, not a break at that hop. If later hops answer, that hop forwarded the packet and merely declined to talk about it. • The path shown is the forward path only. The reply takes whatever path the far end's routing chooses, so a problem that only affects traffic in one direction will not appear where you expect it.

On a router, extended ping is the version worth knowing: it lets you set the source address, so you can test the path a user's subnet actually takes rather than the path from the router's own closest interface. Sourcing a ping from the wrong interface and concluding the path works is a specific and common way to be confidently wrong.

Interface Status, and What Each Pair Rules Out

Line / protocol: up / up · Usual cause: Working · First thing to check: Duplex, speed and the error counters, if the complaint is slowness

Line / protocol: up / down · Usual cause: Layer 2: keepalives, encapsulation mismatch, no clock rate on a serial link · First thing to check: The far end's configuration, not the cable

Line / protocol: down / down · Usual cause: Physical: no cable, wrong media, dead far end, failed negotiation · First thing to check: Cable, transceiver, and whether the far end is shut down

Line / protocol: administratively down / down · Usual cause: shutdown is in the configuration · First thing to check: no shutdown

Line / protocol: err-disabled (in show interfaces status) · Usual cause: A feature disabled the port: port security, BPDU guard, link flap · First thing to check: The log entry naming the reason, and show errdisable recovery

Which Counter Means What

Counter rising: CRC/FCS errors, few collisions · What it indicates: Damaged frames: bad cable or connector, interference, failing transceiver · What it is not: Congestion

Counter rising: Late collisions · What it indicates: A duplex mismatch on this link · What it is not: A bad cable

Counter rising: Collisions, no late collisions · What it indicates: A genuine half-duplex shared segment under load · What it is not: Possible at all on a full-duplex link

Counter rising: Runts · What it indicates: Frames cut short, by collisions or a duplex mismatch · What it is not: Caused by a VLAN tag

Counter rising: Giants · What it indicates: Frames over the maximum: a tagging or MTU mismatch · What it is not: A duplex problem

Counter rising: Output drops / output queue drops · What it indicates: The interface has more to send than the link can carry - congestion · What it is not: Frame damage

Counter rising: Input errors, with nothing else rising · What it indicates: A total. Read the individual counters beneath it before concluding anything · What it is not: A diagnosis in itself

The words you need

Line status / protocol status — In GigabitEthernet0/1 is up, line protocol is up, the first is the physical link and the second is whether the interface can pass traffic. The pair, not either half, is the finding.

Administratively down — The interface is shut down in the configuration. No cable, SFP or far-end change will alter it.

err-disabled — A port a feature disabled - a port security violation, BPDU guard, or link flapping. It stays down until bounced or until errdisable recovery times it back in.

Runt / giant — A frame shorter than 64 bytes, or longer than the maximum of 1518 bytes (1522 with a VLAN tag).

CRC / FCS error — The frame's checksum did not match what arrived, so the frame was damaged or truncated in transit. Counted by the receiver, caused by the link.

Late collision — A collision detected after the first 64 bytes have been transmitted. On a correctly configured link it cannot happen, which is what makes it a duplex-mismatch fingerprint.

Duplex mismatch — One end full duplex, the other half. The link stays up and throughput collapses under load, because the half-duplex end treats the other end's transmissions as collisions.

Divide and conquer — Starting at a middle layer, usually Layer 3 with a ping, and moving up or down depending on the result - the fastest method when you have access to test from the middle.

The commands from this module

Each of these appeared above. Run them here so they are in your fingers, not just your notes.

These commands are reference examples. Use the separate hands-on lessons to configure and verify the feature; reading this example does not execute or validate a device change.

show ip interface brief
show interfaces status
show interfaces GigabitEthernet0/1
clear counters
ping 10.1.1.9
traceroute 10.1.1.9

A method, so you are not guessing

Troubleshooting is easiest when you pick an order and stick to it. Bottom-up starts at the physical layer and climbs: link, VLAN, IP settings, routing, services. Top-down starts at the application and works down, which is quick when you suspect one service. Divide-and-conquer picks a middle layer, usually a ping, and moves up or down depending on the result. Whatever you choose, change one thing at a time, note what you ruled out, and verify with a command rather than a feeling.

A useful default for a "user cannot reach X" ticket: (1) is the link up and in the right VLAN, (2) does the host have a valid address, mask and gateway, (3) can it reach its gateway, (4) can it reach a remote IP address, (5) can it resolve and reach the name. Each step isolates a layer. Reaching a remote IP but not a name points at DNS; reaching the gateway but nothing beyond it points at routing, NAT or an ACL.

Reading interface evidence (blueprint 1.4)

The first line of show interfaces carries two states: the physical line and the line protocol. "up, line protocol is up" is healthy. "up, line protocol is down" usually means a Layer 2 problem such as an encapsulation or keepalive mismatch. "down, line protocol is down" points to cabling or a dead far end. "administratively down" means someone ran shutdown, and the cure is no shutdown, not a new cable.

The counters tell you why a working link performs badly. CRC and input errors suggest a damaged cable, bad connector or interference. Runts are frames shorter than the Ethernet minimum and giants are longer than expected, which can come from collisions, a faulty NIC or an MTU disagreement. Collisions are normal on half duplex but should not exist on a full-duplex link, and late collisions point to a duplex mismatch or a cable that is too long. A classic mismatch happens when one end is hard-coded and the other left on auto: the auto side can sense speed but falls back to half duplex. The half-duplex side then logs collisions and late collisions while the full-duplex side logs CRC/frame errors, and users report a link that is "up but slow". Watch the counters over time with clear counters, because the totals include history.

Ping, traceroute and what their output means

On an IOS device, an exclamation mark in ping output is a reply, a dot is a timeout, and U means a destination-unreachable came back. A router pinging from its own CLI uses the outgoing interface address as the source unless you use an extended ping, so a ping that works from the router can still fail from a host whose subnet has no return route. Traceroute lists each hop in turn; the last hop shown before the stars is where to look, though a hop that merely hides itself from ICMP can look the same as a real fault.

Worked example: a PC can ping its gateway but not 203.0.113.10, while the router itself can ping 203.0.113.10. The link and the PC are fine. The difference between the two tests is the source address, so suspect the return path (a missing route or NAT for the PC subnet) or an ACL that matches only the PC subnet. A host that can ping 203.0.113.10 but not a hostname is a name-resolution fault, not a network one.

Check: duplex mismatch

A link is up and passes traffic slowly. The switch port shows late collisions and runts; the router port shows CRC and frame errors. What is the most likely cause?

A queue of four records, and the order to read them in

Practice puts four pieces of evidence from one "a user cannot reach the application" ticket in front of you, in the order they arrived rather than the order they are worth reading.

Give each a position, then answer the single question that record should have made you ask. The method is the point: each record isolates one layer, and most of them rule something out rather than proving anything.

Takeaways

Next: IPv6 Address Scopes & Types

More free lessons in 1. Network Fundamentals