Using the Cisco SG300-20 Layer 3 switch in a home lab

One of the goals when building up my home lab a few years ago was to emulate a simple production environment that would give me a good platform to learn and experiment with. I’m a big fan of nested labs, and use one on my laptop often. But there are times when you need real hardware to interact with. This has come up even more than I expected, as recent trends with leveraging flash on the host have resulted in me stuffing more equipment back in the hosts for testing and product evaluations.

Networking is the other area that can be helpful to have equipment that at least tries to mimic what you’d see in a production environment. Yet the options for networking in a home lab have typically been limited for a variety of reasons.

  • The real equipment is far too expensive, or too loud for most home lab needs.
  • Searching on eBay or Craigslist for a retired production unit can be risky. Some might opt for this strategy, but this can result in a power sucking, 1U noise maker that may have some dead ports on it, or worse, bricked upon arrival.
  • Consumer switches can be disappointing. Rig up a consumer switch that is lacking in features, and port count, and be left wishing you hadn’t gone this route.

I wanted a fanless, full Layer 3 managed switch with a feature set similar to what you might find on an enterprise grade switch, but not at an enterprise grade price. I chose to go with a Cisco SG300-20. This is a 20 port, 1GbE, Layer 3 switch. With no fans, the unit draws as little as 10 watts.

    There is no need to rattle off the complete set of features of the SG300-20, but there are a few that have proven to be especially nice for use in a home lab.

    • Full Layer 3 functionality. It is not uncommon to find some lower end switch and read that it is "Layer 3" only to find out it doesn’t support Inter VLAN routing (are you listening DLink?). This switch offers all of the routing scenarios that you probably desire in a home lab. Their 300 series switch is Layer 3, while their 200 series is Layer 2.
    • LACP LAGs. Pretty handy to be able to bond links to experiment with in vSphere or hooking up an endpoint like a NAS unit. Maybe you’ve wanted to experiment with switch to switch LAGs. If so, this is a must have.
    • Spanning Tree. Why terrify yourself playing around with Spanning Tree in a production environment when you can wreak havoc on your entire network in the comfort of your own home lab?
    • ACLs. This sort of falls in the category of Spanning Tree. The only thing more embarrassing than locking yourself out of your home lab switchgear is to lock yourself out of your production switchgear. (not recommended)
    • CDP and LLDP.  Have you ever wanted to know what the functional differences were between CDP and LLDP with regards to a vSphere host? This switch can listen for both!
    • CLI and SSH access. Nice for change control and documentation.

    While it carries the Cisco brand, it does not use their operating system; IOS. But it does offer a CLI that feels similar to other units out there.

    Wiring diagram
    This is how the unit is currently arranged in my home lab. The second host is not shown for clarity, nor are the dozen or so VLANs used for segmenting traffic.


    What it looks like
    Courtesy of my $20 rack at Lowe’s and some bracket fabrication, I was able to mount up the unit on the underbelly of the top shelf. This keeps the airflow around the unit good (a requirement), and overall a pretty tidy look in a 2 host environment. Although, I may have to figure out something slightly different if I add another host.


    The photo might make the entire setup look big, but in reality, it stands only 30" high.

    Room for improvement
    Taking an honest look at the unit, there are a few annoyances that bother me.

    • Goofy port numbering. On ports 1 through 16, they are numbers left to right, top to bottom. On ports 18 through 20, they go top to bottom, left to right. This is partially due to the mini-GBIC ports on the right hand side. But how about we just stick to one way of ordering them.
    • Port count. This isn’t the unit’s fault. It’s just that Ethernet ports get used up pretty fast especially when each vSphere host uses 6 ports (not including IPMI).  20 ports sounds like plenty, but free ports can vanish quickly when counting uplinks, IPMI, storage, and other devices.
    • Still a bit pricey.
      The SG300-20 will not be the most affordable option for a home lab, but its feature-set pays off, and has been rock solid in my lab environment. In fact, you can find this family of switches in small businesses everywhere. I have no regrets investing a few extra bucks in a decent switch, and will probably be adding another one when the time comes to add a third host or more toys.

    – Pete

    9 thoughts on “Using the Cisco SG300-20 Layer 3 switch in a home lab”

    1. Hi Pete !!

      I am in the beginning stages of setting up my lab. I went out and bought the same cisco switch. I have a asus wifi router as well. I currently have it setup to come out of the router into one of the cisco ports. I have all my other wired devices throughout the house going to the cisco as well. It looks like DHCP is running on the router and giving out IP’s to all my devices. My question is… this how it is supposed to be? Or should I be putting the switch in layer 3 mode and handling DHCP services on the switch itself. I ultimately want to setup separate vlans.

      1. Hi Nate,

        Congratulations on your purchase, and on getting started on a home lab. Now, as for your question, the official answer is that it can be any way you want it to be. But I know that isn’t terribly helpful, so here are some thoughts.

        One of the very first steps you should do it put it in layer 3 mode. That will allow you do build out your entire homelab, with multiple VLANs, and have the routing going through the Cisco instead up any uplink. But before you actually do that, I’d suggest you plan out your IP and VLAN strategy. Something like say, make your vSphere Management on VLAN 10, then have that on a subnet of /24. Have your VM network on VLAN 11, then have a subnet of /24, etc. Once you plan that out, you can then determine which networks need routing, then create the static routes on the Cisco.

        Next up is that you will need to decide on how you want the Cisco to uplink to your Asus. You want to configure your Cisco with a network that will interface with the Asus, then provide the routing information on the Cisco so that traffic knows what to use to get out (e.g. the default gateway). Typically the most difficult part is on the Asus, or any consumer based wifi/router is entering static routes. Why? …Because they often won’t let you. That is why you need to break it with something like DD-WRT or Tomatoe, then establish the routes that way.

        As for DHCP, with the exception of the leg that you will use for your laptops and devices, it really isn’t necessary to provide DHCP services on the Cisco (you can let DHCP do it’s thing on the Asus for your laptops and devices). You might have a VM in your lab that will be running DHCP services, and at most, you may need to tweak the Cisco to allow DHCP to pass through one or more routes established on the Cisco. Purely optional though.

        Thanks for reading Nate! By the way, voting is open right now best virtualization blogs out at If you found my site helpful, feel free to throw in a vote for me. (you’ll find me on the list). Now if you didn’t find it helpful, don’t tell me. 

        Good luck!

    2. Thanks for the write up Pete.

      In the early stages of planning and purchasing hardware for my vSphere lab at home. Just started a job where VMWARE is being utilized in a huge way, so I want to be more educated about it. What better way than at your own home lab :).

      I was researching the smart switches with Layer 3 capabilities for home lab and found your site.

      You convinced me to go 20 port route rather than 10. I told myself that I will start small, but knowing that eventually I will regret if I don’t get the extra ports now.

      Just picked up a used PowerEdge 2950 with 32GB ram and 4x72GB HDD’s (I scored this one at $290 shipped). Little bit on the loud side, but for now I sacrificed the ears for savings in $$. Planning on starting with a single host, than later moving in to 2 host setup as $$ allows.

      I will most likely end up building out 2 quiet/energy efficient ESXI hosts down the road as I get more comfortable with the whole thing.

      Thanks for taking the time to document your progress. I hope to keep coming back to read more info from you.

    Leave a Reply

    Fill in your details below or click an icon to log in: Logo

    You are commenting using your account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )

    Connecting to %s

    %d bloggers like this: