一键开启

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf && echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf && sysctl -p

手动开启:
1、修改系统变量

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

2、保存生效

sysctl -p

3、检查内核是否已开启BBR

sysctl net.ipv4.tcp_available_congestion_control

显示以下信息即已开启:

# sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = bbr cubic reno

4、检查BBR是否启动

lsmod | grep bbr

显示以下类似信息即启动成功:

# lsmod | grep bbr
tcp_bbr                20480  14

如果需要升级内核可使用一键脚本

wget --no-check-certificate -qO 'BBR.sh' 'https://moeclub.org/attachment/LinuxShell/BBR.sh' && chmod a+x BBR.sh && bash BBR.sh -f
Last modification:August 18, 2022
If you think my article is useful to you, please feel free to appreciate