-
Notifications
You must be signed in to change notification settings - Fork 142
Virtual environment creation
The VMs in RouteFlow are implemented as LXC containers in the default setup. You can use other virtualization technologies. If you have experience with or questions about setting up RouteFlow on a particular technology, contact us!
A script is provided with RouteFlow to ease the creation of these containers.
A few facts:
- The creation script is located in
rftest/create
. - It creates the containers in
/var/lib/lxc
(this is important) - The containers are created with Ubuntu 11.04 (natty)
- It works in Ubuntu 11.04 and probably Ubuntu 11.10 and later.
- The
rftest/config
directory is read to determine which containers will be created and what their content will be - The following packages are installed by default:
quagga rsyslog vlan tcpdump
libboost-thread1.42.0 libboost-system1.42.0 libboost-filesystem1.42.0 libboost-program-options1.42.0
If you need to install custom software in your container, modify the create script where indicated in it.
Each folder in the config
directory will become an LXC container. The names don't matter, but the directory structure does. It must be something like:
container/
rootfs/
...
config
fstab
The config
file is the configuration file for LXC. It's used to declare the network interfaces and point to the fstab
file and rootfs
folder. The syntax is simple, so just base your own configuration on an existing one. Make sure to adapt the paths to where the container will be, usually /var/lib/lxc/[container name]
. The same goes for the fstab
file.
In the rootfs
folder you'll find files that will be copied to the container. You'll usually need to:
- Enable IPv4 forwarding in
/etc/sysctl.conf
- Adapt
/etc/network/interfaces
to fit your needs - Configure Quagga in
/etc/quagga
- Have
/etc/rc.local
call/root/run_rfclient.sh &
in order to start RFClient on boot
If you have any doubts, try to follow what's in the default containers.
For rftest1
, the default containers are:
-
rfvm1
: represents the switch/gateway -
b1
: first host connected to the switch (172.31.1.2) -
b2
: seconf host connected to the switch (172.31.2.2)
For rftest2
, the default containers are:
-
rfvmA
: represents the switch/router A -
rfvmB
: represents the switch/router B -
rfvmC
: represents the switch/router C -
rfvmD
: represents the switch/router D
Since rftest2
is meant to run in Mininet or in a real network, the hosts are not created.
Make sure there's a config
directory with the templates at the same directory level as the script, and run:
$ sudo ./create
It will create a base container in the LXC directory (/var/lib/lxc
), and derive several other containers based on the templates.
The containers will have a default root/root
user/password combination. You should change that if you plan to deploy RouteFlow.