# Day 9: Switch Interfaces

# CCNA 200-301 Study Guide: Switch Interface Configuration &amp; 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

<div align="left" dir="ltr" id="bkmrk-feature-router-inter"><table><colgroup><col width="159"></col><col width="235"></col><col width="209"></col></colgroup><tbody><tr><td>Feature

</td><td>Router Interface

</td><td>Switch Interface

</td></tr><tr><td>Default State

</td><td>Disabled (shutdown)

</td><td>Enabled (no shutdown)

</td></tr><tr><td>Status (Unplugged)

</td><td>administratively down / down

</td><td>down / down

</td></tr><tr><td>Status (Connected)

</td><td>up / up (after manual enable)

</td><td>up / up (immediate)

</td></tr><tr><td>Security Practice

</td><td>Enable only necessary ports.

</td><td>Shutdown all unused ports.

</td></tr></tbody></table>

</div>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

<div align="left" dir="ltr" id="bkmrk-device-collision-dom"><table><colgroup><col width="138"></col><col width="301"></col><col width="164"></col></colgroup><tbody><tr><td>Device

</td><td>Collision Domain Logic

</td><td>Duplex Capability

</td></tr><tr><td>Hub (Layer 1)

</td><td>All ports share one collision domain.

</td><td>Half-Duplex only.

</td></tr><tr><td>Switch (Layer 2)

</td><td>Each port is a separate collision domain.

</td><td>Full-Duplex capable.

</td></tr></tbody></table>

</div>### 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

<div align="left" dir="ltr" id="bkmrk-command-purpose-show"><table><colgroup><col width="197"></col><col width="408"></col></colgroup><tbody><tr><td>Command

</td><td>Purpose

</td></tr><tr><td>show ip interface brief

</td><td>High-level status: Status (L1) and Protocol (L2).

</td></tr><tr><td>show interfaces status

</td><td>(Switch only) Tabular view of VLAN, Speed, and Duplex.

</td></tr><tr><td>show interfaces &lt;id&gt;

</td><td>Detailed counters and error statistics.

</td></tr></tbody></table>

</div>### 4.2 Interpreting Error Counters

- Runts: Frames $&lt; 64$ bytes. Often caused by collisions.
- Giants: Frames $&gt; 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 ($&gt; 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

1. Defaults: Switchports are no shutdown by default; Router ports are shutdown by default.
2. Mismatches: If autonegotiation fails at 10/100 Mbps, the auto-side defaults to Half-Duplex.
3. Troubleshooting: Use show interfaces to find Late Collisions (Mismatch) or CRC Errors (Bad Cable).
4. CSMA/CD: Only active on Half-Duplex links.