How to Enable BBR on Debian Linux

BBR (Bottleneck Bandwidth and Round-trip propagation time) is a TCP congestion control algorithm developed by Google that can significantly improve network throughput and reduce latency on your Debian system. TCP (Transmission Control Protocol) manages how data packets travel across networks, and congestion control algorithms determine how quickly to send data without overwhelming the connection. Unlike the default CUBIC algorithm, which relies on packet loss to detect congestion, BBR measures actual bandwidth and round-trip time to optimize data transmission. This approach works particularly well on high-latency connections, lossy networks, and long-distance transfers where traditional algorithms struggle.

By the end of this guide, you will have BBR enabled on Debian as your default TCP congestion control algorithm, configured to persist across reboots, and verified as active on your system. The process involves loading the BBR kernel module and configuring sysctl parameters to make the change permanent.

Check Current TCP Congestion Control

Before enabling BBR, ensure your system is up to date with sudo apt update && sudo apt upgrade, then check which congestion control algorithm your system currently uses:

sysctl net.ipv4.tcp_congestion_control

If BBR is already active, you will see:

net.ipv4.tcp_congestion_control = bbr

If the output shows cubic or reno instead, BBR is not enabled and you can proceed with this guide to activate it.

Load the BBR Kernel Module

With the current settings confirmed, the next step is loading the BBR module. BBR requires kernel 4.9 or later, which all current Debian releases (11, 12, and 13) include. Load the BBR module to verify your kernel supports it:

sudo modprobe tcp_bbr

The command produces no output when it succeeds. Next, confirm the system lists BBR among the available congestion control algorithms:

cat /proc/sys/net/ipv4/tcp_available_congestion_control

You should see bbr listed among the available options:

reno cubic bbr

If you receive an error when loading the module or do not see bbr in the available algorithms, you may need to update your kernel. Consider installing the latest Linux kernel on Debian or a performance-focused kernel like XanMod or Liquorix, which include BBR support by default.

Configure Persistent BBR Settings on Debian

Now that you have confirmed BBR availability, configure it as the permanent default. The modern approach on Debian is to create a dedicated configuration file in /etc/sysctl.d/ rather than editing /etc/sysctl.conf directly. The first line configures the Fair Queue (fq) packet scheduler, which BBR requires to function properly. The second line sets BBR as the default congestion control algorithm:

cat <<EOF | sudo tee /etc/sysctl.d/99-bbr.conf
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
EOF

This creates a dedicated configuration file at /etc/sysctl.d/99-bbr.conf that is easier to manage and remove than lines buried in /etc/sysctl.conf. These settings apply to both IPv4 and IPv6 TCP connections and persist across system reboots. Server administrators running services like SSH on Debian or web servers will notice improved throughput on high-latency connections.

Apply Configuration Changes

Reload the sysctl configuration to apply the changes immediately without requiring a reboot. Use --system to load all configuration files from /etc/sysctl.d/:

sudo sysctl --system

The command outputs all applied settings from system configuration files. Look for your BBR settings in the output:

* Applying /etc/sysctl.d/99-bbr.conf ...
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

Additional lines from other configuration files may appear in the output, which is normal.

Verify BBR is Active

Confirm BBR is now the active congestion control algorithm:

sysctl net.ipv4.tcp_congestion_control

You should see BBR as the active algorithm:

net.ipv4.tcp_congestion_control = bbr

Additionally, confirm the system uses the Fair Queue scheduler:

sysctl net.core.default_qdisc
net.core.default_qdisc = fq

To verify your system uses BBR for actual network connections, check an active TCP connection:

ss -ti | grep -i bbr

If you have active connections, you will see output showing BBR in use:

cubic wscale:7,7 rto:204 rtt:3.435/1.573 ato:40 mss:1448 pmtu:1500 rcvmss:1448 advmss:1448 cwnd:10 bbr:(bw:189.5Mbps,mrtt:2.88)

The bbr: section in the output confirms BBR manages that connection’s congestion control.

Troubleshoot BBR Issues

BBR Module Not Found

If modprobe tcp_bbr fails with a “module not found” error:

modprobe: FATAL: Module tcp_bbr not found in directory /lib/modules/...

Your kernel does not include BBR support. Update to a newer kernel or install a kernel that includes BBR, such as XanMod or Liquorix.

Settings Reset After Reboot

If BBR reverts to CUBIC after a reboot, first verify the configuration file exists:

cat /etc/sysctl.d/99-bbr.conf

You should see both lines present:

net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr

If the file is missing, re-run the configuration commands from the earlier section. If present but the system does not apply the settings, the BBR kernel module may not load at boot. This happens when your kernel compiles BBR as a loadable module rather than building it in. Create a module configuration file to ensure it loads automatically:

echo 'tcp_bbr' | sudo tee /etc/modules-load.d/bbr.conf

The /etc/modules-load.d/ directory is the modern location for module loading configuration on Debian 12 and 13, replacing the deprecated /etc/modules file. After creating this file, the system loads the BBR module automatically on every boot before applying sysctl settings.

Disable BBR and Revert to CUBIC

To disable BBR and return to the default CUBIC algorithm, remove the BBR configuration file:

The following commands modify system network configuration. While reverting to CUBIC is safe, ensure you have console access to your server in case of connectivity issues during remote sessions.

sudo rm /etc/sysctl.d/99-bbr.conf

If you also created a module loading file, remove it as well:

sudo rm /etc/modules-load.d/bbr.conf 2>/dev/null

Then apply the default settings:

sudo sysctl -w net.ipv4.tcp_congestion_control=cubic
sudo sysctl -w net.core.default_qdisc=fq_codel

Verify the change:

sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = cubic

Conclusion

You now have BBR configured as your TCP congestion control algorithm on Debian, with the Fair Queue scheduler optimizing packet delivery. The sysctl configuration ensures these settings persist across reboots. To measure the impact, test network performance using tools like iperf3 for throughput or ping for latency comparisons before and after enabling BBR. For further network optimization, consider pairing BBR with a performance-focused kernel like XanMod or Liquorix on Debian.

2 thoughts on “How to Enable BBR on Debian Linux”

  1. Hi, I am on debian 12.10 but I have the error below when trying to enable bbr.

    jq@debian:~$ sysctl net.ipv4.tcp_congestion_control
    bash: sysctl: command not found

    Thanks

    Reply

Leave a Comment