Installing the scripts.
Installing these scripts (along with the documentation) should be straight forward:
download the archive: wget http://www.elcom.pub.ro/~adrian.popa/mpls-linux/mpls-linux-labs_v1.950.tar
cp mpls-linux-labs_v1.950.tar /tmp
tar xvf mpls-linux-labs_v1.950.tar
cp -ar mpls-linux-labs_v1.950/computer_name/scripts.tar /root
tar xvf scripts.tar
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 video-server.sh 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” - http://www.elcom.pub.ro/~adrian.popa/mpls-linux/media/a.mpg
Clip B (30MB): “National Geographic”, 60s, 320x240, 30fps, 4000kbps, used in “QoS-based TE” - http://www.elcom.pub.ro/~adrian.popa/mpls-linux/media/b.mpg
Clip C (30MB): “Animal Planet”, 60s, 320x240, 30fps, 4000kbps, used in “E-LSP”, “L-LSP” - http://www.elcom.pub.ro/~adrian.popa/mpls-linux/media/c.mpg
Clip F (151MB): “National Geographic – 2”, 6m, 320x240, 30fps, 4000kbps, used in “Node protection” - http://www.elcom.pub.ro/~adrian.popa/mpls-linux/media/f.mpg
Note5: If you would like to download this documentation, use this link: http://www.elcom.pub.ro/~adrian.popa/mpls-linux/mpls-linux-docs_v1.950.tar.gz
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.
Download the necessary packets from the net. These include Kernel 184.108.40.206, mpls-linux and iptables, iproute, ebtables with MPLS support.
# mkdir downloads
# cd downloads/
downloads# wget http://switch.dl.sourceforge.net/sourceforge/mpls-linux/mpls-linux-1.950.tar.bz2
downloads# wget http://switch.dl.sourceforge.net/sourceforge/mpls-linux/iptables-1.3.0-2_mpls_1.950d.i386.rpm
downloads# wget http://switch.dl.sourceforge.net/sourceforge/mpls-linux/iproute-2.6.11-1_mpls_1.950d.i386.rpm
downloads# wget http://switch.dl.sourceforge.net/sourceforge/mpls-linux/ebtables-2.0.6-7_mpls_1.950d.i386.rpm
downloads# wget ftp://ftp.roedunet.lkams.kernel.org/pub/linux/kernel/v2.6/linux-220.127.116.11.tar.bz2
downloads# cp * /usr/src
downloads# cd /usr/src
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-18.104.22.168.tar.bz2
/usr/src# tar jxf mpls-linux-1.950.tar.bz2
/usr/src# cd linux-22.214.171.124
/usr/src/linux-126.96.36.199# 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
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-188.8.131.52# make menuconfig
In Networking Options the following items will be compiled in kernel [Networking Options Screenshot]:
<*> Multiprotocol Label Switching
<*> MPLS: Virtual tunnel interface
<*> 802.1d Ethernet Bridging
<*> Bridge: MPLS support
In Network Packet Filtering (replaces ipchains), IP: Netfilter configuration will be selected
In IP: Netfilter configuration menu the following minimum options will be selected [IP Netfilter Screenshot]:
<*> Packet Filtering
<*> Packet Mangling
<*> MPLS target support
<*> DSCP target support
In Network Packet Filering (replaces ipchains) select Bridge: Netfilter configuration
In Bridge: Netfilter configuration menu the following minimum options will be selected[Bridge Netfilter Screenshot]:
<*> Ethernet Bridge tables (ebtables) support
<*> ebt: broute table support
<*> ebt: filter table support
<*> ebt: nat table support
<*> ebt: 802.3 filter support
<*> ebt: MPLS target support
In Networking Options select QoS and fair queueing
From the submenu, select all options either compiled into the kernel or as modules [QoS Screenshot].
Compile and install the new kernel.
/usr/src/linux-184.108.40.206# make && make modules && make modules_install && make install
/usr/src/linux-220.127.116.11# cat /boot/grub/menu.lst
root (hd0,4) #replace with your settings
kernel /boot/vmlinuz-18.104.22.168 root=/dev/hda5
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
/usr/src# alien --scripts iptables-1.3.0-2_mpls_1.950d.i386.rpm
/usr/src# alien --scripts ebtables-2.0.6-7_mpls_1.950d.i386.rpm
/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!