How to install VyOS Router/Appliance on Hyper-V – Part 1: Setup and Install

//
//
Greetings everyone,

on today’s post I will walk you through the process of installing and configuring VyOS on Hyper-V, but first I need to talk about the predecessor Vyatta.

Vyatta was an Open Source software based on Linux for vRouter, Firewall, VPN and IPv4/IPv6 protocols, had a similar interface to JUNOS and Cisco IOS. On their portfolio there was Physical and Virtual Appliances but you were able to run it on your own HW with two flavors, Vyatta Subscription Edition and the Free version, both could have been installed on x86 hw or VM’s on Hyper-V, VMWare, Citrix XenServer, Open Source Xen and Virtualbox.

Simple statement: Vyatta Linux Open Source SW is a dead project after they became part of Brocade, see the whole history on wikipedia: http://en.wikipedia.org/wiki/Vyatta

Some people called this a catastrophe and the community mobilized for a forked version named VyOS, which has pretty much the same interface and functionality, it’s Open Source and Free.

I’ve used Vyatta on my Lab environments for a long time and already Blogged about it, so it was about time for a replacement with VyOS.

I will provide you the details about how to setup and configure VyOS router on Hyper-V with two separate posts.

On the first post “How to install VyOS Router/Appliance on Hyper-V – Part 1: Setup and Install” I will cover the following:

– Introduction: My LAB environment
– Phase 1: Download VyOS and prepare a VM to run VyOS router
– Phase 2: Install VyOS on a VM

On the second post “How to install VyOS Router/Appliance on Hyper-V – Part 2: Configuration” I will help you understand how to configure your network and provide some network services (NAT, DNS, Proxy).

– Phase 3: Configure VyOS Router
– Phase 4: Configure VyOS Network Services

 

Introduction: My LAB environment

Brief introduction of my lab environment:

– Running Windows 8.1 RTM Hyper-V Host;
– Running several Windows and Linux VM’s;
– VyOS router is:

  1. Running on a VM;
  2. Has 3 network interfaces;
  3. Configured for 3 network segments (internal, extranet – dmz, external);
  4. Provides NAT for Internal network, Proxy Server for Extranet network;

– VyOS Router configuration details:

Intranet interface: eht0
IP/mask: 10.0.0.254/24

External interface: eth1
IP/mask: 192.168.1.254/24

Extranet interface: eth2
IP/mask: 172.0.0.0/24

Default gateway: 192.168.1.1 (3G ISP Router IP Address)

NAT: Mask 10.0.0.0/24 through eth1

– Hyper-V Virtual Switch are configured as follow:

V-Switch 1: Name: “Internal” –> Internal Only
V-Switch 2: Name: “External” –> External –> Intel Wifi Ntwk Adapter –> Allow Mgmt OS to share the network adapter
V-Switch 3: Name: “Extranet – DMZ” –> Internal Only

Here is a print screen of the Hyper-V Virtual Switch configuration

hyper-v_virtual_switch

Here is a Visio Diagram of my Lab Setup:

VyOS

Phase 1: Download VyOS and prepare a VM to run VyOS router

1. Download Virtualization ISO: http://mirror.zenflow.net/vyos//iso/release/

//

e.g. for the version – “vyos-1.0.3-amd64.iso”:
Physical/virtual 64-bit ISO VyOS 1.0.3 (Hydrogen)
Size: 223MB

2. On Hyper-V Manager we will create 3 Virtual Switchs (“Internal Network”, “External Network” and “Extranet – DMZ”)

On the right-pane “Actions” menu click “Virtual Switch Manager

Select the Virtual Switch type “Internal” and click the button “Create Virtual Switch

Type the name “Internal” (or any other you prefer) and click “OK”

Click again on the “Virtual Switch Manager

Select the Virtual Switch type “External” and click the button “Create Virtual Switch

Type the name “External”, on the External Network option select your appropriate Network interface (LAN or WIFI), leave the rest with the defaults and click “OK

At last Click on the “Virtual Switch Manager

Select the Virtual Switch type “Internal” and click the button “Create Virtual Switch

Type the name “Extranet – DMZ” and click the button “Create Virtual Switch

3. On the Hyper-V Manager we will create the VyOS VM

On the right-pane Actions menu Click “New” –>Virtual Machine

On the New Virtual Machine Wizard –> Next

Define the Machine Machine Name “VyOS” and the desired location of the Virtual Machine configuration files

If your are running a Windows 8.1 or Windows Server 2012 R2 host Select the Virtual Machine “Generation 1

Set the Memory size “512” MB (should be enough, if you need intensive network usage consider more memory)

Select the “Intranet” Virtual Switch Network, we will add the other Network interfaces later

Create a Virtual Hard Disk (default: differential) with no more than “5GB” (depending on your needs, such as logging)

Select “Install Operating System from a Boot CD/DVD” and Select the VyOS “image file (ISO)”

Review the VM configuration ao click “Finish” to complete the VM creation

Right-click on the new VyOS VM and select “Settings

On the VyOS VM properties on the “Add Hardware” section select “Network adapter” and click “Add

Select the Virtual Switch “External“, keep the defaults and select “OK

Repeat the process and right-click on the new VyOS VM and select “Settings

On the VyOS VM properties on the “Add Hardware” section select “Network adapter” and click “Add

Select the Virtual Switch “Extranet – DMZ“, keep the defaults and select “OK”

You should end up with this configuration:

VyOS_vm_cfg

 

Phase 2: Install VyOS on a VM

1. Start the VM

VyOS_boot

2. Login to VyOS

VyOS login: vyos
VyOS password: vyos

3. Start the the VyOS image installation

Install image

4. Define the following installation settings:

Would you like to continue? Yes
Mirror Raid-1 (sda and sdb)? No
Partition (Auto/Parted/Skip): Auto
Install the image on? Sda
Continue? Yes
How big of a root partition should I create? 5368MB (your HDD full size)
What would you like to name this image? 1.0.3
Which one should I create to sda? /config/config.boot
Enter password for user ‘vyos’: define a new password
Which drive should GRUB modify the boot partition on? Sda

5. When finished validate your installation by running:

show version

Confirm the following details on the output:

Version: VyOS 1.0.3
Description: VyOS (hydrogen)
System type: x86 64-bit
Boot via: Livecd
(next boot without the Live CD it will show ‘image’)
Hypervisor: Microsoft HyperV
HW model: Virtual machine

6. Shutdown the VyOS Live installation process:

poweroff

7. Eject the CD from the VM to boot from the HDD next time

 

This completes the first part of “How to install VyOS Router/Appliance on Hyper-V” with the installation process. You can access the Part 2 for the configuration process on “How to install VyOS router on Hyper-V – Part 2: Configuration”.

R-Tape Loading error,
Luís Rato
//
//

Anúncios

~ por Luis Rato em 17 de Junho de 2014.

Deixe uma Resposta

Preencha os seus detalhes abaixo ou clique num ícone para iniciar sessão:

Logótipo da WordPress.com

Está a comentar usando a sua conta WordPress.com Terminar Sessão / Alterar )

Imagem do Twitter

Está a comentar usando a sua conta Twitter Terminar Sessão / Alterar )

Facebook photo

Está a comentar usando a sua conta Facebook Terminar Sessão / Alterar )

Google+ photo

Está a comentar usando a sua conta Google+ Terminar Sessão / Alterar )

Connecting to %s

 
%d bloggers like this: