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.
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
- NIC
- Network Interface Card
- Transceiver
- TX/RX signal converter
- SFP / SFP+
- Modular fiber/copper insert
- Wake-on-LAN
- Remote power-on via network
- MAC Address
- 48-bit hardware address
- OUI
- Organizationally Unique ID
- BIA
- Burned-In Address
- Broadcast
- FF:FF:FF:FF:FF:FF
- Hub
- Layer 1 multi-port repeater
- Bridge
- 2-port Layer 2 device
- Switch
- Multi-port bridge
- Flooding
- Send to all ports (unknown)
- 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.
- 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.
- Speed ratings: 1 Gbps (workstations), 10 Gbps (servers), 25 Gbps, 100 Gbps (data centers).
- Connector types: RJ-45 for copper, SFP/SFP+ cage for fiber or DAC cables.
- Wake-on-LAN (WoL): Allows a powered-off computer to be started remotely by a special "magic packet" sent over the network.
- Offloading: High-end NICs handle checksums, segmentation, and encryption in hardware — reducing CPU load on the host.
- Server NICs often have multiple ports for redundancy, throughput, or connecting to separate networks.
| NIC Type | Typical Speed | Use Case |
|---|---|---|
| 1 Gbps RJ-45 | 1,000 Mbps | Desktops, laptops |
| 10 Gbps RJ-45 | 10,000 Mbps | High-end workstations |
| 10 Gbps SFP+ | 10,000 Mbps | Servers |
| 25 / 100 Gbps | 25,000 – 100,000 Mbps | Data center infrastructure |
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.
- TX (Transmit): The outgoing signal path — typically uses a laser diode or LED to convert electrical signals to light pulses.
- RX (Receive): The incoming signal path — a photodetector converts incoming light back to electrical signals.
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."
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 |
|---|---|---|---|---|
| SFP | 1 Gbps | MMF or SMF | LC | 550 m (MMF) / 10 km (SMF) |
| SFP+ | 10 Gbps | MMF or SMF | LC | 300 m (MMF) / 10–80 km (SMF) |
| QSFP | 40 Gbps | MMF or SMF | MPO/MTP | 100 m (MMF) / 10 km (SMF) |
| QSFP28 | 100 Gbps | MMF or SMF | MPO/MTP | 100 m (MMF) / 10 km (SMF) |
| GBIC (legacy) | 1 Gbps | MMF or SMF | SC | 550 m (MMF) / 10 km (SMF) |
| SFP-T | 1 Gbps | Copper (UTP) | RJ-45 | 100 m |
| SFP+ DAC | 10 Gbps | Twinax copper | Integrated | 3–7 m |
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.
- 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
- 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
- Check transceiver compatibility with the switch model
- Verify fiber type (MMF vs SMF) matches the transceiver
- 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.
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
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:
- Will the 10 Gbps NICs work in the 1 Gbps switch ports?
- What speed will the connection actually operate at?
- What might cause a MAC address of all zeros?
- Yes — 10 Gbps NICs will auto-negotiate down to match the switch's 1 Gbps capability. NICs are backward-compatible.
- 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.
- 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.
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.
- 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 (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 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).
00:1A:2B:3C:4D:5E | Colon-separated (Linux, macOS) |
00-1A-2B-3C-4D-5E | Dash-separated (Windows) |
001A.2B3C.4D5E | Dot-separated (Cisco IOS) |
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.
- OUI (Organizationally Unique Identifier): First 3 bytes (24 bits). Assigned by IEEE to each manufacturer. Examples:
00:50:56= VMware,00:0C:29= VMware (alternate),00:1A:A0= Dell. - Device ID: Last 3 bytes (24 bits). Assigned by the manufacturer. Must be unique for each NIC they produce.
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
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.
- All devices share a single collision domain — only one device can transmit at a time.
- Only half-duplex communication is possible — a device can send or receive, but not both simultaneously.
- More devices connected = more collisions = worse performance. 10 devices on a 100 Mbps hub share roughly 10 Mbps each (minus collision overhead).
- Hubs have no MAC address awareness — they don't know or care who is connected where.
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.
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.
- A 24-port Gigabit switch can handle up to 24 Gbps total bandwidth (1 Gbps per port, full-duplex).
- Each port has dedicated bandwidth — no sharing with other devices.
- Switches learn MAC addresses automatically and build a forwarding table dynamically.
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:
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.
When the switch knows which port a destination MAC is on, it sends the frame only to that port. Efficient, targeted delivery.
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.
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 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.
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
- Plug and play — no configuration
- No VLANs, no monitoring
- Cheapest option
- Best for: Home, very small office
- Limited management features
- Basic VLANs, simple web GUI
- Middle price range
- Best for: Small business
- Full configuration options
- VLANs, STP, SNMP, port security
- CLI, web GUI, remote management
- Best for: Enterprise, any business
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
- 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
- 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
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:
- Console cable: A direct serial (RS-232/USB) connection to the switch's console port. Used for initial setup when no network access exists yet.
- SSH (Secure Shell): Encrypted remote CLI access over the network. The preferred method for remote management.
- Telnet: Unencrypted remote CLI. Avoid this — credentials are transmitted in plain text. Use SSH instead.
- Web GUI: Browser-based management available on some models. Easier to learn but less powerful than CLI.
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.
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
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:
- Which switch type should they choose and why?
- What feature would separate guest from staff traffic?
- Why is remote management valuable for an inn?
- Managed switch — unmanaged switches cannot separate traffic or be configured remotely. All three requirements demand managed switch features.
- 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.
- 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.
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.
Link Aggregation and NIC Teaming
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.
- LAG (Link Aggregation Group): Combines two or more switch ports into a single logical interface with combined bandwidth.
- LACP (802.3ad): The IEEE protocol that automatically negotiates link aggregation between both ends of the connection.
- NIC Teaming: The same concept implemented on the server/host side — multiple NICs bonded together.
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.
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 Type | Payload Size | Best for |
|---|---|---|
| Standard Ethernet | Up to 1,500 bytes | General-purpose networks |
| Jumbo Frame | Up to 9,000 bytes | Storage (iSCSI/NFS), backup, data center |
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.
- 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:
- Elect a Root Bridge — the switch with the lowest Bridge ID becomes the reference point for the entire topology.
- Calculate the best path from each switch to the Root Bridge (based on cost/speed).
- 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 Version | Standard | Convergence Time | Notes |
|---|---|---|---|
| STP (original) | 802.1D | 30–50 seconds | Slow, but widely supported |
| RSTP (Rapid) | 802.1w | 1–2 seconds | Modern standard — use this |
| MSTP (Multiple) | 802.1s | 1–2 seconds | Per-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.
| Standard | Max Power (per port) | Typical Devices |
|---|---|---|
| 802.3af (PoE) | 15.4W | IP phones, basic cameras |
| 802.3at (PoE+) | 30W | Wireless APs, better cameras |
| 802.3bt (PoE++) | 60–100W | PTZ cameras, small APs, laptops |
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
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:
- What has happened to the network?
- What protocol should have prevented this?
- What should they check on the switches?
- 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.
- 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).
- 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.
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.
Link is up and connected. Good — this is the normal operating state.
Link is up and actively passing traffic. Normal during data transmission.
Port is disabled, blocked (STP), or experiencing errors. Investigate.
No link detected. Check: Is the cable plugged in? Is the device powered on?
Common hardware failures and first checks:
- Bad switch port — try plugging the cable into a different port on the same switch.
- Failed transceiver module — swap the SFP/SFP+ module with a known-good spare.
- Power supply failure — switches have redundant PSUs in enterprise models; check both.
- Overheating — check that vents are clear and fans are spinning. Overheating causes intermittent failures and reduced performance.
- Failed backplane — multiple ports down simultaneously may indicate an internal hardware failure requiring replacement.
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.
| Command | What it Shows |
|---|---|
show interfaces | Port status, speed, duplex, and error counters for all interfaces |
show interfaces Gi0/1 | Detailed status for a specific port (GigabitEthernet 0/1) |
show mac address-table | Current MAC-to-port mappings learned by the switch |
show spanning-tree | STP topology: root bridge, port roles, and blocked ports |
show power inline | PoE status, power budget, and per-port consumption |
show version | Hardware model, IOS version, uptime |
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.
| Counter | What It Indicates | Common Causes |
|---|---|---|
| CRC errors | Frame received with FCS mismatch — the data was corrupted | Damaged cable, faulty NIC, RF interference |
| Collisions | Frames collided on the wire | Duplex mismatch, hub in the path |
| Runts | Frames smaller than 64 bytes | Collision fragments, NIC issue |
| Giants | Frames larger than 1518 bytes | MTU mismatch, misconfigured device |
| Input errors | Problems receiving frames | Bad cable, interference, overloaded buffer |
| Output errors | Problems transmitting frames | Congestion, duplex mismatch, faulty port |
| Discards | Frames dropped by policy or overflow | QoS policy, full buffers, rate limiting |
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.
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 appears on expected port → Device is connected where you think it is.
- MAC appears on wrong port → Cable may be patched to the wrong wall jack.
- MAC not in table → Device is powered off, disconnected, or NIC has failed.
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.
- 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)
- Verify the switch port and switch model support PoE
- Check total power budget remaining (
show power inline) - Verify cable uses all 4 pairs (Cat5e or better)
- Check device's PoE class requirement vs. switch standard
- Try a known-good cable and a different PoE port
| PoE Class | Max Power | Typical Device |
|---|---|---|
| Class 0 (default) | 15.4W | Unknown / unclassified devices |
| Class 1 | 4.0W | Very low power devices |
| Class 2 | 7.0W | IP phones |
| Class 3 | 15.4W | Basic cameras, basic APs |
| Class 4 | 30.0W (PoE+) | 802.3at devices (most APs) |
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,
showcommands, and error counter analysis.
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.