Ongoing Project

Building a switching and routing practice lab

Reading about trunks, native VLANs and spanning tree only goes so far. You learn networking by building networks, breaking them and working out why. This project explains when simulators are enough, when real equipment earns its noise, and gives you a graded set of exercises.

  • IntermediateDifficulty
  • OngoingAn evening per exercise
  • 2 switchesPlus a small firewall
  • $0 to $400Typical cost, mostly used

Simulators, emulators or real equipment

OptionWhat it isTeaches wellLimits
Packet simulatorA program that models switches and routers and their command linesMost associate-level configuration and concepts, quickly and for freeOnly the features the simulator implements; no real traffic
Network emulatorRuns real network operating system images as virtual machines, wired together in softwareReal behavior, multi-vendor designs, automation and larger topologiesMemory hungry; vendor images may require licenses
Virtual appliancesFirewall and router distributions running as ordinary VMsRouting, firewalling, VPNs and segmentationNo physical switching
Physical equipmentReal switches, routers and access pointsCabling, console access, PoE, hardware forwarding, wireless, power and noiseCost, space, heat and noise

Most learners do best with a mix. Start virtual, where mistakes are free and topologies are unlimited. Add one or two physical switches when you want the parts that software cannot teach: plugging in a console cable, watching link lights negotiate, diagnosing a bad patch lead and feeling how loud a used enterprise switch really is. If you are studying for a vendor's certification, practice on that vendor's command line, in an emulator or on real hardware, because exam questions follow its conventions.

New to virtual labs? Start with Networking and Security Study Lab, then come back here.

A starter kit

  • A small managed switch with 8 ports, ideally with a few PoE ports for an access point.
  • A larger managed switch with 24 ports. Two switches let you practice trunks, link aggregation and multi-switch VLANs.
  • A small firewall box, such as a fanless mini PC with several ports, to route between VLANs.
  • A USB console cable and a handful of short patch cables in two colors.
  • Optionally, one access point, to practice wireless networks mapped to VLANs.

Caution

Used enterprise switches are cheap for a reason: they are loud, power hungry and sometimes have features locked behind licenses or firmware that is hard to obtain. Check the exact model's licensing, firmware availability and power draw before you buy, and power it off when you are not practicing. See Choosing Homelab Hardware.

Keep practice separate from the household

Connect the practice switches to your real network through one port on the firewall or one dedicated VLAN, so a spanning tree experiment or a misconfigured DHCP server cannot take the house offline. Keep the practice switches' management interfaces off your real management network, and reset them to factory defaults between major exercises.

Graded exercises

  1. Console and basics. Connect over the console cable, set a hostname, management address, time source and an administrative account. Save the configuration and learn the difference between the running and saved configuration.
  2. VLANs on one switch. Create three VLANs, assign access ports and confirm hosts in different VLANs cannot reach each other without routing.
  3. A trunk between switches. Carry all three VLANs across a tagged link. Then deliberately mismatch the native VLAN at each end and observe what breaks.
  4. Routing between VLANs. Route them on the firewall with explicit rules, as in VLANs and Segmentation. Then compare routing on a layer 3 switch, and note what you lose in filtering.
  5. DHCP relay. Move routing between two VLANs onto the layer 3 switch, then relay their DHCP requests to a single DHCP server on the firewall, and watch the relayed requests arrive.
  6. Link aggregation. Bundle two links between the switches, unplug one cable during a large transfer and watch traffic continue.
  7. Spanning tree. Unplug the practice switches' uplink to your real network first. Then, on the isolated practice switches only, connect a second link without aggregation and watch spanning tree block it. Then disable spanning tree on one port and see why it exists.
  8. Port mirroring. Mirror a port to a laptop running a packet capture tool and watch a DHCP exchange, a DNS lookup and a TLS handshake.
  9. Wireless. Map three wireless networks to three VLANs on one access point, and test which devices reach what.

Write up each exercise with a diagram, the commands you used and what surprised you. Rebuild the hardest one from your notes a week later.

Virtual switches stop at the host

A hypervisor's virtual switch connects the guests on that host. It does not replace a physical switch for traffic between machines, and it will not show you link negotiation, cabling faults or PoE. Labs that combine both, with VLAN trunks from a physical switch into a VLAN-aware bridge on a hypervisor, teach how real environments fit together.

Owning your internet edge

Practicing networking eventually raises the question of the provider's equipment. There are three common arrangements:

ArrangementProsCons
Rent the provider's combined gatewayThe provider replaces it when it failsA monthly fee, limited control and often outdated firmware
Provider's modem, your own firewallFull control of routing and rulesMake sure the modem is in bridge mode and its own wireless is disabled
Your own modem and firewallNo rental fee, full controlUp-front cost, and you are the support desk; telephone service may need a specific modem

Change one piece at a time and keep the old path working until the new one has proven itself; Firewalls and Routing covers connecting to your provider in detail.

Verify

  • After each exercise, you can draw the topology from memory and explain every link and VLAN on it.
  • Hosts can reach exactly what your design says they should, and nothing else, tested from inside each VLAN.
  • You can restore each switch to a known-good configuration from your notes in minutes.
  • The household network never noticed a single exercise.