Implementing this solution requires three routers:
- A primary that will serve as the actual Internet-facing router
- A secondary that performs 1:1 NAT for your Verizon router
- The Verizon router itself
The first two routers we will deploy as VMs running VyOS. You can download the latest version from the VyOS site; using the distribution that is geared toward virtualization is best since it bundles the VMXNET 3 virtual NIC drivers right into the ISO.
Create Virtual Machines
Let’s create two new VMs. For the purposes of this exercise they will be named primary-router and secondary-router.
Decide on the resources you’d like to dedicate to these routers. In my case, I went with 128 MB of RAM and 1 vCPU for each. A couple of gigabytes for their virtual disks should be more that sufficient unless you plan on doing a lot of packet captures or keeping very verbose logs. As for vNICs, you will need two for each instance. The primary router will need its vNICs attached to these port groups:
- FiOS Public Network
- Home Network
The secondary router will need vNICs attached to these port groups:
- Home Network
- Verizon Router Network
Use VMXNET 3 for all adapters; this is the most advanced adapter available and will allow for the best performance.
Once the VMs are created, mount the VyOS installation media you downloaded before and boot the VMs from their virtual optical drives.
VyOS installation is pretty straightforward:
- Boot from installation media
- Log in (default credentials are user vyos and password vyos)
- Run install system
A wizard will walk you through the installation process.
Once finished, you can reboot (make sure you unmount the ISO from the virtual CD-ROM). The VM should boot into the VyOS installation on the VM’s local disk.
Finish this installation process for both VMs. Next we’ll discuss VyOS configuration.