Blog

Big Performance, Smaller Budget: Building Your Own 10GbE Linux Router

Written by JD Strong | November 01, 2022

A challenge faced by network engineers and enthusiasts alike: What good is a blazing-fast Internet connection if you cannot fully use it? While Internet Service Providers (ISPs) now offer 1, 10, and even 25 Gbps connections, most routers on the market cannot keep pace - immediately introducing a built-in network traffic bottleneck.

Some routers can keep up, but not for a reasonable price. Network architects and IT budget owners are left with the unpleasant task of convincing C-suite execs that it is worth paying over $100,000 for a new proprietary router. Only to be saddled with tens of thousands of dollars in annual fees for support and updates to take full advantage of advertised connection speeds.

Thankfully, there is an alternative. Open-source software-driven solutions make it possible for individuals, or IT departments, to build high-performance routers from scratch without breaking the bank. Here's what you need to know about getting big performance on a small budget - with a do-it-yourself (DIY) Linux router build.

Who is Asking?

Open-source software router builders are found in two circles: "Home Labbers" and IT Professionals. Home Labbers love experimenting with technology to enhance their home networks (or see how fast the car can go). IT professionals are looking for creative ways to stretch constrained budgets or are exhausted paying extravagant prices for routers and support. 

It is worth noting that these two groups often overlap. IT pros frequently experiment on their own time with home setups that push the edge of what technology can do and how it can improve networking. Since business obligations do not constrain them, they are free to explore creative approaches for their router environment, then take winners to the C-suite for budget wins and endorsement.

Whether through an internet search, or more direct knowledge of open-source projects, they often wind up at the doorstep of DPDK (Data Plane Development Kit) and FD.io (Fast Data Project). The next step will be to grab project code from Github and build their high-performance router. As many can attest, it is not that easy. At Netgate, we often hear these words, ”DPDK and VPP are fantastic open-source technologies, but they are far from a ready-to-use router. Free Range Routing (FRR), strongSwan for IPSec, and more still need to be integrated. Given enough time and energy on my own (or lab resources in our company), I could probably pull it off initially. Still, keeping it going is not feasible with so many projects with individual release schedules.”

The Netgate® TNSR® vRouter, specifically the TNSR Home+Lab evaluation software, lets them get their hands on a high-powered, well-documented router. With no upfront fee, they get familiar with its CLI and API to discover what works best for them - fast and accessible. You can have a 100 GbE home or lab router at your fingertips in minutes.

How to Build Your Own 10GbE Linux Router

Ready to get started? There are a couple of options.

You can spin up a no-charge 30-day TNSR instance on Amazon AWS or Microsoft Azure clouds! While you will be limited to the bandwidth of the no-charge instance, you can still get a good feel for the software interface and solution features.

If you want to prove it on your hardware, here is a quick-start guide to building your own 10GbE Linux router with TNSR.

Key Components

The first thing you need for your new router build is the right components. 

You only need to spend a little money to achieve solid performance: Some users can achieve more than 12 Mpps of packet processing using a single core on a 2.1GHz processor. You can install TNSR on Bare Metal Infrastructure (BMI), VMWare, or Kernel-based Virtual Machine (KVM); TNSR is also available pre-installed on Netgate appliances or in AWS and Azure. This guide will review a quick setup for a BMI environment and cover the components you will need to make this a success. 

Here is what we recommend for your build:

  • Processor - Almost any Intel 64-bit processor made in the last decade will work fine for your new router setup. Look for a quad-core with a 2.4 GHz or faster base clock speed, which should provide plenty of headroom for your project.
  • Memory - Use a minimum of 4GB RAM with a 1GB per core minimum, but we recommend 2GB per core for best performance. When it comes to RAM speed, the specific CPU / board you choose will determine the necessary RAM speed (and it will usually provide a range of options).
  • Storage - 20GB of storage is more than enough to support your router needs, but as the cost of storage continues to come down, it is worth opting for 40GB or more if possible, so you have room for expansion over time.
  • Network Interface Ports - We recommend provisioning at least three network interface ports, with two dedicated to TNSR and one for management. While it is possible to use only two network interface ports, having a dedicated port for management is helpful — in practice, it is like having a reliable console cable if you are in a pinch.
  • Network Interface Card (NIC) - Select a Netgate-tested NIC card, so you do not need to worry about interoperability issues.
  • TNSR Software - Different options are available depending on your use case. To build a better router in an enterprise environment, consider TNSR with TAC Pro or TAC Enterprise for commercial deployments, including 24/7 technical support.

Installation and Configuration

Once you have all the ingredients listed above, you are ready to start installation and configuration. We recommend following the steps below. If you get stuck or have questions, please don't hesitate to get in touch with us.

  1. Install TNSR Software - Typically a straightforward process, there are 17 steps listed in the instructions, and most are simple process steps. Read Step 12 (Configure network interfaces) carefully, which gives you the option to configure a Host OS interface. While you can skip this step if you are only using two network interface ports, bookmark this information about the Host OS Management Interface if you ever decide to add a third port.
  2. Initial Configuration - Change the default password once the installation is complete. Next, confirm that your interface ports are available by the TNSR data plane, then create custom interface names, so you can go back and change them later.
  3. TNSR Interfaces - Next, configure your interfaces with addresses and routing. You can also create access lists that filter inbound traffic to allow only required traffic.
  4. Network Address Translation (NAT) - Now, set global NAT options and enable NAT and NAT pools. (Pro Tip: If you change global NAT options later, you will need to disable and re-enable NAT to apply the changes.)
  5. DHCP and DNS Server - Configure TNSR to be a Dynamic Host Configuration Protocol (DHCP) server on the Local Area Network (LAN) — this allows it to hand out IP addresses and operate as a Domain Name System (DNS) server for locally connected clients 
  6. Ping - If everything above has gone according to plan, you should be able to send a ping from TNSR!
  7. Now is an excellent time to save your TNSR configuration.

And that is it — you are up and running! 

Note that the steps above provide a framework for a basic configuration. TNSR also offers VLANs, IPSec tunnels, BGP, and OSPF routing. If you are looking for more in-depth router recipe options, check out the TNSR cookbook to discover how your team can integrate these features.

Need help? The TNSR forum has you covered. From Netgate experts to experienced TNSR users, you will find a community ready and willing to answer your questions and help make your router build a success.