As an insomniac I often decide to do mad things at 4am...
This time I decided to re-architect my lab network, why do I need to be nocturnally productive. Here's a short post on what I did to do it so you can achieve the same or similar. Note this is from a twitter thread and is more as a point of reference than a full tutorial!
This may be an acute post and issue that only applies to one or two but have you got a device that has two NICs and you've wanted to configure two different networks? Yeah me too.
First you'll need to configure the host pre-boot with a DNS hostname so it's easier to find on your network. Once this is done,you can fire up your favorite network discovery tool. In my case this is the unifi dashboard, there we go it's got an icon!
Now the important part before we dive in and fuck things up, SET A STATIC IP on the device and the network side AND SET a network up for it with an associated VLAN. In unifi navigate to Settings -> Networks, then select 'Create new network' This will take you to a page that looks like this. RIGHT this is the important bit, set a VLAN that is different from your main network, and set a DIFFERENT ip range. (one would assume this is common sense) but I fucked that up the first time I did it! I'm sure there will be ways of doing it with the same range but I don't know everything ok!
Anyway onward with config, save your settings and buckle up for some ESXi fun. Set the same static IP on your esxi host as you've set within unifi. so in my case this was 10.10.20.137. Then navigate to your management interface of ESXi, in this case it's available over https. Note that when you reboot, it can take a few sec for the interface to appear so be patient. Navigate to networking then virtual switches, select add standard virtual switch. Next we're going to add a new VMKernel nic to the new switch. Call your switch whatever you want!
Over on our new VMKernel nic we're going to add a new NIC, select new port group, give it a name and select the newly created switch. Then the IMPORTANT part, give it a VLAN(the one we set earlier in Unifi)
Once this is done you should now have two interfaces on your ESXi with two different port groups do a wee reboot of your ESXi and your newly created interfaces should be up with an IP if all is working.
If you'd prefer read my musings in a twitter thread it's also here: