1

Can someone please give me pointers on enabling newReno in the linux kernel. Is the opensource source code available anywhere? I could get some cpp code online, but I would have to rewrite the whole thing to use it in linux kernel.

user3349765
  • 11
  • 1
  • 2
  • 1
    youj can find many congestion by `ls /lib/modules/`uname -r`/kernel/net/ipv4/` command and enable by `Networking -> Networking options -> TCP: advanced congestion control` – Jayesh Bhoi Feb 25 '14 at 06:36
  • @isedev - I am trying this on Linux Kernel 3.8 – user3349765 Feb 25 '14 at 06:38
  • it is supported in the kernel source... if the module is not present (as per JKB's comment), you'll need to check whether it is being compiled into the kernel by your distribution. If not, then you'll need to rebuild the kernel. Check your distros web page to see how to do that. – isedev Feb 25 '14 at 06:45

2 Answers2

1

Beginning with 2.6.13, the Linux kernel supports plugins for the TCP stack, and enables switching between algorithms depending on what the system is connected to. your one is 3.8 so obviously it supported wide range of algorithms some of are as follows

High Speed TCP

The algorithm is described in RFC 3649. The main use is for connections with large bandwidth and large RTT (such as Gbit/s and 100 ms RTT).

H-TCP

H-TCP was proposed by the Hamilton Institute for transmissions that recover more quickly after a congestion event. It is also designed for links with high bandwidth and RTT.

TCP Tahoe/Reno

These are the classical models used for congestion control. They exhibit the typical slow start of transmissions. The throughput increases gradually until it stays stable. It is decreased as soon as the transfer encounters congestion, then the rate rises again slowly. The window is increased by adding fixed values. TCP Reno uses a multiplicative decrease algorithm for the reduction of window size. TCP Reno is the most widely deployed algorithm.

TCP Westwood+

Westwood+ addresses both large bandwidth/RTT values and random packet loss together with dynamically changing network loads. It analyses the state of the transfer by looking at the acknowledgement packets. Westwood+ is a modification of the TCP Reno algorithm. This is only a rough outline of the modules.

Switching between the different algorithms can be easily done, by writing text to a /proc/ entry.

$:~# echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control 
$:~# cat /proc/sys/net/ipv4/tcp_congestion_control 
westwood
$:~# 

A list of available modules can be found here:

$:~# ls /lib/modules/`uname -r`/kernel/net/ipv4/
ip_gre.ko  netfilter   tcp_cubic.ko      tcp_htcp.ko   tcp_lp.ko        tcp_vegas.ko
ipip.ko    tcp_bic.ko  tcp_highspeed.ko  tcp_hybla.ko  tcp_scalable.ko  tcp_veno.ko
$:~# 

When writing to /proc/, you can skip the tcp_ prefix. If you compile your own kernels, you will find the modules in the Networking -> Networking options -> TCP: advanced congestion control section.

Since some of the algorithms affect only the sender's side, you may not notice a difference when enabling them. In order to see changed behaviour, you have to create a controlled setup, and measure the parameters of TCP transmissions.

Jayesh Bhoi
  • 24,694
  • 15
  • 58
  • 73
  • that doesn't list `tcp_newreno.ko` although I've seen references to `newreno` in the kernel source... – isedev Feb 25 '14 at 07:41
  • Thanks for the reply . Like @isedev said, I dont see references to tcp_newreno.ko. With what I understand, though cubic is the default, newreno by default is supported in the kernel. I could not find any references to enable this. I am able to switch to reno, htcp etc. – user3349765 Feb 25 '14 at 09:06
  • After executing ls /lib/modules/`uname -r`/kernel/net/ipv4/ command i can see list of algorithms.. in the name of westwood i can see one algorithm is westwood or westwood plus? – RAJKUMAR NAGARETHINAM Jan 22 '17 at 14:04
1

From the table on this link ns2 use linux stack,it is in fact a matter of naming.If you set congestion control with "sudo sysctl -w net.ipv4.tcp_congestion_control=reno", the "reno" in linux implements newreno congestion control.

Although their kernel is Linux-2.6.22.6, I think the newer kernel should inherit the same naming.Further evidence can be got from the source code of linux reno implementation.

juejiang
  • 323
  • 4
  • 15