VyOS Router Installation and Configuration Tutorial

NetApp VyOS Router Install and Configuration

This NetApp training tutorial explains how to install and configure the VyOS virtual router in VMware Workstation. The networks and IP addresses configured in the tutorial are for my NetApp lab, but you can easily adapt them to any project you’re working on. Scroll down for the step by step video and also text tutorial.

The VyOS router enables connectivity between the hosts and storage which are in different IP subnets in our lab, just like they’d be in a real world environment.

This is the third in a series of NetApp training videos which accompany my ‘How to Build a NetApp ONTAP 9 Lab… for Free‘ eBook. The videos show me following along with the step by step instructions in the book as I build the lab on my laptop.

You can download the eBook here.

And you can get the entire video series here.

VyOS Router Installation and Configuration  – Video Tutorial

YouTube video

Rodney Banipal

Rodney Banipal

I am happy to say that I have passed the NetApp NCDA exam. Your video course was very informative to understand how NetApp works. I have practiced a lot in my lab and that led me to get a NetApp job. Without your course I would not be here so a big thank you goes to you. I could not have done it without your course.

Rodney Banipal

The steps to build the router are:

  • Download the free version of the VyOS virtual router.
  • Create a new virtual machine in VMware to install it into.
  • Add extra network interfaces in VMware.
  • Assign the interfaces to the correct VMnet networks.
  • Install the VyOS image on the virtual hard drive so that you can save your configuration (it boots from virtual CD by default.)
  • Configure VMware to boot from the virtual disk.
  • Configure the interface IP addresses in VyOS.
  • Enable SSH management access so that you can connect to the router from Putty.

Here's the full step by step instructions:

  1. Open the VyOS webpage at https://wiki.vyos.net/wiki/Main_Page in your browser
  2. In the Get the Software section, click on the link to download the 64-bit image

  1. After the file has completed downloading, open Windows Explorer and browse to the folder you created earlier on your laptop named NetApp Lab.
  2. In the NetApp Lab folder, make a subfolder named VyOS. We will create the VyOS Router in here.
  3. Find the VyOS Router ISO file you downloaded and move it into the VyOS folder. It will have a name similar to vyos-1.1.8-amd64.iso
  4. Open VMware Workstation Player
  5. Click Create a New Virtual Machine

Create a New Virtual Machine

  1. Select Installer disc image file (iso): and Browse to the VyOS router ISO file in the VyOS folder.

Create a New Virtual Machine 1

  1. Name the virtual machine VyOS and save it in the NetApp Lab\VyOS folder

Create a New Virtual Machine 2

  1. Select the option to Store Virtual Disk as a single file and click Next.

Create a New Virtual Machine 3

  1. Uncheck the option to Power on this virtual machine after creation and click Finish

Create a New Virtual Machine 4

  1. Click Edit Virtual Machine Settings

Virtual Machine Settings

  1. We need to add Network Adapters for the lab IP networks. Click on the Add button and choose Network Adapter then click Finish

Virtual Machine Settings 1

  1. This will add Network Adapter 2. Repeat 5 more times to add Network Adapters 3 to 7. Your virtual machine settings should look similar to below. The network adapters may be listed in a non-sequential order. Click OK.

Virtual Machine Settings 2

  1. Click Edit Virtual Machine Settings again.

Virtual Machine Settings 3

  1. The network adapters should now be listed in sequential order.

Virtual Machine Settings 4

  1. Configure the network adapters according to the table below. To do this, select the network adapter then click ‘Custom’ and assign the correct network. Note the last two networks are VMnet 7 and 9, not 6 and 7.
Adapter Custom: Specific virtual network
1 VMnet1
2 VMnet2
3 VMnet3
4 VMnet4
5 VMnet5
6 VMnet7
7 VMnet9
  1. Click Player > Manage > Virtual Machine Settings… again to verify your settings are the same as shown below. Make sure each adapter has the correct VMnet setting. Click OK to close the Settings window.

Virtual Machine Settings 5

  1. Click Play Virtual Machine to power on the router
  2. Click Remind Me Later if prompted to download VMware Tools

