Project: High-performance virtualized software router

Feb 27
by
gigabyte_device

There are many options for internet use of LAN speeds of 1, 2.5, 5, or even 10 Gbps with optics development. The problem is that old network equipment doesn’t support those speeds. For example, there is no point in having 1gbps optical Internet if the local network still uses 100 megabit switches, network cables, and network cards in the computer or laptop. WiFi also doesn’t mean anything here because 802.11b/g/n reaches a maximum of 100 Mbps. 5GHz (802.11a/ac/ax) variants can help up to 600mbps. One of the options is router virtualization.

The entire network needs an upgrade with Cat6 cables, Gigabit switches, and WiFi6 (802.11ax). With that upgrade, you can use the advantages of the optical Internet. With this upgrade, there is a chance of using what you paid. Of course, if I limit myself to bandwidth, optics has other important advantages.

The provider provides an ONT router, which can usually achieve the transmission of data leased by the packet. The router comes with an integrated gigabyte switch and WiFi 802.11ac. This device can provide several hundred Mbps wirelessly (from a few meters away).

If we exclude the price of equipment intended for large companies, the possibilities for setting up your router to achieve sufficiently high performance are pretty small today. For example, Mikrotik routers cost $ 500 + (CCR), while for the Internet, up to 1gbps can also be used, as can RB5009 ($ 250). Relying on a provider router is not a good idea if you want to keep your network under your control. Besides the potential security issue, there are not enough open options on the provider’s router for your settings.

Mikrotik router hosted as a virtual instance

The idea is to make a Mikrotik router that would be hosted as a virtual instance (CHR) on the x64 platform. It is a significantly more powerful processor than ARM in RouterBoard devices.

Creating a computer that can host a VM at the lowest possible price and has the newest (most modern) components is challenging. As a solution, I found a MiniPC Gigabyte GB BKi3HA 8130 for $200 on the dealer site. I added another $50 for SSD and RAM and $20 for a USB gigabit card. I completed the hardware with an i3-8130u processor, 8GB of RAM, 120GB of SSD, and two-gigabit network cards that consume several tens of watts of power.

The system preparation is done through the PiKVM project. PiKVM allows me to access the HDMI port via the IP network, transfer the keyboard and mouse, and emulate the flash with the system’s installation.

Proxmox

Proxmox is a hypervisor for this project. It is an open-source hypervisor operating system similar to VMware ESXi with VMSphere functionality based on the KVM hypervisor.

Router virtualization is set up for several reasons. As the first reason, Mikrotik CHR does not have drivers for native hardware use but relies on generic drivers. Hypervisor solves this problem by providing a generic VM network card, and the card driver solves the Linux kernel. The second reason is that I assumed that the CHR router may not need all the resources and that I would be able to use some resources for other VMs.

Mikrotik CHR

Mikrotik CHR is not a free software solution. A license for up to 1gbps costs $ 45 and up to 10gbps $ 95. I received licenses at Mikrotik conferences and other contributions, so I did not have this expense.

I concluded that by booting Mikrotik CHR under this MiniPC for a full 1gbps (as much as my current Internet capacity), only one CPU core (out of 4) is enough, and 256Mb of RAM. An internal loopback bandwidth test showed a processing capacity of about 25gbps (TCP stack processing only).

By adding a manageable switch (in my case, the Mikrotik router, which I changed with this device), I got the extension of one interface to five others via VLANs. With that implementation, there is no problem that the CHR has only two physical interfaces.

The provider’s router has been switched to Bridge mode, and its internet WiFi has been turned off. The CHR now obtains a public IP address via the provider’s bridged device directly from the provider. CHR manages WiFi interfaces on other Microtiks in the apartment via CAPsMAN. Earlier, I added one WiFi6 Xiaomi AP that is connected to CHR via VLAN.

With this router virtualization project, I gained complete control over my network and isolation from the provider’s equipment. I may upgrade to higher-speed packages in the future. I expect that the investment in software router virtualization will pay off in the future. Only a fraction of the resources are used for this CHR project, and most of it remains for other projects.

I’m Milena

I'm thrilled to have you here.
This blog is dedicated to technology, freelancing, and travel. 🧑‍💻 🌍
As a passionate freelancer, I find life's joy in exploring the majestic beauty of nature and learning new technology stuff. I believe that knowledge is crucial for our personal and professional growth, and I'm excited to share what I've seen and learned with you. 🤓
3D Printing
Previous Story

3D Printing Terminology For Beginners

Payneer Capital Advance Offer
Next Story

What is Capital Advance Offer, and how to get it?

Don't Miss