2026-08-31

Best Managed Switch with VLANs for Beginner Homelab Under $100 (Pi and Docker Friendly)

For a beginner homelab running a Pi and Docker containers, the TP-Link TL-SG108E is the easiest and cheapest path to proper VLAN segmentation — typically around $30 and genuinely functional for the job. The Netgear GS308E and MikroTik CSS326 are also worth considering depending on how deep you want to go, but each has real trade-offs I'll break down below.

Why VLANs Actually Matter on a Pi Homelab

If you're running Docker containers on a Pi — say Pihole, Home Assistant, a reverse proxy, and a media server — everything shares one flat network by default. That means your IoT thermostat, your kid's tablet, and your self-hosted Nextcloud instance are all neighbors with no fences. VLANs let you segment traffic at Layer 2 so compromised IoT devices can't sniff traffic headed for your Docker services.

On my own build — a Raspberry Pi 5 Model B Rev 1.1 running Debian GNU/Linux 13 (trixie) on kernel 6.18.34+rpt-rpi-2712 with 15Gi RAM — I run multiple Docker containers off an NVMe boot drive (Fanxiang S501Q 512GB, mounted via the Pi 5's PCIe slot at gen2 default). Real sequential throughput: 453 MB/s read, 438 MB/s write, with 16,433 random 4K read IOPS. The SoC idles at 49.4°C and actually dropped slightly to 48.8°C under sustained load (active cooling doing its job). The point: this Pi is fast enough that the network — not storage — becomes the bottleneck if you're still on a dumb gigabit switch with no segmentation.

A managed switch with 802.1Q VLAN tagging lets you create tagged trunk ports to the Pi's single Ethernet interface. Linux handles VLAN subinterfaces natively (ip link add link eth0 name eth0.10 type vlan id 10), so your Pi can route or serve traffic on multiple VLANs simultaneously without extra NICs.

The Three Switches Worth Considering

TP-Link TL-SG108E (~$30)

TP-Link TL-SG108E 8-Port Easy Smart Switch

Based on published specs and widespread community reports (I haven't bench-tested this switch myself), this is the default recommendation for beginners, and for good reason:

The management interface is not sophisticated. You won't get per-port traffic graphs or deep ACLs. But for creating 3–4 VLANs (e.g., trusted LAN, IoT, guest, management), it works and doesn't require reading a 400-page manual.

Netgear GS308E (~$35)

Netgear GS308E 8-Port Plus Switch

Reportedly very similar in capability to the TL-SG108E. Key differences based on specs and community feedback:

Honestly, between the GS308E and TL-SG108E, the functional difference is minimal. Pick whichever is cheaper at time of purchase. Neither gives you a CLI.

MikroTik CSS326-24G-2S+RM (~$90–100)

This is a different category entirely. Based on published specs:

If you know you're going to expand beyond a Pi and a few devices — maybe adding a used Dell Optiplex running Proxmox, a NAS, or a second Pi — spending the extra $60 now saves you from replacing the 8-port switch in six months.

How VLAN Trunking Works with a Pi 5

On my Pi 5 running Debian Trixie, setting up VLAN subinterfaces is straightforward. After connecting the Pi to a tagged trunk port on your managed switch:

sudo ip link add link eth0 name eth0.10 type vlan id 10
sudo ip addr add 10.0.10.1/24 dev eth0.10
sudo ip link set dev eth0.10 up

For persistence across reboots, define the interfaces in /etc/network/interfaces or via a netplan config. Docker containers can then bind to specific VLAN interfaces using macvlan or ipvlan network drivers, giving each service its own VLAN presence.

With my NVMe boot drive delivering 453 MB/s sequential reads, the storage layer isn't a constraint — the Pi's single gigabit Ethernet port (roughly 940 Mbps practical throughput) is the ceiling. VLANs don't reduce that throughput in any meaningful way; tagged frames add 4 bytes of overhead per packet.

Who Should NOT Buy a Managed Switch Yet

Practical Tips

Keep your switch firmware updated — all three vendors have had VLAN-related bugs in past firmware versions. Document your VLAN IDs and port assignments somewhere (even a text file in your homelab Git repo). Start with just two VLANs: a trusted LAN and an IoT VLAN. Add more only when you have a real reason.

If you're cloning or reimaging your Pi's NVMe drive during setup experiments, an external NVMe enclosure saves time over reflashing. I keep one around for exactly this purpose: M.2 NVMe SSD Enclosure – USB-C 10Gbps with Magnetic Closure.

For a deeper walkthrough on building and configuring a Pi-based homelab from scratch — including network segmentation, Docker orchestration, and the AI agent setup I run on my own Pi 5 — take a look at The Homelab Agent Kit — 9 AI Agents, 13-Chapter Build Guide, Python.

Verdict

The TP-Link TL-SG108E is the right first managed switch for most beginners — it's $30, it does 802.1Q VLANs, and it won't fight you during setup. If you're already planning to grow past 8 ports or want SFP+ uplinks, skip straight to the MikroTik CSS326 and save yourself a replacement cycle. Either way, VLANs on a Pi 5 running Docker are trivially easy on the Linux side — the switch is just the piece that makes the segmentation real on the wire.

🛠️ From the bench shop

Gear from our own store that fits this build — shipped tracked, UK support.

The Homelab Agent Kit — 9 AI Agents, 13-Chapter Build Guide, Python£29.00View →
M.2 NVMe SSD Enclosure – USB-C 10Gbps with Magnetic Closure£36.99View →
M.2 SSD Enclosure – NVMe & SATA, USB 3.1 Gen2 Type-C, Aluminium£66.99View →

← all articles

Some links are affiliate links — if you buy through them I may earn a small commission at no extra cost to you. Benchmarks are run on my own hardware. · Shop · Contact