11 September, 2018

How to succeed with one PC

This post won’t be rocket science but rather a clever hint. First, a little prologue. These days I have got rid all of my spare PCs. One spare laptop was given to my girlfriend, the other spare was given to neighbor’s kids. This means that I have got only one PC at my place. I mean contemporary PC since I’ve got a small collection of vintage PCs. But those won’t be considered as useful PC for these days tasks.

Okay, I have one PC, and I struggled with my home network (VLANs, new L3 switch, etc.) in recent days. For those who don’t know what that situation means. It’s simple you need working internet access because you search the internet a lot and you need a host to test your configuration on. Having only one PC leads to a pretty frustrating situation. You have one NIC that is connected to your home ethernet network. The internet works, your network device’s administration environments are accessible. You create a new configuration that is naturally sandboxed on the different ethernet port. So you have to swap those cables. Good, you swap the cable and then find out that nothing works as supposed to, but you have also lost the internet and the administration access to your network devices. So you can’t check what happens. Great, isn’t it? :-)

Fortunately, one of the most convenient solutions is quite simple. We utilize our beloved VirtualBox and a USB Ethernet NIC. The obvious question is – why don’t we just plug USB NIC and use it under host OS? The answer is even more straightforward – because we don’t want to mix two network configuration under one OS. It may work well but not necessarily. Maybe someone has a simpler solution under one OS (let me know in the comments down below), but I prefer sandboxed setup.


In a nutshell, we create a new virtual machine without NIC, install OS (or run a live OS) and then attach USB NIC directly to the virtual machine. To achieve this, please follow below described steps.

1) Create a new virtual machine, choose boot disk, set CPU, memory, etc. and among these things disable all network adapters under Network tab.

2) However, USB has to be enabled.

3) Start up your machine and under Devices/USB choose your USB ethernet adapter. The device will be detached from your host OS and will be attached to the guest. Guest OS will install drivers, and after that, the network over external adapter is ready to go. Below screenshot shows live Ubuntu 18.04 pinging the gateway.

Finally, I have found this solution more practical than having two physical PCs. You do not need to jump between two keyboards, displays and mice after all.

No comments:

Post a Comment