This simple tutorial shows how to run the BIRD Internet Routing Daemon under Mininet. The tutorial focuses on a forked version of BIRD (available here), which implements the SS-BGP routing protocol. It does not aim to be a complete guide on how to use BIRD or Mininet. The main goal is to have a step by step guide on how to have BIRD running under a virtual network (Mininet).
Mininet can be installed natively on a linux machine. However, this is not the recommended installation method. As described in Mininet's official documentation, the easiest way to install Mininet is by downloading Mininet's VM image and run it under some virtualization system. We are going to follow this method here.
Follow these steps to install the VM:
-
Download the Mininet VM image.
-
Unzip the VM image. Make sure it created a directory called mininet-version with two files with extensions
.ovf
and.vdmk
. -
Download VirtualBox and install it. Mininet's official documentation recommends VirtualBox because it is free and works on most operating systems, including Linux, Windows, and MacOS. Still, you can use any virtualization system you want.
-
Create the VM from the image downloaded before.
- Open VirtualBox and go to Machine -> New.
- Give a name to the VM (any name you want).
- Set the Type to Linux.
- Set the Version to Ubuntu (64-bit).
- Click Next.
- Click Next again (leave the memory size at the default value).
- Select option Use an existing virtual hard disk file.
- Click on the browse button on the right of the combo box. It will open up a choose dialog to choose the VM image.
- Go to the directory containing the VM image and select the file with extension
.vmdk
. - Finally click Create. The VM is now created and should show up in VirtualBox's main window with the name you gave it.
-
Enable SSH access to the newly created VM
- Go to Machine -> Settings, while keeping the VM selected.
- Under Settings go to Network, click on the Advanced toggle, and click on Port Forwarding.
- Click on the add button to the right. It will create an entry on the forwarding table.
- Fill each column as follows. Then click OK.
Name | Protocol | Host IP | Host Port | Guest IP | Guest Port |
---|---|---|---|---|---|
SSH | TCP | 0.0.0.0 | 5022 | 0.0.0.0 | 22 |
- Finally, start the VM.
At this point the VM should be booting. Once the VM has booted we can access to it using any SSH client. Use the following parameters to connect to the VM.
- IP address: localhost or 127.0.0.1
- Port: 5022
- Username: mininet
- Password: mininet
At this point you should have an SSH connection to the VM with mininet already pre-installed. Next step is to install BIRD.
Having an SSH connection to the Mininet's VM follow these steps to install BIRD with support for SS-BGP:
-
Clone the project.
git clone https://github.com/ssbgp/bird.git
-
Move to project's directory.
cd bird/
-
Install dependencies.
sudo apt-get install bison m4 flex libncurses-dev libreadline6 libreadline6-dev
-
Compile and install BIRD.
autoreconf ./configure make sudo make install
BIRD should now be installed. Enter this command to check: bird --version
. It should show you a message like this "BIRD version 1.6.3" if BIRD was correctly installed.
Here we will use a simple network with a loop, illustrated below.
IMAGE HERE
Each node in the network is a router running a different instance of BIRD with different configurations. To illustrate the features of SS-BGP, we configured the routing policies at each node to induce permanent oscillations.
Note |
---|
Our goal here is not to show how to use Mininet or how to configure BIRD. To learn about how to create a virtual network in Mininet you should read sections "Sample Workflow" and "Walkthrough" from Mininet's official documentation. To learn about how to configure and use BIRD you should read BIRD's official documentation. |
Directory 'ex-oscillating-loop' already includes everything setup according to the previous specifications. All we have to do is copy it into the VM and run mininet.
-
Go to the terminal with the SSH connection to the VM.
-
Make sure the current directory is the home directory.
cd ~
-
Copy our setup to the VM. The best way to do this, is cloning this repository on the VM and extracting the setup directory from it, using the following steps.
-
Clone this repository in the VM.
git clone https://github.com/ssbgp/bird-mininet.git
-
Extract the setup directory.
mv bird-mininet/ex-oscillating-loop ~/
-
Remove the cloned project, since it is no longer necessary.
rm -rf bird-mininet/
-
-
Go the setup directory.
cd ex-oscillating-loop/
-
Run mininet.
sudo python init_mininet.py
At this point the virtual network was created and all nodes should be running BIRD.