Day 9: Switch Interfaces
CCNA 200-301 Study Guide: Switch Interface Configuration & Troubleshooting
Introduction: Mastering the Fundamentals of Network Access
The configuration of Layer 2 switchports is a fundamental skill for network professionals. It represents the point of entry for all devices into the network. This guide covers default states, speed/duplex negotiation, collision domains, and essential troubleshooting commands.
CCNA Exam Objectives Covered:
-
1.1: Role and function of network components (Switches)
-
1.4: Identify interface and cable issues (collisions, errors, duplex/speed mismatch)
-
2.1: Configure and verify Layer 2 protocols (Switching)
1.0 Default Interface States: Routers vs. Switches
Cisco devices have different default behaviors based on their role. Switches are generally "plug-and-play," while routers follow a "security-first" approach.
1.1 Comparative Analysis of Default Settings
|
Feature |
Router Interface |
Switch Interface |
|
Default State |
Disabled (shutdown) |
Enabled (no shutdown) |
|
Status (Unplugged) |
administratively down / down |
down / down |
|
Status (Connected) |
up / up (after manual enable) |
up / up (immediate) |
|
Security Practice |
Enable only necessary ports. |
Shutdown all unused ports. |
Security Note: Because switchports are active by default, an unauthorized user can gain network access just by plugging in. Always manually disable unused ports.
2.0 Mastering Speed and Duplex Settings
-
Speed: The data rate (10, 100, 1000 Mbps).
-
Duplex: The direction of flow (Half = one way at a time; Full = simultaneous).
2.1 The Autonegotiation Process
By default, ports use autonegotiation to find the highest common denominator for speed and duplex. If a 1 Gbps port connects to a 100 Mbps port, they agree on 100 Mbps/Full.
2.2 The Duplex Mismatch
A mismatch occurs when one side is hardcoded (manual) and the other is set to Auto. The "Auto" side disables negotiation and must guess:
-
Speed: Sensed via electrical signal (usually successful).
-
Duplex Rule:
-
If Speed = 10 or 100 Mbps $\rightarrow$ Default to Half-Duplex.
-
If Speed = 1000 Mbps or higher $\rightarrow$ Default to Full-Duplex.
-
Result: A 100 Mbps link where one side is Full and the other defaults to Half causes massive Late Collisions and CRC errors.
3.0 Understanding Collision Domains and CSMA/CD
|
Device |
Collision Domain Logic |
Duplex Capability |
|
Hub (Layer 1) |
All ports share one collision domain. |
Half-Duplex only. |
|
Switch (Layer 2) |
Each port is a separate collision domain. |
Full-Duplex capable. |
3.1 The Role of CSMA/CD
Carrier Sense Multiple Access with Collision Detection manages media access in Half-Duplex environments.
-
Full-Duplex: Collisions are impossible; CSMA/CD is disabled.
-
Half-Duplex: Devices must listen before talking; CSMA/CD is enabled.
4.0 Verification and Troubleshooting
4.1 Essential "show" Commands
|
Command |
Purpose |
|
show ip interface brief |
High-level status: Status (L1) and Protocol (L2). |
|
show interfaces status |
(Switch only) Tabular view of VLAN, Speed, and Duplex. |
|
show interfaces <id> |
Detailed counters and error statistics. |
4.2 Interpreting Error Counters
-
Runts: Frames $< 64$ bytes. Often caused by collisions.
-
Giants: Frames $> 1518$ bytes.
-
CRC: Checksum failure. Indicates corrupted data, usually due to bad cabling or EMI.
-
Late Collisions: Occur after the first 64 bytes. The primary indicator of a duplex mismatch or excessive cable length ($> 100$m).
5.0 CLI Configuration Command Reference
5.1 Basic Interface Setup
SW1(config)# interface g0/1
SW1(config-if)# description ## Connection to Server_01 ##
SW1(config-if)# speed 100 # Manual speed: 10, 100, 1000
SW1(config-if)# duplex full # Manual duplex: full, half
SW1(config-if)# shutdown # Disable port
SW1(config-if)# no shutdown # Enable port
5.2 Bulk Configuration
SW1(config)# interface range f0/1 - 10, g0/1 - 2
SW1(config-if-range)# description ## User Access Ports ##
SW1(config-if-range)# shutdown
5.3 Saving Configuration
-
Standard: copy running-config startup-config
-
Shortcuts: copy run start or write memory (wr)
6.0 Key Takeaways Summary
-
Defaults: Switchports are no shutdown by default; Router ports are shutdown by default.
-
Mismatches: If autonegotiation fails at 10/100 Mbps, the auto-side defaults to Half-Duplex.
-
Troubleshooting: Use show interfaces to find Late Collisions (Mismatch) or CRC Errors (Bad Cable).
-
CSMA/CD: Only active on Half-Duplex links.