How To Enable BBR on Debian 11 | Easy Steps – OrcaCore
This guide from OrcaCore will walk you through the process of enabling BBR on Debian 11. BBR (Bottleneck Bandwidth and Round-trip propagation time) is a cutting-edge congestion control algorithm developed by Google. These algorithms, which operate within every device connected to a network, including computers, phones, and tablets, are responsible for determining the rate at which data is sent.
BBR works by actively monitoring a network connection, taking recent measurements of both the network’s delivery rate and the round-trip time. This information is then used to construct a detailed model of the connection, encompassing the maximum available bandwidth and the minimum round-trip delay. Using this model, BBR intelligently manages the speed at which data is transmitted and the maximum amount of data allowed in the network at any given time. This leads to improved network utilization, reduced latency, and a better overall user experience. Getting to know How To Enable BBR on Debian 11 can significantly improve your server’s network performance.
Enable BBR Congestion Control Algorithm on Debian 11
To proceed with enabling TCP BBR, you’ll need to access your server using a non-root user account that has sudo privileges. If you haven’t already set up such an account, you can refer to the OrcaCore guide on Initial Server Setup with Debian 11 for detailed instructions.
Once you have the appropriate access, follow the steps below to successfully enable BBR.
Enable BBR on Debian 11
First, ensure your system’s package lists are up-to-date and upgrade any outdated packages by running the following command:
sudo apt update && sudo apt upgrade -y
Next, it’s useful to examine the currently active and available congestion control algorithms on your system.
Check Existing Congestion Control Algorithms
Typically, Linux systems default to using the Reno and Cubic algorithms.
To determine which congestion control algorithm is currently active, execute the following command:
sudo sysctl net.ipv4.tcp_congestion_control
**Output**
net.ipv4.tcp_congestion_control = cubic
The output above indicates that Cubic is currently employed. Your system’s output might display a different algorithm.
To list all TCP congestion control algorithms available on your server, use the following command:
sudo sysctl net.ipv4.tcp_available_congestion_control
**Output**
net.ipv4.tcp_available_congestion_control = reno cubic
The output shows that Reno and Cubic are available. After successfully adding and enabling BBR, it should also appear in this list.
Add TCP BBR on Debian 11
Now that you’ve confirmed the available algorithms, you need to modify the sysctl.conf
file to enable BBR. Use a text editor like vi
(as demonstrated in the original article, and explained in OrcaCore’s guide on the vi editor) to open the file:
sudo vi /etc/sysctl.conf
Add the following lines to the end of the file:
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
Save the changes and close the file.
Next, reload the sysctl.conf
file to apply the new configuration:
sudo sysctl -p

