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
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.
Virtual Box 6.1 or later
DANOS ISO downloaded locally to where you are running Virtual Box.
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.
DANOS vRR
DANOS with 4 ports, a Ubuntu vm as a traffic source and an Ubuntu vm as a traffic sink
dp0p0s3 (adapter 1) - will be a dhcp Bridged Adapter so we can SSH into the vRR.
dp0p0s8 (adapter 2) - 192.168.2.2/24 (intnet)
dp0p0s9 (adapter 3) - 192.168.3.2/24 (intnet)
VM source (works better if only one is enabled at a time)
adapter 1- NAT (to get to internet for apt update / apt install )
adapter 2 - 192.168.2.3/24 gateway 192.168.2.2 (intnet)
VM sink (works better in only one is enabled at a time)
adapter 1 - NAT (to get to internet for apt update/apt install )
adapter 2 - 192.168.3.3/24 gateway 192.168.3.2 (intnet)
Step by step instructions
Create the DANOS Image from the ISO
Create a new image using the Virtual Box Manager → Machine → New
Enter a name (e.g. danosVRR)
Select Linux
Select Debian-64
Click Next
Select 4096 MB of RAM and Click Next
Select ‘Create a virtual hard disk now’ and Click Create
Select ‘Virtual Hard Disk’, not VDI or VMDK (these may work but the DANOS image uses a fixed disk size) and Click Next
Select ‘Use Fixed Size’ and Click Next
Select 8.00 GB and Click Create
The image should now be in your list of instances available to start
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.
Install the DANOS Image
Start the image you just created
Select as the start-up image the DANOS ISO
Click on the file folder icon
Click on +Add and a file browser window should pop up
Navigate to the DANOS ISO and click on “Open”
The ISO should be on the displayed list of options, select and click on “Choose”
Click Start
The virtual machine should now boot from the ISO, present a boot screen and then proceed to boot to a shell as vyatta
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.
config set interfaces dataplane dp0p0s3 address dhcp set service ssh commit exit