MPLS-Linux labs – 1.3 Installation

Installing the scripts.

Installing these scripts (along with the documentation) should be straight forward:

Note: The experiments were developed for mpls-linux version 1.950, so they might not work for other versions of mpls-linux! If somebody ports some/all experiments to newer versions, please release the updated scripts.

Note2: In the commands above, computer_name is the name of this computer (for example E1, A2, etc. This is because all the scripts on all the computers are bundled in the same archive, but you only need one directory per computer.

Note3: From now on, your current working directory is assumed to be /root/mpls-linux-labs_v1.950/computer_name/ and all commands are relative to this path. Again, computer_name varies from computer to computer.

Note4: In addition to these scripts, you'll also need to download 4 movie clips and save them on A3 and A1 in /home/username/media. You'll also need to modify the script (in the experiments that use it) to point to your media directory. Please note that these movie clips are optional, and you can build your own movie clips from a TV tuner or an avi file, but please keep in mind that all movie clips have a data rate of 4000kbps! If you wish to download these clips, be warned that they are about 256MB in length!

Clip A (46MB): “Discovery Channel”, 90s, 320x240, 30fps, 4000kbps, used in “QoS-based TE”, “Link protection”, “E-LSP”, “L-LSP” -

Clip B (30MB): “National Geographic”, 60s, 320x240, 30fps, 4000kbps, used in “QoS-based TE” -

Clip C (30MB): “Animal Planet”, 60s, 320x240, 30fps, 4000kbps, used in “E-LSP”, “L-LSP” -

Clip F (151MB): “National Geographic – 2”, 6m, 320x240, 30fps, 4000kbps, used in “Node protection” -

Note5: If you would like to download this documentation, use this link:

Installing mpls-linux

Here is a series of steps you need to complete to install mpls-linux on all the 'core' computers (E1-E5). The installation was done in Debian Linux, but the steps are similar for other distributions. The installation uses mpls-linux version 1.950; for the current and newer versions, please read the readme in the mpls-linux project page first.

  1. Download the necessary packets from the net. These include Kernel, mpls-linux and iptables, iproute, ebtables with MPLS support.

# mkdir downloads

# cd downloads/

downloads# wget

downloads# wget

downloads# wget

downloads# wget

downloads# wget

downloads# cp * /usr/src

downloads# cd /usr/src

  1. Untar the Linux kernel and mpls-linux package. Apply the patch to the kernel to add MPLS support. When applying the pacth, it's very important that the user receives the italic output.

/usr/src# tar jxf linux-

/usr/src# tar jxf mpls-linux-1.950.tar.bz2

/usr/src# cd linux-

/usr/src/linux- patch -p1 < /usr/src/mpls-linux-1.950/patches/linux-kernel.diff

patching file include/linux/genetlink.h

patching file include/linux/if_arp.h

patching file include/linux/mpls.h

patching file include/linux/netdevice.h

patching file include/linux/ppp_defs.h

patching file include/linux/rtnetlink.h

patching file include/linux/shim.h

patching file include/linux/socket.h

patching file include/net/ip6_fib.h

patching file include/net/ip_fib.h

patching file include/net/mpls.h

patching file include/net/shim.h

patching file net/bridge/Kconfig

patching file net/bridge/Makefile

patching file net/bridge/mplsbr.c

patching file net/bridge/netfilter/ebt_mpls.c

patching file net/bridge/netfilter/Kconfig

patching file net/bridge/netfilter/Makefile

patching file net/core/dev.c

patching file net/core/Makefile

patching file net/core/shim.c

patching file net/core/shim_procfs.c

patching file net/ipv4/fib_semantics.c

patching file net/ipv4/ip_input.c

patching file net/ipv4/ip_output.c

patching file net/ipv4/Kconfig

patching file net/ipv4/Makefile

patching file net/ipv4/mpls4.c

patching file net/ipv4/netfilter/ipt_mpls.c

patching file net/ipv4/netfilter/Kconfig

patching file net/ipv4/netfilter/Makefile

patching file net/ipv4/route.c

patching file net/ipv6/ip6_output.c

patching file net/ipv6/ipv6_syms.c

patching file net/ipv6/Kconfig

patching file net/ipv6/Makefile

patching file net/ipv6/mpls6.c

patching file net/ipv6/netfilter/ip6t_mpls.c

patching file net/ipv6/netfilter/Kconfig

patching file net/ipv6/netfilter/Makefile

patching file net/ipv6/route.c

patching file net/Kconfig

patching file net/Makefile

patching file net/mpls/af_mpls.c

patching file net/mpls/Makefile

patching file net/mpls/mpls_dst.c

patching file net/mpls/mpls_if.c

patching file net/mpls/mpls_ilm.c

patching file net/mpls/mpls_init.c

patching file net/mpls/mpls_input.c

patching file net/mpls/mpls_instr.c

patching file net/mpls/mpls_netlink.c

patching file net/mpls/mpls_nhlfe.c

patching file net/mpls/mpls_opcode.c

patching file net/mpls/mpls_output.c

patching file net/mpls/mpls_procfs.c

patching file net/mpls/mpls_proto.c

patching file net/mpls/mpls_shim.c

patching file net/mpls/mpls_sysfs.c

patching file net/mpls/mpls_tunnel.c

patching file net/mpls/mpls_utils.c

patching file net/mpls/TODO

patching file net/xfrm/xfrm_shim.c

  1. Start configuring the kernel. The user will activate all modules and drivers needed for the correct functioning of his system. In addition MPLS support will be added. These additional elements must be added so that they can be used by the scripts.
    BEWARE: A wrong kernel configuration CAN result in an unbootable system!!!

/usr/src/linux- make menuconfig

  1. Compile and install the new kernel.

/usr/src/linux- make && make modules && make modules_install && make install

/usr/src/linux- cat /boot/grub/menu.lst

title MPLS

root (hd0,4) #replace with your settings

kernel /boot/vmlinuz- root=/dev/hda5


  1. Convert to deb and install the following packages: iproute, iptables and ebtables.

/usr/src# alien iproute-2.6.11-1_mpls_1.950d.i386.rpm

iproute_2.6.11-2_i386.deb generated

/usr/src# alien --scripts iptables-1.3.0-2_mpls_1.950d.i386.rpm

iptables_1.3.0-3_i386.deb generated

/usr/src# alien --scripts ebtables-2.0.6-7_mpls_1.950d.i386.rpm

ebtables_2.0.6-8_i386.deb generated

/usr/src# dpkg -i iproute_2.6.11-2_i386.deb

dpkg - warning: downgrading iproute from 20051007-3 to 2.6.11-2.

(Reading database ... 76030 files and directories currently installed.)

Preparing to replace iproute 20051007-3 (using iproute_2.6.11-2_i386.deb) ...

Unpacking replacement iproute ...

Setting up iproute (2.6.11-2) ...

Installing new version of config file /etc/iproute2/rt_dsfield ...

Installing new version of config file /etc/iproute2/rt_protos ...

Installing new version of config file /etc/iproute2/rt_realms ...

Installing new version of config file /etc/iproute2/rt_scopes ...

Installing new version of config file /etc/iproute2/rt_tables ...

/usr/src# cp /bin/true /sbin/chkconfig

/usr/src# dpkg -i iptables_1.3.0-3_i386.deb

dpkg - warning: downgrading iptables from 1.3.3-2 to 1.3.0-3.

(Reading database ... 75999 files and directories currently installed.)

Preparing to replace iptables 1.3.3-2 (using iptables_1.3.0-3_i386.deb) ...

Unpacking replacement iptables ...

Setting up iptables (1.3.0-3) ...

/usr/src# dpkg -i ebtables_2.0.6-8_i386.deb

Selecting previously deselected package ebtables.

(Reading database ... 75906 files and directories currently installed.)

Unpacking ebtables (from ebtables_2.0.6-8_i386.deb) ...

Setting up ebtables (2.0.6-8) ...

Ok. you're ready. Make sure the kernel compiled correctly and restart your computer(s). On reboot, select the MPLS kernel and you're good to go. To verify that there is MPLS support in the new kernel, after reboot run dmesg |grep MPLS and you should get some output.

Note: If you chose to install things as modules, MAKE SURE that they load before running the scripts, or you could get errors!

<- Prev (Requirements)


(Command reference) Next->