This document describes how to get started with the tcp_libra kernel module and conduct experiments. It is organized as follows:
If you have any questions, please feel free to email Thomas Kho <tkho@ucla.edu>.
Our tcp_libra module works with Linux 2.6.14 (and possibly 2.6.13, which first implementated TCP congestion control as a module, but nothing earlier). You will need to compile and install this kernel on your test machine.
linux-2.6.14$ patch -p0 < tcp_libra.patch
linux-2.6.14$ export CONCURRENCY_LEVEL=2 linux-2.6.14$ make-kpkg --rootcmd fakeroot --initrd --append_to_version -libra\ --revision 1 kernel_image
For subsequent changes to the tcp_libra kernel module, from the linux source directory on your host (the build machine) run:
linux-2.6.14$ make net/ipv4/tcp_libra.ko linux-2.6.14$ scp net/ipv4/tcp_libra.ko tkho@192.168.0.10:/lib/modules/2.6.14-libra/kernel/net/ipv4/where 192.168.0.10 is your test machine, and tkho has write permissions for tcp_libra.ko in the test machine.
The tcp_libra module is not loaded by default. To load the module into your kernel, as root, run:
insmod /lib/modules/2.6.14-libra/kernel/net/ipv4/tcp_libra.ko t0=1 t1=1 k1=2 k2=2 penalty_fcn=0where t0, t1, k1, and k2 are the module parameters, and penalty_fcn is 0 or 1 depending on the desired penalty function
To verify that tcp_libra is being used, run:
cat /proc/sys/net/ipv4/tcp_congestion_control
As root, run:
rmmod /lib/modules/2.6.14-libra/kernel/net/ipv4/tcp_libra.koThe module will not unload if there are open TCP connections that are using the tcp_libra module for congestion control.
netcat is a great tool to create TCP traffic. It's very easy to use on both the client and server side. On the server:
netcat -l -p [port_num]This tells netcat to listen for the first connection on port [port_num]. On the client, run
head /dev/zero -c [bytes] | netcat [host] [port] -q 0which tells netcat to send [bytes] bytes of data to [host]:[port].