BBR 只能配合 Linux Kernel 4.10 以上内核才能使用, 所以需要升级内核
查看内核版本,如达到要求略
# uname -r
4.4.0-1075-aws //默认4.4.0,因此需要升级
//切换到root用户
$ sudo -s
# wget –no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
# chmod +x bbr.sh
# ./bbr.sh
———- System Information ———-
OS : Ubuntu 16.04.5 LTS
Arch : x86_64 (64 Bit)
Kernel : 4.4.0-1075-aws
—————————————-
Auto install latest kernel for TCP BBR
URL: https://teddysun.com/489.html
—————————————-
Press any key to start…or Press Ctrl+C to cancel
按任意键后会显示
Info: Getting latest kernel version…
———— kernel setting ————
1) 4.14
……
…..
234) 4.20.16
235) 4.20.17
236) 5.0
237) 5.0.1
238) 5.0.2
239) 5.0.3
240) 5.0.4
which kernel you’d select (default 5.0.4): // 按回车键选择最新版本
your selection: 5.0.4
–2019-03-27 02:55:58– https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0.4/linux-modules-5.0.4-050004-generic_5.0.4-050004.201903231634_amd64.deb
Resolving kernel.ubuntu.com (kernel.ubuntu.com)… 91.189.94.216
Connecting to kernel.ubuntu.com (kernel.ubuntu.com)|91.189.94.216|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 46593520 (44M) [application/x-debian-package]
Saving to: ‘linux-modules-5.0.4-amd64.deb’
0K ………. ………. ………. ………. ………. 0% 160K 4m44s
50K ………. ………. ………. ………. ………. 0% 321K 3m33s
100K ………. ………. ………. ………. ………. 0% 24.3M 2m22s
150K ………. ……..
……..
done
Info: The system needs to reboot.
Do you want to restart system? [y/n]y //按“y“重启
./bbr.sh: line 271: 8748 Terminated reboot
#######重启后##########
$ uname -r
5.0.4-050004-generic
$ sudo -s
#分别输入下面命令检查
# sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = reno cubic bbr
# sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = bbr
# sysctl net.core.default_qdisc
net.core.default_qdisc = fq
# lsmod | grep bbr
tcp_bbr 20480 6
看到bbr即完成