Software Updates

  1. When the router boots up, click inside the virtual machine window with your mouse to make your keyboard active for the virtual machine. (Note that you need to press the Ctrl and Alt keys simultaneously to release the mouse when you want to return to your desktop.)
  2. Log in with username vyos and password vyos
  3. The router is currently booting from the CD image, we need to install onto the virtual hard drive. Enter the command install image
  4. Type Yes when prompted to continue
  5. Hit the Enter key to accept the default Auto partition

Software Updates 1

  1. Hit the Enter key again to accept the default and install on sda
  2. Type Yes to continue

Software Updates 2

  1. Hit the Enter key again to accept the default and create the maximum root partition size
  2. Hit the Enter key again to accept the default image name

Software Updates 3

  1. Hit the Enter key again to accept the default and copy the /config/config.boot configuration file
  2. Enter and confirm the password Flackbox1 for the vyos admin user

Software Updates 4

  1. Hit the Enter key to accept the default and modify the boot partition on sda
  2. Type poweroff to shut down the system and yes when prompted to confirm

Software Updates 5

  1. When the virtual machine has completed its shutdown, reopen VMware Workstation Player, select the VyOS image and click Edit Virtual Machine Settings

VyOS - Virtual Machine Settings

  1. We now need to configure the router to boot from its hard disk rather than the CD. This will allow us to make a permanent configuration which will survive reboots.
  2. Click on CD/DVD (IDE), uncheck Connect at power on and select Use physical drive

VyOS - Virtual Machine Settings 1

  1. Click OK and then Play virtual machine
  2. When the router boots up, login with the username vyos and password Flackbox1
  3. Enter the command configure to enter configuration mode
  4. Configure the eth0 network interface with the command set interfaces ethernet eth0 address 172.23.1.254/24
  5. Repeat for the other interfaces according to the table below. Note the IP addresses for the last two interfaces are non-sequential. Be careful to configure the interfaces exactly as shown.
Interface IP Address
eth1 172.23.2.254/24
eth2 172.23.3.254/24
eth3 172.23.4.254/24
eth4 172.23.5.254/24
eth5 172.23.7.254/24
eth6 172.23.9.254/24

VyOS - Virtual Machine Settings 2

  1. Enter the commands set service ssh and set service ssh allow-root to enable SSH access.

VyOS - Virtual Machine Settings 3

  1. Enter the command commit to activate your changes.
  2. Enter the command save to make your changes persistent over a reboot.

VyOS - Virtual Machine Settings 4

  1. Hold down the Ctrl and Alt keys simultaneously to exit the virtual machine interface.
  2. Open a command prompt on your laptop by clicking the Windows button and then type cmd in the search box.

VyOS - Virtual Machine Settings 5

  1. Enter the command ping 172.23.1.254 to verify connectivity between your laptop and the VyOS router. If the ping fails then you have made a misconfiguration, start the lab setup again from Step 15 in the VMware Workstation Player Install section, being careful to configure everything exactly as shown.

VyOS - Virtual Machine Settings 6

 

  1. In VMware Workstation Player, click Player > Power > Suspend Guest to suspend the virtual machine. This will allow you to start it more quickly and reliably when you are ready to work with the lab than if you shut it down.

VyOS - Virtual Machine Settings 7

  1. Click Yes when asked to confirm.

VyOS - Virtual Machine Settings 8

  1. Optional step: If you are using VMware Workstation Pro this is a good time to take a snapshot of the virtual machine.
  2. Installation of the VyOS router is now complete. To start the VyOS virtual machine later, browse to the ‘NetApp Lab\VyOS’ folder and run the ‘VyOS.vmx’ file.

Do not forget to start the VyOS router for all lab exercises as it is essential for connectivity.

VyOS - Virtual Machine Settings 9

 

Want to practice on your laptop for free? Download my free step-by-step guide 'How to Build a NetApp ONTAP Lab for Free'

 

Click Here to get my 'NetApp ONTAP 9 Storage Complete' training course.

Kashif Ali

Kashif Ali

I have never seen any training course in Netapp the way Neil conducted this and the way he breaks down every concept is like watching a movie…I am feeling so motivated and pumped up to retain all this knowledge…thank you!

Kashif Ali