Switching & Routing (Part 2)

In my last post, I gave a brief introduction to the networking for a homelab. In this part, I’ll talk about the other pieces of equipment that helped make it work.

Though your situation may vary here’s what I’ve used:

  • Unifi USG (approx £100)
  • Unifi Controller (free unless if you host yourself or you can buy the device from USG)
  • Either a managed or unmanaged switch (Unifi have a good offering for this) otherwise for VLAN support you’ll want a Layer 3 capable managed switch I’ve used a Dell PowerConnect 2824 (£45 eBay) for this. If you are not expecting any VLAN’s at this point unmanaged routing might be the way to go then a standard 5 or 10 port ethernet switch will work just fine.
  • If you’re expecting to setup WiFi within the home then a spare home broadband router (free), Google WiFi (£100+) or again Unifi’s AP range.
  • Plenty of ethernet cables.

First off I got started with the installation and setup on the Unifi USG and the Unifi Controller. The best way to go about this is to set up the controller first, I found that this would run best on one of my existing Virtual Servers.

Safe to say I’m running Windows Server 2016 and the installation of the controller software is really straight forward. Make sure that when you set it up, configure it to run as a service to avoid the controller software stopping when you log-off and if you’ll have the ability to configure the controller to auto-start on reboot. Don’t worry if you haven’t got Windows server licences hanging around they offer support for Linux distro’s as well which may be better suited in some cases.

Your Unfi Controller software must be able to see the USG and vice versa as you’re USG will be polling your controller (see Unifi documentation for this one). Once you’ve got the controller installed and the basic setup has been completed then you need to move onto configuring the USG. I use an existing modem/router from my broadband supplier, but if you’re doing this you’ll want to avoid any double NAT’ing this can cause all sorts of issues in routing traffic, it’s most certainly possible but not advisable unless you’re happy with double NAT within you’re network.

I’m running home fibre so I’m required to use my modem from my broadband supplier for the handoff of data to the network. If possible you’ll want to turn your router into a bridge mode (if it has one) this means that it’ll take care of the modem side of traffic (talking to your ISP) but you’ll be responsible for the rest. You’ll be taking full responsibility for ensuring that the firewall is installed and correctly configured.

You’ll want to configure your WAN settings before you switch your kit out to the new stuff, otherwise, you’re may lose internet connection before you’ve had the chance to google troubleshooting steps. The USG can be adopted prior to wiring it up but it’s a bit of a faff. I’ve found it’s always handy to have a mobile hotspot available to search for solutions to any issues you may encounter while the internet is off.

From there connectivity was simple. For my Google Home WiFi I’ve connected that via ethernet to the WAN2/LAN2 port with a different subnet to the rest of the house. I picked a 172.16.0.0 subnet for the Guest WiFi as I intend to use a 10.0.0.0 network in the home. Nothing wrong with 192.0.0.1 subnets but 10.0.0.0 networks are easier to type, remember and have a greater range of available addresses (as if I’d ever use them all).

You’ll see below that there’s no requirement for VLAN tagging at this point. The reason being as this is a physical port connected to the USG. As my other networks will be operating over 1 shared ethernet connection (they’ll be sharing LAN1 port) and so VLAN would be needed to segment those correctly.

Controller Settings for USG Guest Network

From here we can configure additional settings in the Google WiFi Android app. Google WiFi can and likes to operate as a router unto itself which you’ll have to switch off, the downside of this is that you’ll lose some of the advanced features that the WiFi has to offer but I was fine with that managing my settings through the USG.

Google WiFi App
Google WiFi App

Whilst some settings had been lost such as family control and splitting the AP into different subnets directly on the device itself I’ve still retained a few of the nice features with Google WiFi. The speed tests can be run, remote access to see who’s on the network and what is consuming the resources are all handy little tools in case the Unifi software goes wrong. You’ll also note that the USG isn’t aware that this is an access point (something you’d get with an Unifi AP). That loss of functionality is fine with me as it’s still available in the app and I can see who the clients are by IP, and MAC within the controller software.

One final point on the use of Google WiFi over the Ubiquiti Unifi offering was simply down to what equiptment I already had. The Google WiFi has been excellent for such a small smart looking device and the range, plus the 5 GHz & 2.4 GHz connectivity and switching has been excellent. However I have lost all the nice functionality that comes with Unifi Access Points and I may switch my homelab network over to it in the future.

Homelab – Inception

What is a homelab?

In short a homelab is a way to play around with old enterprise server equipment in the home.

It’s puzzling in this day and age why anyone would want to spend any hard earned money on older server enterprise hardware and give it a new lease of life in a home environment where it mostly acts as a space heater or even worse a space heater that generates enough noise that you can hear 2 rooms away…

A growing number of tech-savvy people world over will run their own home lab projects with each doing so for their own reasons be it a learning platform, charity, fun, hobby or all of the above. In an age of cloud services, and ever higher electricty bills it can be hard from the outside to see the appeal yet after only 8 months of running my homelab I find myself drawn to spending time building on it and coming up with new and inventive ways of getting the most out of what I’ve got

See now here’s the catch I’m a software developer by trade for a mid sized business in the UK. I work hard day to day developing for my work and while I learn alot from my time in the office there’s knowledge and expierence that I’ve gathered only through my time spent working on servers, hardware and software that’s outside of my comfort zone. Much of that expertise was never gathered in the workplace, in fact the whole reason I got into development was because I ran my own Battlefield 2 servers and php websites back in the day.

Grind can be key to developer burnout, focusing just on the latest and greatest products coming from Silicone Valley can be difficult and the noise of that work is admittedly hard to focus your downtime on. One way I find of testing new products and services on offer is through a homelab environment. If you’re learning as part of a hobby what’s there to stop you right?

Another way to draw expierence from running a homelab is that I’ve got the opportunity to test, experiment and play without the red-tape of the corporate world (which rightly has to be there). I have the chance to try new things and spectacularly fail without (hopefully) the publicity of my work colleagues picking up on my failings. It’s a fantastic environment to learn and progress.

This post, in fact, this blog is intended to be my musings and scribbles about setting up my homelab the reasons for doing so and my interests in keeping it going despite what some might think that it’s a bad idea.