What Should I Do With These
What ShouldI Do With These
INTRODUCTION
You’ve stumbled upon a pile of aging network gear at the back of the server room – a dusty rack of Ethernet switches, a few patch panels, and a handful of spare cables. The question echoing through the lab is simple: What should I do with these? For many homelab enthusiasts and self‑hosted DevOps practitioners, the answer isn’t just “store them in a closet.” It’s about turning forgotten hardware into a playground for infrastructure experiments, automation pipelines, and creative networking projects.
In today’s blog post we’ll walk through a comprehensive, step‑by‑step guide that transforms that “ewaste” into a purposeful asset. You’ll learn how to evaluate the equipment, design a safe wiring topology, integrate it with modern monitoring tools, and leverage it for low‑latency testing, VLAN hopping, and even a playful “snake” game on Ethernet lighting. The guide is written for experienced sysadmins and DevOps engineers who already have a grasp of Linux, Docker, and basic networking concepts, but it also serves as a reference for anyone looking to repurpose legacy network gear in a self‑hosted environment.
By the end of this article you will:
- Understand the functional purpose of common switch models and their role in a homelab.
- Identify the prerequisites – hardware, OS, and network settings – needed before any installation.
- Follow a robust installation and configuration workflow that avoids common pitfalls.
- Apply security hardening and performance‑tuning techniques to keep the environment production‑ready.
- Execute everyday operations, monitoring, and troubleshooting with confidence.
Keywords such as self‑hosted, homelab, DevOps, network automation, and open‑source are woven throughout to boost SEO and ensure the article reaches the right audience. Let’s dive into the anatomy of the problem and uncover how to make those idle switches work for you.
UNDERSTANDING THE TOPIC
What Are We Talking About?
The Reddit thread that sparked this guide describes a scenario where a team has “ewaste time at work again” and is unsure how to use a collection of network switches. The top comments suggest:
- Donating the gear to team members.
- Removing it before it breaks a table. * Using patch cables to create the longest possible path between two hosts and measuring ping latency. * Leveraging VLAN support to achieve 24 hops per unit.
These suggestions hint at a broader theme: old networking equipment can be repurposed for creative, low‑cost experiments that teach networking fundamentals, test latency, and provide a sandbox for DevOps pipelines.
Historical Context
Network switches have evolved from simple multiport hubs to sophisticated Layer 2/3 devices with extensive ACL, QoS, and monitoring capabilities. Early models from the early 2000s often lacked advanced features but excelled at bulk packet forwarding, making them ideal for latency‑focused experiments. Modern open‑source projects such as OpenSwitch and OVS‑DB can run on commodity hardware, turning legacy switches into programmable data planes.
Core Features
| Feature | Description | Typical Use‑Case |
|---|---|---|
| Port Density | Number of 1 GbE/10 GbE ports per chassis | Building dense patch topologies |
| VLAN Support | Ability to tag/untag traffic with 802.1Q | Isolating test environments |
| Port Mirroring | Duplicate traffic to a monitoring port | Feeding packet captures to Wireshark |
| Link Aggregation (LACP) | Combine multiple physical links into a single logical link | Higher throughput for stress tests |
| LED Indicators | Visual feedback on link status | Fun “snake” lighting games on Ethernet ports |
Pros and Cons
Pros
- Low acquisition cost – often free from corporate e‑waste cycles.
- Robust hardware that can handle 24/7 operation.
- Opportunity to practice VLAN hopping, QoS, and link aggregation.
Cons
- May lack modern management interfaces (e.g., REST APIs).
- Power consumption can be higher than newer switches.
- Firmware updates are rarely available, so security patches must be applied at the OS level.
Real‑World Applications
- Latency Benchmarking – By chaining multiple switches, engineers can measure end‑to‑end ping times across 20‑30 hops, revealing bottlenecks in the network stack.
- VLAN Lab – Deploying isolated VLANs on a single physical switch enables safe testing of multi‑tenant network designs.
- Automation Sandbox – Using Ansible or Terraform to provision VLANs and ports programmatically teaches infrastructure‑as‑code principles.
- Creative Visualization – Mapping Ethernet LEDs to a “snake” game demonstrates how low‑level hardware can be repurposed for interactive projects.
Comparison with Alternatives
| Alternative | Cost | Feature Set | Flexibility |
|---|---|---|---|
| New Managed Switch (e.g., Ubiquiti EdgeSwitch) | $$$ | Full L3, REST API, advanced QoS | High, but expensive |
| Open‑Source Switch Software on x86 | $ (hardware) | Programmable data plane, custom pipelines | Very high, requires dev effort |
| Legacy Physical Switch | Free | Basic L2 forwarding, limited management | Moderate, good for labs |
The legacy switch shines when the goal is hands‑on experimentation rather than production‑grade routing.
PREREQUISITES
Before you start wiring up the rack, verify that your environment meets the following requirements. ### Hardware Requirements
| Component | Minimum Specification | Recommended |
|---|---|---|
| Switch | 24‑port 1 GbE, basic L2 features | 48‑port 10 GbE with VLAN and LACP |
| Cabling | Cat5e patch cables (minimum) | Cat6a or higher for 10 GbE |
| Server/Host | 2 CPU cores, 4 GB RAM, 20 GB disk | 4 CPU cores, 8 GB RAM, 50 GB SSD |
| Power | Redundant UPS for safe shutdown | Network‑grade UPS with graceful shutdown scripts |
Software Requirements
| Software | Version | Purpose |
|---|---|---|
| Linux Distribution | Ubuntu 22.04 LTS or CentOS 8 | Base OS for Docker & networking tools |
| Docker Engine | 24.0+ | Container runtime for network services |
| Docker Compose | 2.20+ | Multi‑container orchestration |
| Ansible | 2.15+ | Automation of switch configuration |
| Prometheus | 2.45+ | Metrics collection |
| Grafana | 10.2+ | Visualization of latency and throughput |
Network Considerations
- Assign a dedicated VLAN (e.g., VLAN 100) for lab traffic to avoid contaminating production networks.
- Ensure the host’s NIC is configured in promiscuous mode if you plan to capture traffic from multiple ports.
- Reserve a static IP range for the lab (e.g., 10.10.100.0/24) and document it in your inventory.
Security & Permissions
- Run all Docker containers with the non‑root user (
$USER). - Apply AppArmor or SELinux profiles to restrict container capabilities.
- Restrict SSH access to the management network; use key‑based authentication only.
Pre‑Installation Checklist
- Verify switch firmware version and note any known bugs.
- Confirm that all patch cables are labeled and functional (use a cable tester).
- Backup current switch configuration (if accessible via CLI).
- Create a dedicated directory for lab scripts (
/opt/homelab). - Pull the latest Docker images for required services.
INSTALLATION & SETUP
The following sections provide a concrete, reproducible workflow for turning the dusty switches into a functional lab environment. ### 1. Prepare the Host System ```bash
Update the package index
sudo apt-get update && sudo apt-get upgrade -y
Install required packages
sudo apt-get install -y curl gnupg2 software-properties-common
Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg –dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg# Add Docker repository echo
“deb [arch=$(dpkg –print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg]
https://download.docker.com/linux/ubuntu
$(lsb_release -cs) stable” |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Install Docker Engine
sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io
Add current user to docker group
sudo usermod -aG docker $USER
Install Docker Compose
DOCKER_COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep -Po ‘“tag_name”: “\K.*?(?=”)’) sudo curl -L “https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)” -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
Verify installation
docker version docker-compose version
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
### 2. Deploy a Minimal Switch Management Stack Create a directory for the stack and a `docker-compose.yml` file:
```yaml
version: "3.8"
services:
switch-mgmt:
image: ghcr.io/netapp/switch-mgmt:latest
container_name: $CONTAINER_NAMES-switch-mgmt
restart: unless-stopped environment:
- TZ=UTC - LOG_LEVEL=info
ports:
- "8080:8080"
volumes:
- ./config:/app/config
networks:
- labnet
prometheus:
image: prom/prometheus:latest
container_name: $CONTAINER_NAMES-prometheus
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
networks:
- labnet
grafana:
image: grafana/grafana:latest
container_name: $CONTAINER_NAMES-grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./grafana:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
networks:
- labnet
networks:
labnet:
driver: bridge
Explanation of Key Sections
switch-mgmt– A generic management container that can be replaced with a vendor‑specific image (e.g., Cisco IOS‑XE) if the switch supports it.prometheus– Scrapes metrics exposed by the management container.grafana– Visualizes latency, packet loss, and VLAN utilization.
Deploy the stack:
1
2
3
4
5
6
7
8
9
docker-compose up -d```
### 3. Configure the Switch If your switch runs a Linux‑based OS (e.g., OpenWrt, VyOS), you can push configuration via Ansible. Below is an example `ansible.cfg` and playbook:
```ini
[defaults]
inventory = ./inventory.ini
host_key_checking = False
remote_user = $USER
1
2
3
4
# inventory.ini
[switches]
switch01 ansible_host=10.10.100.11
switch02 ansible_host=10.10.100.12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# playbook.yml
- name: Configure legacy switches
hosts: switches
become: true
tasks:
- name: Ensure VLAN 100 exists
ios_vlan:
vlan_id: 100
name: lab_vlan
state: present
when: ansible_network_os == "ios"
- name: Assign ports to VLAN 100
ios_interface:
interface: ""
access_vlan: 100
mode: access
state: up
loop:
- Ethernet1/0/1
- Ethernet1/0/2 - Ethernet1/0/3
Run the playbook:
1
ansible-playbook -i inventory.ini playbook.yml
4. Verify Connectivity
1
2
3
4
# Ping across the longest possible path (24 hops)
for i in {1..24}; do
ping -c 3 10.10.100.${i} && echo "Hop $i reachable"
done
If the above succeeds, you have successfully established a multi‑hop VLAN‑isolated network using the repurposed switches.
5. Common Pitfalls & How to Avoid Them
| Pitfall | Symptom | Fix |
|---|---|---|
| Port Speed Mismatch | Intermittent packet loss | Force all ports to 1 GbE using speed auto or speed 1000 commands. |
| STP Loop | Broadcast storm, high CPU | Enable Rapid Spanning Tree Protocol (RSTP) on the switch. |
| Incorrect VLAN Tagging | Traffic leaks into production VLAN | Double |