/
Installing DANOS on Virtual Box

Installing DANOS on Virtual Box

Recent versions of Virtual Box have the networking capabilities to install and run DANOS for demonstrations and learning about the features of DANOS.

The instructions below were done on the 6.1 version of Virtual Box. Generally, the approach is the same as the libvirt and OpenStack installs where the ISO disk is attached and ‘install image’ is run on the attached virtual hard disk and then the iso is removed. The key difference is to choose the Network Adapter as virtio-net.

In this ‘How-To’ we will create a three VM virtual box environment with a DANOS router, a traffic source and a traffic sink so we can demonstrate routing and basic firewall operations.

 

Prerequisites

  1. Laptop/Desktop with sufficient memory for 8 - 12 GB of virtual machine memory and 4 to 8 vCPU. A 32GB laptop, Intel cor i7 on Windows 10 was used for this How-To but that is not the minimum.

  2. Virtual Box 6.1 or later

  3. DANOS ISO downloaded locally to where you are running Virtual Box.

  4. You may need to download a Ubuntu ISO as well if you don't already have a Linux image in your Virtual Box setup.

Use Case Environment

The use case will be three virtual machines.

  1. DANOS vRR

    1. DANOS with 4 ports, a Ubuntu vm as a traffic source and an Ubuntu vm as a traffic sink

    2. dp0p0s3 (adapter 1) - will be a dhcp Bridged Adapter so we can SSH into the vRR.

    3. dp0p0s8 (adapter 2) - 192.168.2.2/24 (intnet)

    4. dp0p0s9 (adapter 3) - 192.168.3.2/24 (intnet)

  2. VM source (works better if only one is enabled at a time)

    1. adapter 1- NAT (to get to internet for apt update / apt install )

    2. adapter 2 - 192.168.2.3/24 gateway 192.168.2.2 (intnet)

  3. VM sink (works better in only one is enabled at a time)

    1. adapter 1 - NAT (to get to internet for apt update/apt install )

    2. adapter 2 - 192.168.3.3/24 gateway 192.168.3.2 (intnet)

 

Step by step instructions

  1. Create the DANOS Image from the ISO

    1. Create a new image using the Virtual Box Manager → Machine → New

    2. Enter a name (e.g. danosVRR)

    3. Select Linux

    4. Select Debian-64

    5. Click Next

    6. Select 4096 MB of RAM and Click Next

    7. Select ‘Create a virtual hard disk now’ and Click Create

    8. Select ‘Virtual Hard Disk’, not VDI or VMDK (these may work but the DANOS image uses a fixed disk size) and Click Next

    9. Select ‘Use Fixed Size’ and Click Next

    10. Select 8.00 GB and Click Create

    11. The image should now be in your list of instances available to start

    12. You may want to set Adapter 1 Adapter-Type to Advanced → Paravirtualized Network (virtio-net) so that you avoid an error when we activate dhcp in the next section.

  2. Install the DANOS Image

    1. Start the image you just created

    2. Select as the start-up image the DANOS ISO

      1. Click on the file folder icon

      2. Click on +Add and a file browser window should pop up

      3. Navigate to the DANOS ISO and click on “Open”

      4. The ISO should be on the displayed list of options, select and click on “Choose”

      5. Click Start

    3. The virtual machine should now boot from the ISO, present a boot screen and then proceed to boot to a shell as vyatta

    4. We want to activate dhcp on the dp0p0s3 port and turn on ssh so that we can use putty or ssh to configure DANOS with copy/paste. The recommended way is to use the config cli and to choose /config/config.boot as the source of the configuration when doing install image.

    5. config set interfaces dataplane dp0p0s3 address dhcp set service ssh commit exit