wiki:Preparing_a_netkit_Linux_Box_with_MORGAN_support

Using MORGAN in a virtual Lab

Install Netkit

This is trivial, follow the netkit official documentation and in a few steps you will have default Linux Boxes running

http://www.netkit.org

Kernel Compiling for Netkit

Please refers to http://minerva.netgroup.uniroma2.it/discreet/wiki/NetkitTutorial.

You have to download the kernel sources from the repository:

cd /home/utente
mkdir build-mpls
svn co https://minerva.netgroup.uniroma2.it/svn/discreet/MORGAN/trunk/linux-2.6.18.8-MPLS/ mpls-kernel
cd mpls-kernel

The kernel sources are now patched with mpls-linux sources ( http://sourceforge.net/projects/mpls-linux/ ): future implementations of MORGAN will be indipendent of this kernel patch. Now, some features of mpls-linux are still used in MORGAN code so we left in the kernel the sources of mpls-linux.

Work in progress: new version of linux kernel with MORGAN features indipendent of mpls-linux patch.

In the previous code snipped we also create our target directory: build_um Modify the Makefile to specify the UM architecture (user mode)

vi Makefile

Add the following two lines:

KBUILD_OUTPUT:=/home/utente/build-mpls
ARCH:=um

the parameter KBUILD_OUTPUT specifies the path of the build_um directory, if you like you can choose another path. Now you can configure your kernel:

cd mpls-kernel
make menuconfig

The file .config in the kernel sources is good for using MORGAN: if you want to modify it, remember to enable (static or as modules) all MPLS options and the IPsec support. The MPLS options you have to enable are the following:

Networking--->Networking options--->[M]Protocol header forging/restoring kernel APIs
Networking--->Networking options--->[M]MPLS-in-IP input support
Networking--->Networking options--->Network packet filtering--->IP: Netfilter Configuration--->[M]MPLS target support

Remember to activate the following options to activate in the kernel the feature to access files stored in the host: if you don't, the kernel probably won't be able to load its modules.

UML-specific options---><*>Host filesystem

Now we are ready to compile the sources

make

and install the modules in the correct path

make modules_install INSTALL_MOD_PATH=$NETKIT_HOME/kernel/modules ARCH=um

Now before we launch a new virtual machine we need to set up the correct links, so that a new virtual machine starts with our kernel and with the right modules:

cd $NETKIT_HOME/kernel
rm netkit-kernel
ln -s /home/utente/build-mpls/linux netkit-kernel

Now you can launch a Netkit Linux Box with the MORGAN kernel support :-)! To set up a virtual lab see at the link at the beginning of this paragraph.

Last modified 11 years ago Last modified on Dec 21, 2007, 10:14:29 AM