VyOS with ESXI 6.7

From ppwiki
Jump to navigation Jump to search

Prerequisites

To complete this tutorial, we will need:

  • 1 node running ESXI. This tutorial is done on a node running EXSI 6.7
  • 1 VM running the VyOS
  • 4 testing VM's on separate VLAN's

Objective

Our Goal is to be able to create the network in the image below. Note that we are not going to discuss about how to use ESXI in this tutorial but we will be more focus on VyOS and how to use it to connect to the vswitches on the ESXI node.

Vyos1.png

Creating VSwitches and port groups on the EXSI server=

The Vswitch0 is already create and has two port groups already: "VM Network" and "Mangement Network" so we are not going to worry about this.

Create VSwtich

In this section, we will be creating 4 Vswithes called:

- asw-a-codfw

- asw-b-codfw

- asw-c-codfw

- asw-d-codfw

Do not assign any up-links to the Vswitches. Like a mentioned above we are not going to discuss how to create Vswithes in this tutorial. After you have created the 4 Vswitches above, the next step will be to create the port groups in the nest section.

Create Port groups

create 4 port groups like in the table below.

Port Groups
Port name vlan vswitch
private1-a-codfw 20 asw-a-codfw
private1-b-codfw 30 asw-b-codfw
private1-c-codfw 40 asw-c-codfw
private1-d-codfw 50 asw-d-codfw

VyOS installation and configuration

Installation

The installation of VyOS is simple and easy. It is done like a regular VM installation on ESXI.

  • First : create a VM with

- Name:vrouter4001 ( You can use any name)

- 1024MB of RAM

- 1 CPU

- 40GB of Disk

- 5 Network Interfaces

Network Interfaces and port groups
NIC Port Group
eth0 VM Network
eth1 private1-a-codfw
eth2 private1-b-codfw
eth3 private1-c-codfw
eth4 private1-d-codfw
  • Second: Download the iso image

The Link to download the iso is: https://downloads.vyos.io/?dir=release/legacy/1.1.8

Download the vyos-1.1.8-amd64.iso version

  • Third: attache the iso to your VM and boot the VM

After booting the VM, you will see the login prompt like in the image below

Vyos2.png

The default login username is vyos and the password is vyos too.

Once login, run the command

show interfaces

to make sure you have all the 5 interfaces. The output should look the same like in the image below

Vyos3.png

If you have all the five interfaces, proceed to the installation by running the command

install image

Follow the instructions on the screen bu just pressing enter and answering "YES" to all the question to use the default settings. Don't forget to enter a new password for login to replace the defaut password "vyos"

Once the installation completed, power off the VM, detach the iso image from the VM and power backup the VM and proceed to the configuration.

Configuration

Setting IP addresses and description

eth0

configuration
set interfaces ethernet eth0 address 10.192.0.53/24
set interfaces ethernet eth0 description core_to_cr-gcsm

eth1

set interfaces ethernet eth1 address 10.192.16.1/22
set interfaces ethernet eth1 description private1-a-dfw

eth2

set interfaces ethernet eth2 address 10.192.32.1/22
set interfaces ethernet eth2 description private1-b-dfw

eth3

set interfaces ethernet eth3 address 10.192.48.1/22
set interfaces ethernet eth3 description private1-c-dfw

eth4

set interfaces ethernet eth4 address 10.192.64.1/22
set interfaces ethernet eth4 description private1-d-dfw

commit
save

Note: if you do not "save", after a reboot all the configuration will go away.

check the configuration with "show interfaces"

vyos@vyos:~$ show interfaces 
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             10.192.0.53/24                    u/u  core_to_cr-gcsm 
eth1             10.192.144.1/22                   u/u  private1-a-dfw 
eth2             10.192.160.1/22                   u/u  private1-b-dfw 
eth3             10.192.176.1/22                   u/u  private1-c-dfw 
eth4             10.192.192.1/22                   u/u  private1-d-dfw 
lo               127.0.0.1/8                       u/u  
                ::1/128

Go back in configuration mode and change the router name from vyos to vrouter4001 ( you can call it anything)

set system host-name vrouter4001
commit
save
vyos@vrouter4001:~$

Setting default gateway

If we do not define the default gateway, all the VM's will not be able to access the internet. 

Setting OSPF

Setting DHCP relay

Enable SSH on port 22 with ssh key