Module 3

Network Interfaces and Switches

NICs, transceivers, MAC addressing, Ethernet frames, switching concepts, STP, PoE, and troubleshooting.

Introduction

Module 2 covered the physical cables — copper, fiber optic, and connectors. The natural next question is: what do those cables actually plug into? This module answers that question by exploring the two key hardware components that enable Layer 2 networking: Network Interface Cards (NICs) in end-point devices, and switches that connect everything together.

We are moving from Layer 1 (Physical) into Layer 2 (Data Link). Cables carry bits, but NICs and switches work with frames and MAC addresses — the language of local networking.

graph LR
    PC1["fa:fa-desktop NIC
AA:BB:CC:11:22:33"] -->|Ethernet| SW["fa:fa-network-wired Switch"] SW -->|Ethernet| PC2["fa:fa-desktop NIC
AA:BB:CC:44:55:66"] style PC1 fill:#e8f1fb,stroke:#004a88 style SW fill:#f0fdf4,stroke:#16a34a,stroke-width:3px style PC2 fill:#e8f1fb,stroke:#004a88

Figure 1: Two computers connected via Ethernet through a switch. Each NIC has a unique burned-in MAC address that the switch uses to make forwarding decisions.

OSI Layer Focus

Module 2 covered Layer 1 (Physical) — cables and signals. This module primarily covers Layer 2 (Data Link) — frames, MAC addresses, and switches. Layer 2 is where the switch lives.

Learning Outcomes

After completing this module, you will be able to:

  • Explain the function of Network Interface Cards (NICs) and their role in host connectivity.
  • Identify and describe modular transceivers including SFP, SFP+, and QSFP.
  • Interpret MAC addresses and explain the OUI (Organizationally Unique Identifier) format.
  • Describe the structure of an Ethernet frame and identify its key fields.
  • Compare and contrast hubs, bridges, and switches as Layer 2 devices.
  • Explain how switches use MAC address tables to make forwarding decisions.
  • Describe advanced switch features including STP, PoE, and Layer 3 switching.
  • Troubleshoot common switch problems using LED indicators, show commands, and error counters.

Key Terms Preview

Interface Hardware
NIC
Network Interface Card
Transceiver
TX/RX signal converter
SFP / SFP+
Modular fiber/copper insert
Wake-on-LAN
Remote power-on via network
Addressing
MAC Address
48-bit hardware address
OUI
Organizationally Unique ID
BIA
Burned-In Address
Broadcast
FF:FF:FF:FF:FF:FF
Switching
Hub
Layer 1 multi-port repeater
Bridge
2-port Layer 2 device
Switch
Multi-port bridge
Flooding
Send to all ports (unknown)
Advanced Features
STP
Spanning Tree Protocol
PoE
Power over Ethernet
LAG / LACP
Link aggregation
MTU
Max Transmission Unit

Network Interface Foundations

Network Interface Foundations

This section introduces network interfaces and transceivers — the hardware endpoints that connect hosts to Ethernet networks and provide both physical and data-link layer functions.

What is a Network Interface Card (NIC)?

A NIC (Network Interface Card) is the hardware that connects a computer to the network. Every NIC has a unique MAC address burned in at the factory during manufacturing. NICs translate between computer data and network signals — electrical for copper, or optical for fiber. Modern computers almost always have NICs built directly into the motherboard.

Without a NIC, your computer is an island with no network access. The NIC handles three responsibilities: creating and processing Ethernet frames, converting data to and from network signals, and managing link speed and duplex settings through auto-negotiation with the connected switch.

graph LR
    subgraph "Computer"
        CPU["fa:fa-microchip CPU"] --> NIC["fa:fa-network-wired NIC\n00:1A:2B:3C:4D:5E"]
    end
    NIC -->|"RJ-45 port"| SW["fa:fa-network-wired Switch"]

    style NIC fill:#e8f1fb,stroke:#004a88,stroke-width:2px
    style CPU fill:#f4f7fb,stroke:#6b7280
    style SW fill:#f0fdf4,stroke:#16a34a
            

Figure 2: A NIC inside a computer connects via an RJ-45 port to the switch. The MAC address (shown in the NIC node) is burned into firmware at the factory and uniquely identifies this network interface on the local network.

NIC Responsibilities
  • Create and process Ethernet frames
  • Convert data to/from electrical or optical network signals
  • Negotiate link speed and duplex mode with the connected switch

NIC Features and Specifications

NICs come in a range of speeds matching the network infrastructure they connect to. Understanding NIC specifications helps in selecting the right hardware and troubleshooting performance issues.

NIC TypeTypical SpeedUse Case
1 Gbps RJ-451,000 MbpsDesktops, laptops
10 Gbps RJ-4510,000 MbpsHigh-end workstations
10 Gbps SFP+10,000 MbpsServers
25 / 100 Gbps25,000 – 100,000 MbpsData center infrastructure
Auto-Negotiation

NICs and switches automatically negotiate the best mutually supported speed and duplex mode. This usually "just works" — but manually forcing mismatched settings on one side is a common source of performance problems.

What is a Transceiver?

A transceiver is a device that both transmits and receives signals — the name is a portmanteau of the two words. Transceivers convert between the electrical signals inside a device and the optical or electrical signals carried on the cable.

graph LR
    SW["fa:fa-network-wired Switch
SFP+ slot"] -->|"Electrical signal"| TC["fa:fa-bolt Transceiver\n(SFP+)"] TC -->|"Light pulse (TX)"| FC["fa:fa-circle-dot Fiber
Cable"] FC -->|"Light pulse (RX)"| TC2["fa:fa-bolt Transceiver\n(SFP+)"] TC2 -->|"Electrical signal"| SW2["fa:fa-server Server
NIC"] style TC fill:#fff7e0,stroke:#d97706 style TC2 fill:#fff7e0,stroke:#d97706 style FC fill:#f0fdf4,stroke:#16a34a

Figure 3: How a transceiver works. Inside the switch, data is an electrical signal. The transceiver's laser converts it to a light pulse for the fiber cable. At the other end, the receiving transceiver's photodetector converts light back to electrical. Without transceivers, switches cannot speak "fiber."

Why Transceivers Matter

Without a transceiver, your switch can't understand fiber optic light signals — it only speaks electrical. Transceivers are the "translators" between the switch's internal electronics and the external cable medium.

Types of Transceivers

The modular transceiver ecosystem allows a single switch model to support many different cable types and distances simply by swapping a small plug-in module. This is a major advantage over fixed-port switches.

Transceiver Speed Cable Type Connector Max Distance
SFP1 GbpsMMF or SMFLC550 m (MMF) / 10 km (SMF)
SFP+10 GbpsMMF or SMFLC300 m (MMF) / 10–80 km (SMF)
QSFP40 GbpsMMF or SMFMPO/MTP100 m (MMF) / 10 km (SMF)
QSFP28100 GbpsMMF or SMFMPO/MTP100 m (MMF) / 10 km (SMF)
GBIC (legacy)1 GbpsMMF or SMFSC550 m (MMF) / 10 km (SMF)
SFP-T1 GbpsCopper (UTP)RJ-45100 m
SFP+ DAC10 GbpsTwinax copperIntegrated3–7 m
MMF vs SMF

MMF (Multimode Fiber) — multiple light paths, shorter distances, orange jacket, cheaper transceivers. Used inside buildings.
SMF (Single-mode Fiber) — single light path, long distances (up to 80 km), yellow jacket, pricier transceivers. Used between buildings or cities.

Transceiver Issues

Transceivers are a common source of connectivity problems because of strict compatibility requirements between the transceiver, cable type, and switch model.

Mismatch Issues
  • SFP in SFP+ port: May work at reduced speed
  • SFP+ in SFP port: Will not work
  • Fiber type mismatch: MMF transceiver + SMF cable = no link
  • Vendor incompatibility: Some switches only accept manufacturer-branded modules
Signal Strength Issues
  • TX power: Transmit signal strength
  • RX sensitivity: Minimum signal the receiver can detect
  • Too little power = signal doesn't reach
  • Too much power = overwhelms the receiver
Transceiver Troubleshooting Order
  1. Check transceiver compatibility with the switch model
  2. Verify fiber type (MMF vs SMF) matches the transceiver
  3. Confirm cable distance is within the transceiver's rated range

Applied: Layer 1 at the Green Dragon

The Green Dragon Inn uses a mix of cable types that illustrates real-world transceiver and cabling decisions. The building's server lives in the cellar; devices are spread across multiple rooms; and the ISP connection must reach outside the building.

graph LR
    SRV["fa:fa-server Cellar Server"] -->|"MMF fiber"| SW["fa:fa-network-wired Core Switch"]
    SW -->|"Cat6"| FD["fa:fa-desktop Front Desk"]
    SW -->|"Cat6"| KIT["fa:fa-laptop Kitchen"]
    SW -->|"Cat5e"| MGR["fa:fa-desktop Manager"]
    SW -->|"SMF fiber"| ISP(["fa:fa-cloud ISP Uplink"])

    style SRV fill:#e8f1fb,stroke:#004a88
    style SW fill:#f0fdf4,stroke:#16a34a,stroke-width:3px
    style FD fill:#e8f1fb,stroke:#004a88
    style KIT fill:#e8f1fb,stroke:#004a88
    style MGR fill:#e8f1fb,stroke:#004a88
    style ISP fill:#fff7e0,stroke:#d97706
            

Figure: Green Dragon Layer 1 physical topology. The cellar server connects to the core switch via MMF (multimode fiber) — short indoor run, cost-effective. Front Desk and Kitchen get Cat6 copper. The Manager's older cable run uses Cat5e. The ISP uplink uses SMF (single-mode fiber) because it must span a longer distance outside the building. One physical network — three different cable types, each chosen for its specific distance and cost requirements.

Why Three Cable Types?

MMF (orange) — multimode fiber for the server-to-switch run: higher bandwidth than copper, short indoor distance, reasonable transceiver cost.
Cat6 copper — standard access layer cabling for most workstations.
Cat5e copper — older but still functional for the manager's office; supports 1 Gbps at standard distances.
SMF (yellow) — single-mode fiber for the WAN uplink: required for longer outdoor distances to the ISP demarcation point.

Case Study: Sam's First NIC Installation

Case Study — Sam's First NIC Installation

Samwise Gamgee is setting up the new admin network for the Shire. He purchases 10 Gbps NICs for the hobbit-hole workstations, but the switches only have SFP ports (1 Gbps, not SFP+).

Sam also notices one workstation showing a MAC address of 00:00:00:00:00:00 in the network settings.

Review Questions:

  1. Will the 10 Gbps NICs work in the 1 Gbps switch ports?
  2. What speed will the connection actually operate at?
  3. What might cause a MAC address of all zeros?
Solution — Sam's First NIC Installation
  1. Yes — 10 Gbps NICs will auto-negotiate down to match the switch's 1 Gbps capability. NICs are backward-compatible.
  2. The connection will operate at 1 Gbps, limited by the slower device (the switch). Sam wasted money on 10G NICs — 1G NICs would have been sufficient.
  3. An all-zeros MAC address typically means: the NIC driver is not installed or has failed to load, the NIC hardware has failed, or the adapter is a virtual/unconfigured interface.
Key Lesson

Always match NIC and switch capabilities — buying faster NICs than your switch supports wastes money. A missing or abnormal MAC address always points to a driver or hardware problem, not a network configuration issue.

Ethernet Frames & MAC Addressing

Ethernet Frames & MAC Addressing

Data doesn't travel as raw bits across a network — it's packaged into structured units called frames. Frames contain addressing information so switches know where to send them.

Ethernet Frame Format

An Ethernet frame is the Layer 2 PDU. The standard maximum frame size is 1518 bytes. Each frame wraps the network-layer packet (IP datagram) with a header containing MAC addresses and a trailer for error detection.

packet-beta
title Ethernet Frame Structure (standard, up to 1518 bytes)
0-7: "Preamble (8 B)"
8-13: "Dest MAC (6 B)"
14-19: "Src MAC (6 B)"
20-21: "Type (2 B)"
22-53: "Payload / Data (46–1500 B)"
54-57: "FCS (4 B)"
            

Figure 4: Ethernet frame structure using a Mermaid packet diagram. Field widths are proportional to byte counts. The Preamble synchronizes receivers; Dest/Src MAC are 6-byte hardware addresses; Type indicates the encapsulated protocol (e.g., 0x0800 = IPv4); Payload carries the IP packet; FCS is a 4-byte checksum for error detection.

Header Fields
Preamble (8 B)
Synchronization — tells receivers "a frame is coming"
Dest MAC (6 B)
Where the frame is going
Src MAC (6 B)
Where the frame came from
Type/Length (2 B)
Protocol inside (IPv4 = 0x0800, IPv6 = 0x86DD)
Payload and Trailer
Payload (46–1500 B)
The actual data (IP packet or other L3 PDU)
FCS (4 B)
Frame Check Sequence — CRC checksum; receiver recalculates to detect corruption
Minimum and Maximum Frame Sizes

Minimum payload is 46 bytes (padding added if smaller). Maximum payload is 1500 bytes — this is standard Ethernet MTU. Frames larger than 1518 bytes are either jumbo frames (up to 9000 bytes, requires explicit support) or giants (an error condition).

MAC Address Format

A MAC (Media Access Control) address is the hardware address of a NIC — the permanent, factory-assigned identifier used for Layer 2 communication. MAC addresses are 48 bits (6 bytes) written in hexadecimal. They are also called the physical address, hardware address, or burned-in address (BIA).

MAC Address Written in Three Common Formats
00:1A:2B:3C:4D:5EColon-separated (Linux, macOS)
00-1A-2B-3C-4D-5EDash-separated (Windows)
001A.2B3C.4D5EDot-separated (Cisco IOS)
MAC vs IP Address

MAC address = permanent hardware address (Layer 2). Used only within a local network segment. Switches use MAC addresses.
IP address = changeable logical address (Layer 3). Used to route traffic between networks. Routers use IP addresses.

MAC Address Deep Dive

A MAC address is not just a random number — it has structure. The first half identifies the manufacturer, and the second half identifies the specific device.

packet-beta
title MAC Address Structure: 00:50:56:3C:4D:5E
0-2: "OUI — Manufacturer ID (3 bytes)\ne.g. 00:50:56 = VMware"
3-5: "Device ID — Unique to this NIC (3 bytes)\ne.g. 3C:4D:5E"
            

Figure 5: MAC address structure. The first 3 bytes (OUI) are assigned by IEEE to identify the manufacturer. The last 3 bytes are assigned by the manufacturer and must be globally unique within that OUI block. The OUI registry is publicly searchable — you can look up any MAC to find who made the hardware.

Special MAC Addresses
FF:FF:FF:FF:FF:FF
Broadcast — sent to every device on the segment
Starts with 01:00:5E
Multicast — sent to a subscribed group of devices
Can MACs Be Changed?

Yes — software can spoof (fake) a different MAC address. This is useful for troubleshooting and privacy, but is also a security concern. MAC address filtering alone is not a reliable security control.

Switching Concepts and Forwarding

Switching Concepts and Forwarding

Understanding the evolution from hubs to bridges to switches — and how modern switches actually work — is fundamental to troubleshooting any Layer 2 network.

The Evolution: Hub → Bridge → Switch

Early networks used hubs, which were cheap but created severe performance problems. Bridges improved on hubs by learning MAC addresses, but were limited to 2–4 ports. Modern switches are essentially multi-port bridges with dedicated bandwidth per port.

graph TD
    HUB["fa:fa-circle-xmark Hub\n(1990s)\nShared bandwidth\nAll in one collision domain"]
    BRG["fa:fa-right-left Bridge\n(Late 1990s)\nLearns MACs, 2–4 ports\nSeparates collision domains"]
    SW["fa:fa-network-wired Switch\n(2000s – Today)\nMany ports\nDedicated bandwidth per port"]

    HUB -->|"Better"| BRG
    BRG -->|"Better"| SW

    style HUB fill:#fef2f2,stroke:#dc2626
    style BRG fill:#fff7e0,stroke:#d97706
    style SW fill:#f0fdf4,stroke:#16a34a,stroke-width:2px
            

Figure 6: The evolution of Layer 2 devices. Each generation solved the key problems of the previous one. Switches combine all the benefits of bridges with scalability — making them the universal choice for modern LANs.

Hubs: Shared Bandwidth (and Its Problems)

A hub is a Layer 1 device that repeats every incoming signal to every output port. Think of it like shouting in a crowded room — everyone hears everything, even if the message is meant for only one person.

Why Hubs Are Obsolete

Hubs are no longer manufactured for general use. However, they may still appear in legacy installations and are tested on the CompTIA Network+ exam. A hub = Layer 1 device; it is essentially a multi-port repeater.

Bridges: Learning MAC Addresses

A bridge operates at Layer 2 and learns which devices are on which side by reading MAC addresses from incoming frames. It maintains a small MAC address table and only forwards frames that need to cross between segments — keeping local traffic local. This reduces collisions significantly by creating separate collision domains.

Bridge vs Hub

A hub floods every frame to every port. A bridge reads the destination MAC and only forwards frames when necessary. This selective forwarding is called filtering — a fundamental concept in Layer 2 switching that makes networks efficient.

Switches: The Modern Solution

A switch is essentially a multi-port bridge with dedicated bandwidth per port. Each port is its own collision domain, enabling full-duplex communication (simultaneous send and receive) on every link.

graph TD
    SW["fa:fa-network-wired Switch\n(5 separate collision domains)"]
    SW --- PC1["fa:fa-desktop PC A\nAA:AA:AA"]
    SW --- PC2["fa:fa-desktop PC B\nBB:BB:BB"]
    SW --- LT1["fa:fa-laptop Laptop C\nCC:CC:CC"]
    SW --- PC3["fa:fa-desktop PC D\nDD:DD:DD"]
    SW --- LT2["fa:fa-laptop Laptop E\nEE:EE:EE"]

    style SW fill:#f0fdf4,stroke:#16a34a,stroke-width:3px
            

Figure 7: A switch with five connected devices. Each device has its own dedicated link to the switch, forming five separate collision domains. All devices can transmit simultaneously without interfering with each other — a fundamental advantage over hubs.

How Switches Learn and Forward

The intelligence of a switch comes from its MAC address table (also called the CAM table). The switch builds this table automatically by examining source MAC addresses on incoming frames.

A switch takes one of four actions for every frame it receives:

Learning

When a frame arrives, the switch reads the source MAC and records which port it came from. Over time, the table fills with MAC-to-port mappings.

Forwarding

When the switch knows which port a destination MAC is on, it sends the frame only to that port. Efficient, targeted delivery.

Flooding

When the destination MAC is unknown, the switch sends the frame to all ports except the source port. This is how switches handle new devices or expired table entries.

Filtering

When source and destination are on the same port or segment, the switch drops the frame — no need to forward it.

graph LR
    subgraph "Switch with MAC Table"
        direction TB
        TBL["MAC Address Table
AA:AA:AA → Port 1
BB:BB:BB → Port 2
CC:CC:CC → Port 3"] end PC1["fa:fa-desktop PC A\nAA:AA:AA"] -->|"Port 1"| TBL PC2["fa:fa-desktop PC B\nBB:BB:BB"] -->|"Port 2"| TBL PC3["fa:fa-desktop PC C\nCC:CC:CC"] -->|"Port 3"| TBL style TBL fill:#e8f1fb,stroke:#004a88,stroke-width:2px

Figure 8: A switch's MAC address table maps each learned MAC to the port it was seen on. When PC A sends a frame to PC C, the switch looks up CC:CC:CC, finds Port 3, and forwards only to that port — PC B never sees the frame.

MAC Address Table Aging

MAC table entries have a timer (default 300 seconds on most switches). If a device hasn't transmitted in that time, its entry is removed. When it transmits again, the switch re-learns it. This keeps the table from filling with stale entries for devices that have been moved or powered off.

Applied: Layer 2 MAC Forwarding at the Green Dragon

The same Green Dragon network, now seen through Layer 2 eyes. The switch has learned all four MAC addresses and built its forwarding table. When the Front Desk sends a frame to the Manager, watch how the switch uses the table to make a precise forwarding decision — delivering it to exactly one port and blocking the rest.

graph TD
    subgraph GDSwitch["Green Dragon Switch — MAC Address Table"]
        direction LR
        TBL["Port 1: AA:AA:AA    Port 2: BB:BB:BB    Port 3: CC:CC:CC    Port 4: DD:DD:DD"]
    end

    FD["fa:fa-desktop Front Desk
AA:AA:AA"] -->|"Frame: Dst CC:CC:CC → Port 1"| TBL TBL -->|"fa:fa-check Forwarded to Port 3"| MGR["fa:fa-desktop Manager
CC:CC:CC"] TBL -. "fa:fa-ban Not forwarded (Port 2)" .- KIT["fa:fa-laptop Kitchen
BB:BB:BB"] TBL -. "fa:fa-ban Not forwarded (Port 4)" .- GST["fa:fa-laptop Guest
DD:DD:DD"] style GDSwitch fill:#f0fdf4,stroke:#16a34a style TBL fill:#e8f1fb,stroke:#004a88,stroke-width:2px style FD fill:#fff7e0,stroke:#d97706 style MGR fill:#f0fdf4,stroke:#16a34a,stroke-width:2px style KIT fill:#fef2f2,stroke:#dc2626 style GST fill:#fef2f2,stroke:#dc2626

Figure: Layer 2 MAC forwarding at the Green Dragon. The Front Desk (AA:AA:AA) sends a frame destined for the Manager (CC:CC:CC). The switch looks up CC:CC:CC in its table, finds Port 3, and forwards only to that port. The Kitchen (Port 2) and Guest (Port 4) never see this frame — they are filtered out. This is the fundamental efficiency advantage of switches over hubs.

Layer 2 in One Sentence

The switch reads the destination MAC address in the frame, looks it up in its table, and forwards the frame to exactly one port — or floods to all ports if the destination is unknown.

Switch Interfaces and Management

Switch Interfaces and Management

Not all switches are created equal. Understanding the difference between switch types and how they are configured is essential for selecting the right hardware and maintaining an enterprise network.

Unmanaged vs Managed Switches

Unmanaged Switch
  • Plug and play — no configuration
  • No VLANs, no monitoring
  • Cheapest option
  • Best for: Home, very small office
Smart / Web Switch
  • Limited management features
  • Basic VLANs, simple web GUI
  • Middle price range
  • Best for: Small business
Managed Switch
  • Full configuration options
  • VLANs, STP, SNMP, port security
  • CLI, web GUI, remote management
  • Best for: Enterprise, any business
The Key Question

Do you need to separate traffic (VLANs), monitor performance (SNMP), or configure security (port security, 802.1X)? If yes → managed switch. If it's for a home printer or tiny office with no security requirements → unmanaged.

Layer 2 vs Layer 3 Switches

Layer 2 Switch (Standard)
  • Forwards based on MAC addresses
  • Cannot route between networks or VLANs
  • Needs an external router for inter-VLAN traffic
  • Less expensive — common for access layer
Layer 3 Switch (Multilayer)
  • Also routes based on IP addresses
  • Can route between VLANs directly ("router on a stick" not needed)
  • Faster inter-VLAN routing than a separate router
  • More expensive — common in distribution/core layers
When to Use Layer 3 Switches

Large networks with multiple VLANs benefit most from Layer 3 switches. Inter-VLAN traffic stays fast without bottlenecking through a separate router. For small networks with one or two VLANs, a Layer 2 switch plus a router (or SOHO router) is sufficient.

Switch Interface Configuration Basics

Managed switches are configured through several access methods, each suited to different situations:

Security Warning: Use SSH, Not Telnet

Telnet sends all data, including your admin password, as plain text over the network. Anyone with a packet sniffer can capture your credentials. Always configure SSH for remote switch management and disable Telnet.

Speed/Duplex Mismatch

If one side of a link is manually configured and the other side is set to auto-negotiate, they may fail to agree on settings correctly. This causes slow speeds, high error rates, and intermittent packet loss that can be very difficult to diagnose. Best practice: configure both ends consistently — either both auto or both manually set.

Case Study: The Green Dragon Inn Network

Case Study — The Green Dragon Inn Network

The Green Dragon Inn is expanding and needs a network for guest hobbits and staff. Frodo suggests a cheap unmanaged switch. Gandalf recommends a managed switch instead.

The network requirements:

  • Separate guest traffic from staff traffic (security)
  • Support 20 devices total
  • Allow remote management (Gandalf travels frequently)

Review Questions:

  1. Which switch type should they choose and why?
  2. What feature would separate guest from staff traffic?
  3. Why is remote management valuable for an inn?
Solution — The Green Dragon Inn Network
  1. Managed switch — unmanaged switches cannot separate traffic or be configured remotely. All three requirements demand managed switch features.
  2. VLANs (Virtual LANs) logically separate guest and staff traffic on the same physical switch. Guest devices would be on one VLAN; staff on another. The switch enforces this separation in software.
  3. Remote management lets Gandalf troubleshoot from anywhere in Middle-earth without traveling to the inn. He can monitor bandwidth, detect problems, and change configuration without disrupting operations.
Key Lesson

The extra cost of managed switches pays off in security and flexibility. For any business network handling multiple traffic types or requiring remote administration, a managed switch is the right choice.

Advanced Switching Topics

Advanced Switching Topics

Beyond basic frame forwarding, modern switches support features that improve performance, resilience, and power delivery for connected devices.

Sometimes a single cable link is not fast enough for a busy server or inter-switch connection. Link Aggregation (LAG) solves this by bundling multiple physical cables into one logical link.

graph LR
    SRV["fa:fa-server Server\n(4 NIC ports)"] -->|"Link 1 (1G)"| SW["fa:fa-network-wired Switch\n(LAG bundle)"]
    SRV -->|"Link 2 (1G)"| SW
    SRV -->|"Link 3 (1G)"| SW
    SRV -->|"Link 4 (1G)"| SW

    SW -.->|"Logical: 4 Gbps total
+ failover if one link drops"| NOTE[" "] style SRV fill:#e8f1fb,stroke:#004a88 style SW fill:#f0fdf4,stroke:#16a34a,stroke-width:2px style NOTE fill:#transparent,stroke:none,color:#6b7280

Figure 9: Link Aggregation — four 1 Gbps links bundled between a server and switch provide 4 Gbps effective bandwidth and redundancy. If one cable fails, traffic continues on the remaining three. LACP (802.3ad) coordinates the aggregation automatically on both ends.

Both Ends Must Match

LAG must be configured on both the switch AND the server or other switch. If only one side has LAG configured, the other side may see a loop and Spanning Tree Protocol will block the extra links, negating all the benefits.

Maximum Transmission Unit (MTU) and Jumbo Frames

The MTU (Maximum Transmission Unit) is the maximum payload size a network segment can carry without fragmentation. Standard Ethernet MTU is 1500 bytes.

Jumbo frames extend the MTU up to 9000 bytes. Larger frames = fewer frames for the same amount of data = less header overhead = better efficiency for large transfers. However, every device in the path must support the same MTU.

Frame TypePayload SizeBest for
Standard EthernetUp to 1,500 bytesGeneral-purpose networks
Jumbo FrameUp to 9,000 bytesStorage (iSCSI/NFS), backup, data center
MTU Mismatch = Silent Packet Loss

If one device supports jumbo frames but a switch or router in the path doesn't, oversized frames are silently dropped. This is notoriously difficult to diagnose because small packets work fine but large transfers fail or are very slow. Always configure MTU consistently across every device in a path.

Spanning Tree Protocol: The Loop Problem

Redundant switch paths are good for reliability — if one link fails, data can take another route. But redundant paths create a dangerous problem: Layer 2 loops.

Unlike IP packets, Ethernet frames have no TTL (Time To Live). If a broadcast frame enters a loop, it travels around the loop forever, and each pass through a switch creates more copies. This is called a broadcast storm and can crash an entire network in seconds.

graph TD
    SW1["fa:fa-network-wired SW1\n(Root Bridge)"] -->|"Active"| SW2["fa:fa-network-wired SW2"]
    SW1 -->|"Active"| SW3["fa:fa-network-wired SW3"]
    SW2 -->|"🔁 LOOP — broadcast storm!"| SW3

    style SW1 fill:#fef2f2,stroke:#dc2626,stroke-width:3px
    style SW2 fill:#fef2f2,stroke:#dc2626
    style SW3 fill:#fef2f2,stroke:#dc2626
            

Figure 10: A Layer 2 loop — three switches connected in a triangle. A broadcast frame entering SW1 gets forwarded to SW2 and SW3. SW2 forwards it to SW3, which forwards it back to SW1, which forwards it again… The frame circulates forever, multiplying with every pass. The entire network collapses within seconds.

Broadcast Storm Symptoms
  • All switch LEDs flashing rapidly and simultaneously
  • Network completely unresponsive
  • Switch CPU at 100% (visible in management interface)
  • Triggered within seconds of plugging in an extra cable

Spanning Tree Protocol: The Solution

STP (Spanning Tree Protocol, 802.1D) automatically detects and blocks redundant paths to prevent loops — while keeping those paths available as backups in case an active link fails.

STP works in three steps:

  1. Elect a Root Bridge — the switch with the lowest Bridge ID becomes the reference point for the entire topology.
  2. Calculate the best path from each switch to the Root Bridge (based on cost/speed).
  3. Block redundant ports — any port that would create a loop is put into a blocking state. If the active path fails, the blocked port transitions to forwarding.
graph TD
    SW1["fa:fa-network-wired SW1\n(Root Bridge)"]
    SW2["fa:fa-network-wired SW2"]
    SW3["fa:fa-network-wired SW3"]

    SW1 -->|"fa:fa-check Active"| SW2
    SW1 -->|"fa:fa-check Active"| SW3
    SW2 -. "fa:fa-ban BLOCKED by STP" .- SW3

    style SW1 fill:#f0fdf4,stroke:#16a34a,stroke-width:3px
    style SW2 fill:#e8f1fb,stroke:#004a88
    style SW3 fill:#e8f1fb,stroke:#004a88
            

Figure 11: STP preventing a loop in the same three-switch triangle. SW1 is the root bridge. Both links from SW1 are active (green). The SW2–SW3 link is blocked (dashed). If the SW1–SW2 link fails, STP automatically unblocks the SW2–SW3 link to restore connectivity. Redundancy without loops.

STP VersionStandardConvergence TimeNotes
STP (original)802.1D30–50 secondsSlow, but widely supported
RSTP (Rapid)802.1w1–2 secondsModern standard — use this
MSTP (Multiple)802.1s1–2 secondsPer-VLAN spanning trees for large networks

Power over Ethernet (PoE)

PoE (Power over Ethernet) delivers both data and electrical power over the same Ethernet cable. This eliminates the need for a separate power adapter and outlet at the device location — a huge advantage for cameras, phones, and access points installed in inconvenient places.

graph LR
    SW["fa:fa-network-wired PoE Switch\n(120W budget)"] -->|"Cat6 — Data + Power"| PH["fa:fa-phone VoIP Phone\n7W"]
    SW -->|"Cat6 — Data + Power"| AP1["fa:fa-wifi Main Hall AP\n25W"]
    SW -->|"Cat6 — Data + Power"| CAM["fa:fa-camera Security Camera\n15W"]
    SW -->|"Cat6 — Data + Power"| AP2["fa:fa-wifi Garden AP\n28W"]

    style SW fill:#e8f1fb,stroke:#004a88,stroke-width:3px
    style AP1 fill:#f0fdf4,stroke:#16a34a
    style AP2 fill:#f0fdf4,stroke:#16a34a
            

Figure 12: PoE powering four devices from a single switch. Total draw: 7+25+15+28 = 75W of the switch's 120W budget. Each device receives both data and power over one Cat6 cable — no separate power adapters or electrical outlets required at device locations.

StandardMax Power (per port)Typical Devices
802.3af (PoE)15.4WIP phones, basic cameras
802.3at (PoE+)30WWireless APs, better cameras
802.3bt (PoE++)60–100WPTZ cameras, small APs, laptops
Power Budget Warning

PoE switches have a total power budget (e.g., 120W for the switch above). Adding up all connected PoE devices must stay under this limit. Plan your PoE deployment carefully — exceeding the budget will cause the switch to deny power to newly connected devices or even reboot under extreme overload.

Case Study: Bilbo's Birthday Party Network Disaster

Case Study — Bilbo's Birthday Party Network Disaster

Bilbo is hosting his 111th birthday party and needs a network for the event planners. Shortly after setup, the entire network crashes — all switches show frantically blinking LEDs, and no device can communicate.

Merry investigates and discovers someone connected both ends of a patch cable to the same switch to "make the cables neater."

Review Questions:

  1. What has happened to the network?
  2. What protocol should have prevented this?
  3. What should they check on the switches?
Solution — Bilbo's Birthday Party Network Disaster
  1. A switching loop caused a broadcast storm. When the cable was plugged into two ports on the same switch, it created a loop. Broadcast frames entered the loop and multiplied until they overwhelmed every switch's processor.
  2. Spanning Tree Protocol (STP) should have automatically detected and blocked the redundant port to prevent the loop. If STP is properly enabled, it would block one side of the loop within 30–50 seconds (RSTP within 1–2 seconds).
  3. Immediate actions: (a) physically remove the looped cable; (b) verify STP is enabled on all switches; (c) if using unmanaged switches, replace with managed switches that support STP.
Key Lesson

Always use managed switches with STP enabled for any business network. A single accidental loop — even from one person "tidying cables" — can take down an entire network instantly. Unmanaged switches have no loop protection.

Troubleshooting Interfaces and Switches

Troubleshooting Interfaces and Switches

Structured troubleshooting using physical indicators, diagnostic commands, and error counters allows network technicians to rapidly isolate and resolve interface and switch problems.

LED Indicators and Hardware Failures

Switch port LEDs are the fastest first indicator of a problem — checking them costs nothing and requires no login.

Solid Green

Link is up and connected. Good — this is the normal operating state.

Flashing Green

Link is up and actively passing traffic. Normal during data transmission.

Amber / Orange

Port is disabled, blocked (STP), or experiencing errors. Investigate.

Off (No Light)

No link detected. Check: Is the cable plugged in? Is the device powered on?

Common hardware failures and first checks:

No Link Light? Check in This Order

Cable → NIC → Switch port → Transceiver (if fiber)

Each step tests one more variable. Swapping in a known-good component at each stage quickly isolates the failure.

Switch Show Commands

On managed switches (particularly Cisco and compatible devices), the show family of commands provides detailed diagnostic information without making any changes to the running configuration.

CommandWhat it Shows
show interfacesPort status, speed, duplex, and error counters for all interfaces
show interfaces Gi0/1Detailed status for a specific port (GigabitEthernet 0/1)
show mac address-tableCurrent MAC-to-port mappings learned by the switch
show spanning-treeSTP topology: root bridge, port roles, and blocked ports
show power inlinePoE status, power budget, and per-port consumption
show versionHardware model, IOS version, uptime
Example Output: show interfaces
Switch# show interfaces GigabitEthernet0/1
GigabitEthernet0/1 is up, line protocol is up
  Hardware is Gigabit Ethernet, address is 001a.2b3c.4d01
  MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
  Full-duplex, 1000Mb/s, link type is auto
  Input errors: 0, CRC: 0, overrun: 0
  Output errors: 0, collisions: 0

Interface Error Counters

Error counters visible in show interfaces output reveal the type and volume of problems occurring on a port. A small number of errors accumulated over weeks is normal; rapidly increasing errors indicate an active problem.

CounterWhat It IndicatesCommon Causes
CRC errorsFrame received with FCS mismatch — the data was corruptedDamaged cable, faulty NIC, RF interference
CollisionsFrames collided on the wireDuplex mismatch, hub in the path
RuntsFrames smaller than 64 bytesCollision fragments, NIC issue
GiantsFrames larger than 1518 bytesMTU mismatch, misconfigured device
Input errorsProblems receiving framesBad cable, interference, overloaded buffer
Output errorsProblems transmitting framesCongestion, duplex mismatch, faulty port
DiscardsFrames dropped by policy or overflowQoS policy, full buffers, rate limiting
Pro Tip: Clear and Monitor

Run clear counters on the switch, wait 5 minutes, then check again with show interfaces. If error counters are climbing rapidly, there is an active problem on that port. A counter that stays near zero after clearing indicates past errors, not current ones.

MAC Address Table Troubleshooting

The MAC address table is a powerful diagnostic tool for verifying device connectivity and tracing where a device is physically connected.

Example: show mac address-table
Switch# show mac address-table
VLAN    MAC Address         Type        Ports
----    -----------         --------    -----
   1    00:1a:2b:3c:4d:5e   DYNAMIC     Gi0/1
   1    00:50:56:aa:bb:cc   DYNAMIC     Gi0/2
   1    ff:ff:ff:ff:ff:ff   STATIC      CPU
MAC Flapping

If the same MAC address appears on multiple ports in rapid alternation (visible in switch logs as "MAC flapping"), this indicates either a network loop or a duplicate MAC address on two different devices. Both are serious problems requiring immediate investigation.

PoE Troubleshooting

PoE failures are often silent — the device simply doesn't power on — making systematic troubleshooting especially important.

Common PoE Issues
  • Device not powering on at all
  • Insufficient power budget on the switch
  • Wrong PoE class negotiated
  • Cable uses only 2 pairs (PoE requires all 4)
Troubleshooting Steps
  1. Verify the switch port and switch model support PoE
  2. Check total power budget remaining (show power inline)
  3. Verify cable uses all 4 pairs (Cat5e or better)
  4. Check device's PoE class requirement vs. switch standard
  5. Try a known-good cable and a different PoE port
PoE ClassMax PowerTypical Device
Class 0 (default)15.4WUnknown / unclassified devices
Class 14.0WVery low power devices
Class 27.0WIP phones
Class 315.4WBasic cameras, basic APs
Class 430.0W (PoE+)802.3at devices (most APs)
Cable Matters for PoE

A cable that "works fine for data" may fail for PoE if some of the 4 pairs are damaged or disconnected. PoE requires all four copper pairs to deliver adequate power, whereas Fast Ethernet only uses two pairs. Always use Cat5e or better for PoE installations and verify the physical cable when troubleshooting power failures.

Module Summary

Module 3 Summary

NICs and Transceivers

  • NICs connect hosts to networks; each has a unique 48-bit MAC address (BIA).
  • Transceivers (SFP, SFP+, QSFP) convert between electrical and optical signals — always match transceiver to cable type and distance.
  • Auto-negotiation determines speed and duplex; manual mismatches cause errors.

Ethernet Frames

  • Frame structure: Preamble | Dest MAC | Src MAC | Type | Payload (46–1500 B) | FCS.
  • FCS detects corruption; CRC errors indicate physical layer problems.
  • Standard MTU = 1500 bytes; jumbo frames up to 9000 bytes (requires end-to-end support).

Switching Concepts

  • Hub (L1) → Bridge (L2, 2–4 ports) → Switch (L2, multi-port bridge).
  • Switches: Learn (source MAC), Forward (known dest), Flood (unknown dest), Filter (same segment).
  • Layer 3 switches also route based on IP — enabling inter-VLAN routing without an external router.

Advanced Features

  • STP (802.1D / RSTP 802.1w): Prevents Layer 2 loops by blocking redundant ports.
  • PoE (802.3af/at/bt): Delivers power and data over Ethernet. Track power budget.
  • LAG / LACP (802.3ad): Bonds multiple links for bandwidth and redundancy.
  • Troubleshoot with LEDs, show commands, and error counter analysis.
Next Steps

Module 3 completes the Layer 1–2 picture. In Module 4, we move to Layer 3 (Network) to explore IP addressing, subnetting, and how routers make decisions about moving packets between different networks.

This module has provided a comprehensive examination of Layer 2 networking hardware and concepts. You've explored NICs and transceivers (the physical endpoints), MAC addresses and Ethernet frames (the Layer 2 data units), and the evolution from hubs to modern managed switches. Advanced topics including STP, PoE, and link aggregation complete the picture of what enterprise switches can do. Systematic troubleshooting using LEDs, show commands, and error counters gives you practical tools for diagnosing real-world switch problems.