To verify that BBR is enabled and active as the new TCP congestion control, execute the following command:
sudo sysctl net.ipv4.tcp_congestion_control
**Output**
net.ipv4.tcp_congestion_control = bbr
You can also use the following command to further verify that the BBR module is loaded:
lsmod | grep bbr
**Output**
tcp_bbr 20480 2
Finally, list the available TCP congestion controls on your server once more:
sudo sysctl net.ipv4.tcp_available_congestion_control
You should now see BBR listed among the available options.
That concludes the process. You have successfully enabled BBR on your Debian 11 server. You can now enjoy the benefits of this advanced congestion control algorithm.
Conclusion
Enabling TCP BBR on Debian 11 is a straightforward process that can significantly improve network performance through optimized congestion control. By modifying the system configuration and loading the BBR module, you can achieve enhanced speed and reduced latency for your server’s network traffic. How To Enable BBR on Debian 11 is a valuable skill for any system administrator.
We hope you found this guide helpful. Please follow us on Facebook, X, and YouTube.
You might also find these articles interesting:
Install and Use Podman on Debian 11
Install and Configure Nextcloud on Debian 11
How To Install PHP 7.4 on Debian 11
Install and Configure SysStat on Debian 11
Alternative Solutions for Enabling BBR on Debian 11
While the method outlined above is the most common and straightforward way to enable BBR on Debian 11, there are a couple of alternative approaches worth considering, especially in automated deployment scenarios or when specific kernel configurations are required.
1. Using update-alternatives
(If BBR is packaged)
Some distributions might package BBR as an alternative congestion control algorithm managed by the update-alternatives
system. While Debian 11 doesn’t typically package BBR this way by default, it’s worth checking, and the process is useful to understand for other scenarios. This is less likely to be applicable to a fresh Debian 11 install but is good to know.
Explanation:
The update-alternatives
command manages symbolic links to provide a consistent interface to different versions or implementations of a command or configuration file. If BBR were packaged as an alternative, you could use this tool to switch between congestion control algorithms.
Steps (Illustrative):
-
Check if BBR is managed by
update-alternatives
:update-alternatives --config tcp_congestion_control
If BBR is listed, you can select it from the menu. If not, this method won’t work directly.
-
Hypothetical Addition (For demonstration purposes ONLY – DO NOT RUN on a standard Debian 11 system without understanding the consequences. This is not a standard Debian package):
If BBR were packaged, you might see output like this:
There is 1 choice for the alternative tcp_congestion_control (providing /etc/tcp_congestion_control). Selection Path Priority Status ------------------------------------------------------------ * 0 /etc/tcp_congestion_control_cubic 100 auto mode 1 /etc/tcp_congestion_control_cubic 100 manual mode Press <enter> to keep the current choice[*], or type selection number:
In this hypothetical scenario, if a BBR alternative existed (e.g.,
/etc/tcp_congestion_control_bbr
), you could select it by typing the corresponding number. Again, this is for illustrative purposes only.
Why this is less common for BBR: BBR is typically enabled directly by modifying sysctl.conf
because it requires kernel support and isn’t usually provided as a separate, easily swappable package.
2. Using Ansible or Similar Configuration Management Tools
For automated deployments or managing multiple servers, configuration management tools like Ansible, Chef, Puppet, or SaltStack provide a more scalable and maintainable way to enable BBR.
Explanation:
These tools allow you to define the desired state of your systems (in this case, BBR enabled) and automatically enforce that state across your infrastructure.
Ansible Example:
This Ansible playbook demonstrates how to enable BBR on Debian 11:
---
- hosts: all
become: true
tasks:
- name: Update apt cache
apt:
update_cache: yes
- name: Install necessary packages (if any) - often not needed
apt:
name: linux-modules-extra-$(uname -r) #Example if the kernel modules are not installed
state: present
ignore_errors: yes #Handles cases where packages are already installed or unavailable
- name: Set TCP congestion control to BBR
sysctl:
name: net.ipv4.tcp_congestion_control
value: bbr
state: present
reload: yes
- name: Set default queueing discipline to fq
sysctl:
name: net.core.default_qdisc
value: fq
state: present
reload: yes
- name: Verify BBR is enabled
shell: sysctl net.ipv4.tcp_congestion_control
register: bbr_status
- name: Print BBR status
debug:
msg: "TCP congestion control is set to: {{ bbr_status.stdout }}"
- name: Verify bbr module is loaded
shell: lsmod | grep bbr
register: bbr_module_status
ignore_errors: true
- name: Print BBR module status
debug:
msg: "BBR module status: {{ bbr_module_status.stdout }}"
Explanation of the Ansible Playbook:
hosts: all
: Applies this playbook to all hosts defined in your Ansible inventory.become: true
: Executes tasks with sudo privileges.tasks:
: A list of tasks to perform.apt: update_cache: yes
: Updates the apt package cache.sysctl: ...
: Uses thesysctl
module to set thenet.ipv4.tcp_congestion_control
andnet.core.default_qdisc
settings.state: present
ensures the setting exists (creating it if necessary), andreload: yes
reloads the sysctl configuration.shell: sysctl net.ipv4.tcp_congestion_control
: Executes a shell command to verify that the setting has been applied.register: bbr_status
: Captures the output of the shell command into a variable namedbbr_status
.debug: msg: ...
: Prints the value of thebbr_status
variable.- The
lsmod | grep bbr
tasks verify that the BBR module is loaded, and theignore_errors: true
ensures that the playbook doesn’t fail if the module isn’t loaded for some reason.
Benefits of Using Ansible:
- Idempotence: Ansible tasks are idempotent, meaning they will only make changes if necessary, ensuring consistency.
- Scalability: Easily manage BBR configuration across hundreds or thousands of servers.
- Version Control: Playbooks can be stored in version control systems like Git, providing a history of changes.
- Automation: Automate the entire BBR enablement process, reducing manual effort.
These alternative methods offer flexibility and scalability, especially for managing BBR configurations across multiple Debian 11 servers. Remember to thoroughly test any changes in a non-production environment before applying them to production systems.