# Day 2: Interfaces and Cables

# Interfaces and Cables

## Overview

Switches provide multiple ports for device connectivity—typically 24 ports on a standard switch.

These ports are RJ-45 (Registered Jack) connectors, the standard connection point for network devices.

---

## Ethernet: The Standard

### What is Ethernet?

Ethernet is a collection of standardized network protocols and hardware specifications that define how devices communicate over wired networks.

### Why Standards Matter

Network protocols and standards serve two critical purposes:

1. Communication standards — Enable devices from different manufacturers to communicate reliably
2. Hardware standards — Ensure physical compatibility between devices and cables

### Speed and Measurement

Connections between devices operate at specific speeds, measured in bits per second (bps).

- Bit = a single value: 0 or 1
- Byte = 8 bits

Speed Conversions:

<div align="left" dir="ltr" id="bkmrk-unit-bits-1-kilobit-"><table><colgroup><col width="115"></col><col width="135"></col></colgroup><tbody><tr><td>Unit

</td><td>Bits

</td></tr><tr><td>1 kilobit (Kb)

</td><td>1,000

</td></tr><tr><td>1 megabit (Mb)

</td><td>1,000,000

</td></tr><tr><td>1 gigabit (Gb)

</td><td>1,000,000,000

</td></tr><tr><td>1 terabit (Tb)

</td><td>1,000,000,000,000

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

</div>### Ethernet Standards

- Defined: IEEE 802.3 standard (established 1983)
- IEEE = Institute of Electrical and Electronics Engineers

---

## Copper Ethernet Cables (UTP)

### Ethernet Standards by Speed

<div align="left" dir="ltr" id="bkmrk-speed-common-name-st"><table><colgroup><col width="79"></col><col width="141"></col><col width="79"></col><col width="103"></col><col width="109"></col></colgroup><tbody><tr><td>Speed

</td><td>Common Name

</td><td>Standard

</td><td>Cable Type

</td><td>Max Distance

</td></tr><tr><td>10 Mbps

</td><td>Ethernet

</td><td>802.3i

</td><td>10BASE-T

</td><td>100m

</td></tr><tr><td>100 Mbps

</td><td>Fast Ethernet

</td><td>802.3u

</td><td>100BASE-T

</td><td>100m

</td></tr><tr><td>1 Gbps

</td><td>Gigabit Ethernet

</td><td>802.3ab

</td><td>1000BASE-T

</td><td>100m

</td></tr><tr><td>10 Gbps

</td><td>10 Gigabit Ethernet

</td><td>802.3an

</td><td>10GBASE-T

</td><td>100m

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

</div>Notation:

- BASE = Baseband Signaling (digital signal, single information channel)
- T = Twisted Pair (copper cable type)

### UTP Cables (Unshielded Twisted Pair)

What it is:

- Standard copper cabling for most Ethernet connections
- No metallic shield around the wires
- Contains twisted pairs of wires

Why twist the wires?

- The twisting protects against EMI (Electromagnetic Interference) from external sources
- Helps maintain signal integrity over distance

Wire Count by Speed:

- 10/100BASE-T: Uses 2 pairs (4 wires)
- 1000BASE-T / 10GBASE-T: Uses 4 pairs (8 wires)
- All 4 pairs are bidirectional (can transmit and receive simultaneously)
- This enables faster transmission than older standards


---

## Cable Pinout and Device Communication

### RJ-45 Connector Pin Layout

An RJ-45 plug has 8 pins numbered 1–8 at each end of the cable.

Devices use specific pins to transmit (TX) and receive (RX) data:

<div align="left" dir="ltr" id="bkmrk-device-type-tx-pins-"><table><colgroup><col width="98"></col><col width="71"></col><col width="71"></col></colgroup><tbody><tr><td>Device Type

</td><td>TX Pins

</td><td>RX Pins

</td></tr><tr><td>Router

</td><td>1, 2

</td><td>3, 6

</td></tr><tr><td>Firewall

</td><td>1, 2

</td><td>3, 6

</td></tr><tr><td>PC

</td><td>1, 2

</td><td>3, 6

</td></tr><tr><td>Switch

</td><td>3, 6

</td><td>1, 2

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

</div>### Full-Duplex Transmission

The pin arrangement enables full-duplex communication—devices can transmit and receive simultaneously because they use different pin pairs.

---

## Cable Types: Straight-Through vs. Crossover

### Straight-Through Cables

When to use:

- Connecting a PC or Router to a Switch
- Connecting a Firewall to a Switch
- Any device with TX on pins 1-2 to a device with RX on pins 1-2

Why it works:

- One end has pins arranged the same as the other end
- TX pins from one device connect to RX pins on the other device
- No pin swapping needed

### Crossover Cables

When to use:

