TCP congestion control for IPv6 under Linux

I can type

echo bbr > /proc/sys/net/ipv4/tcp_congestion_control

to change the congestion control algorithm for the TCP connections running over IPv4, but how do I do it for those arriving over IPv6?

Does the above command set it for both?


Yes, both sysctl (net.ipv4.tcp_allowed_congestion_control and net.ipv4.tcp_available_congestion_control) and /proc entry (/proc/sys/net/ipv4/tcp_congestion_control) apply to every IPv4 and IPv6 TCP connections. The ipv4 part in the sysctl and /proc names does not mean that this is only for TCP over ipv4. This only means that the algorithm is implemented in the linux/net/ipv4 subdirectory of the kernel source tree: in Linux, TCP over IPv6 implements the congestion control by making calls to the implementation for IPv4, since there is no difference between TCP congestion control in TCP over IPv4 and TCP over IPv6.


From the doc (https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt):

/proc/sys/net/ipv6/* Variables:

IPv6 has no global variables such as tcp_*. tcp_* settings under ipv4/ also apply to IPv6.