Intermediate · Switching and VLANs · topic 25 of 57 · 30 min
Switch management and interface troubleshooting
Explanation
Giving a switch a management address
A layer 2 switch forwards frames without needing any IP address. But you want to log in to it remotely (with SSH), back up its configuration and monitor it. For that the switch itself needs an IP address. On a layer 2 switch you put that address on an SVI, usually in a dedicated management VLAN, and tell the switch where its router is.
SW1(config)# vlan 99
SW1(config-vlan)# name MGMT
SW1(config-vlan)# exit
SW1(config)# interface vlan 99
SW1(config-if)# ip address 10.99.0.11 255.255.255.0
SW1(config-if)# no shutdown
SW1(config-if)# exit
SW1(config)# ip default-gateway 10.99.0.1Why ip default-gateway and not a default route? A layer 2 switch does not route (ip routing is off), so it uses ip default-gateway, exactly like a PC uses its gateway. A layer 3 switch with ip routing on uses a normal default route instead (ip route 0.0.0.0 0.0.0.0 next-hop).
Reading interface status
SW1# show interfaces status
Port Name Status Vlan Duplex Speed Type
Fa0/1 Reception PC connected 10 a-full a-100 10/100BaseTX
Fa0/2 notconnect 10 auto auto 10/100BaseTX
Fa0/3 CCTV cam 3 err-disabled 30 auto auto 10/100BaseTX
Fa0/4 disabled 1 auto auto 10/100BaseTX
Gi0/1 Uplink to R1 connected trunk full 1000 10/100/1000BaseTXThe Name column comes from the description command. connected means it works; notconnect means no cable or the other end is off; disabled means an administrator shut it down; err-disabled means the switch shut it down itself because of a problem it detected.
Routers and switches also report two words for each interface, for example in show ip interface brief or the first line of show interfaces: the line status (layer 1, the physical link) and the protocol status (layer 2, the data link).
| Status / Protocol | What it means | What to check |
|---|---|---|
| up / up | Working | Nothing at layers 1 and 2; look higher (IP, VLAN, routing). |
| down / down | No physical link | Cable unplugged or broken, wrong cable, the other end shut down or powered off. |
| administratively down / down | Someone typed shutdown | Type no shutdown if the port should be in use. |
| up / down | Physical link fine, layer 2 not working | Encapsulation or keepalive mismatch (common on serial links). |
| down / down (err-disabled) | The switch shut the port to protect the network | Find the cause (BPDU guard, port security...), fix it, then shutdown and no shutdown. |
Error counters
A port can be up/up and still perform badly. show interfaces shows counters of bad frames since the counters were last cleared.
SW1# show interfaces fastEthernet 0/1
FastEthernet0/1 is up, line protocol is up (connected)
...
Half-duplex, 100Mb/s, media type is 10/100BaseTX
...
12 runts, 0 giants, 0 throttles
87 input errors, 75 CRC, 0 frame, 0 overrun, 0 ignored
...
0 output errors, 152 collisions, 1 interface resets
0 babbles, 23 late collision, 0 deferred- Runts: frames smaller than 64 bytes, the minimum Ethernet size. Often the broken pieces of collisions.
- Giants: frames bigger than the maximum size (1518 bytes for a normal untagged frame). Often an MTU setting mismatch.
- CRC errors: the frame check sequence did not match, so the frame was damaged on the way. Bad cable, electrical noise, or a duplex mismatch.
- Late collisions: collisions after the first 64 bytes were sent. On a modern switched network these almost always mean a duplex mismatch.
- Input errors: the total of several input error types, including runts, giants and CRC.
Speed, duplex and the duplex mismatch
Duplex says whether a link can send and receive at the same time (full duplex) or must take turns (half duplex). Both ends must agree. Normally both use autonegotiation and agree on the best speed and full duplex. The trouble starts when one end is hard-coded and the other is on auto: the auto side can still sense the speed, but it cannot learn the duplex, so at 10 or 100 Mbps it falls back to half duplex.
Result: one side sends whenever it likes (full), the other thinks it is a collision and backs off (half). The full-duplex side sees CRC errors and runts; the half-duplex side sees late collisions. The link works, but it is slow and drops packets, which users describe as "the network is slow only at this desk".
SW1(config)# interface fastEthernet 0/1
SW1(config-if)# description Reception PC
SW1(config-if)# speed auto
SW1(config-if)# duplex auto
SW1(config-if)# end
SW1# clear counters fastEthernet 0/1Need 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
Switch management and interface troubleshooting · 1/7
In this lesson you will learn how to manage a switch remotely and how to read the health of its ports.
Prefer a video by a teacher? Find free videos on “cisco switch interface status errors duplex mismatch troubleshooting” on YouTube ↗
In real life: The slow billing counter at a supermarket in Kochi
The billing PC at counter 3 of a supermarket takes twenty seconds to print each bill, while the other counters are fast. The IT person runs show interfaces status and sees counter 3 at "half" duplex and "100". show interfaces shows thousands of late collisions. Somebody had set the PC network card to 100 Mbps full duplex by hand, while the switch port was on auto. Setting the PC back to auto-negotiate fixes it, and clear counters followed by a check an hour later shows zero new errors.
Practice (0/3 done)
Write diagnose(line, protocol) for the two status words of an interface. Return "working" for ("up", "up"), "shut down by admin" for ("administratively down", "down"), "physical problem" for ("down", "down"), "layer 2 problem" for ("up", "down"), "err-disabled" for ("down", "down (err-disabled)"), and "unknown" for anything else.
Write likely_cause(counters) where counters is a dict that may contain "late_collisions", "crc", "runts" and "giants" (missing keys mean 0). Return "duplex mismatch" if there are any late collisions; otherwise "cabling or noise" if there are CRC errors; otherwise "mtu mismatch" if there are giants; otherwise "healthy".
show interfaces fa0/7 says "FastEthernet0/7 is administratively down, line protocol is down". What fixes it?
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
- Trunks and 802.1Q taggingSwitching and VLANs · same module
- Network devicesHow networks work
- The OSI modelHow networks work
- A structured troubleshooting methodTroubleshooting and the CCNA exam
- EtherChannel: bundling linksSpanning Tree and EtherChannel
- Troubleshooting tools and common faultsTroubleshooting and the CCNA exam
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.
Which command gives a layer 2 switch a gateway for its own management traffic?
Answer: ip default-gateway 10.99.0.1
A layer 2 switch does not route, so it uses ip default-gateway, like a PC.
An interface is down/down. What is the most likely cause?
Answer: A physical problem such as an unplugged or broken cable
down/down means no physical link. administratively down would mean shutdown.
What are runts?
Answer: Frames smaller than 64 bytes
Runts are frames below the 64-byte Ethernet minimum, often fragments from collisions.
A port shows many late collisions. What is the usual cause?
Answer: A duplex mismatch
On switched networks, late collisions almost always mean one side is half duplex and the other full.
In show interfaces status, what does a-full mean?
Answer: Full duplex agreed by autonegotiation
The a- prefix means the value was auto-negotiated.
One end of a 100 Mbps link is set to full duplex by hand, the other is on auto and falls back to half. What will you most likely see?Related
Answer: Late collisions on one side, CRC errors on the other, and a slow link
That is a duplex mismatch: the link is up but slow and full of errors.
An SVI for VLAN 30 stays down/down. Which is a likely cause?Related
Answer: No port in VLAN 30 is up
An SVI needs the VLAN to exist and at least one up, forwarding port in that VLAN.
From Inter-VLAN routing
A 16-port switch has a PC on every port. How many collision domains are there?Related
A PC shows no link light on its network port. Which layer should you check first?Related
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
- This is the last topic of “Switching and VLANs”. The module exam comes next.
- Module 5 exam: Switching and VLANs · 13 questions · 20 min, without help. 5 topics of this module still to finish first.
- Then the next module, Spanning Tree and EtherChannel. 57 topics left in the course before the final exam.