- Connecting two similar devices directly (Router to Router, Switch to Switch, PC to PC)
- These devices have the same TX/RX pin configuration, so they would conflict with a straight-through cable

How it works:

- One end of the cable has pins swapped to create proper TX/RX alignment
- Pins are crossed: 1↔3, 2↔6, 3↔1, 6↔2

Crossover Pin Mapping:

End A → End B

PIN 1 → PIN 3

PIN 2 → PIN 6

PIN 3 → PIN 1

PIN 6 → PIN 2

#   


### Auto MDI-X

Modern equipment simplifies this:

- Most switches, routers, and PCs now include Auto MDI-X capability
- Devices automatically detect the neighbor's transmit pins and adjust their receive pins accordingly
- Works with either straight-through or crossover cables
- Eliminates the need to manually choose cable type

---

## Fiber-Optic Cables

### When to Use Fiber

Fiber-optic cables are used for high-speed, long-distance connections between network devices.

Standard: IEEE 802.3ae (and 802.3z for 1 Gbps)

### SFP Transceiver

SFP (Small Form-Factor Pluggable):

- A module that allows fiber-optic cables to connect to switches and routers
- Separate TX and RX cables (unlike copper which uses the same cable for both directions)
- Removes the need for pin management—fiber uses dedicated paths for each direction

### Fiber Cable Structure

A fiber-optic cable has 4 main components:

1. Core (glass or plastic)
2. Cladding (surrounds and protects core)
3. Buffer (protective layer)
4. Jacket (outer protective sheath)

### Two Types of Fiber

#### Single-Mode Fiber

Characteristics:

- Narrower core than multimode
- Light enters at a single angle (mode) using a laser-based transmitter
- Allows the longest cable distances of all Ethernet media
- More expensive (laser-based SFP transmitters are costly)

Use case: Long-distance backbone connections between buildings or data centers

#### Multimode Fiber

Characteristics:

- Wider core than single-mode
- Light enters at multiple angles (modes) using an LED-based transmitter
- Allows longer distances than UTP, but shorter than single-mode
- Less expensive than single-mode (LED-based transmitters are cheaper)

Use case: Medium-distance connections within a data center or building

### Fiber-Optic Standards

<div align="left" dir="ltr" id="bkmrk-standard-speed-mode-"><table><colgroup><col width="115"></col><col width="69"></col><col width="139"></col><col width="173"></col></colgroup><tbody><tr><td>Standard

</td><td>Speed

</td><td>Mode

</td><td>Max Distance

</td></tr><tr><td>1000BASE-LX

</td><td>1 Gbps

</td><td>Multimode / Single

</td><td>550m (MM) / 5km (SM)

</td></tr><tr><td>10GBASE-SR

</td><td>10 Gbps

</td><td>Multimode

</td><td>400m

</td></tr><tr><td>10GBASE-LR

</td><td>10 Gbps

</td><td>Single

</td><td>10km

</td></tr><tr><td>10GBASE-ER

</td><td>10 Gbps

</td><td>Single

</td><td>30km

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

</div>---

## UTP vs. Fiber-Optic: Comparison

### UTP (Unshielded Twisted Pair)

Advantages:

- Lower cost
- RJ-45 ports are inexpensive
- Simple to install and terminate

Disadvantages:

- Maximum distance: ~100m
- Vulnerable to EMI (Electromagnetic Interference)
- Security risk: Cables emit a faint signal that can be intercepted or copied
- Not suitable for long distances

### Fiber-Optic

Advantages:

- Longer maximum distances (hundreds of meters to tens of kilometers)
- No vulnerability to EMI
- More secure: Signals cannot leak from the cable; no risk of interception
- Suitable for long-distance and high-security applications

Disadvantages:

- Higher cost than UTP
- SFP ports are more expensive than RJ-45 ports
- Single-mode fiber is significantly more expensive than multimode
- Requires specialized installation and termination tools
- More fragile (fiber can break if bent too sharply)

---

## Quick Reference: When to Use What

<div align="left" dir="ltr" id="bkmrk-situation-media-reas"><table><colgroup><col width="232"></col><col width="94"></col><col width="298"></col></colgroup><tbody><tr><td>Situation

</td><td>Media

</td><td>Reason

</td></tr><tr><td>PC to Switch (same building)

</td><td>UTP

</td><td>Cost-effective, sufficient distance

</td></tr><tr><td>Switch to Switch (same building)

</td><td>UTP or Fiber

</td><td>UTP for short runs; Fiber for long runs or security

</td></tr><tr><td>Router to Router (different buildings)

</td><td>Fiber

</td><td>Longer distances, EMI immunity

</td></tr><tr><td>Data center backbone

</td><td>Fiber

</td><td>Long distances, high throughput, security

</td></tr><tr><td>Home/office network

</td><td>UTP

</td><td>Cost, simplicity, Auto MDI-X

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

</div>