BBR 是一种协议算法,在 Openwrt 路由上启用 BBR 还是有一定作用的。 Openwrt 18.* 后都自带模块 kmod-tcp-bbr
安装就可以。
看内核版本
1
2
root@OpenWrt:~# uname -r
4.9.184
安装 kmod-tcp-bbr
1
2
opkg update
opkg install kmod-tcp-bbr
会安装相关的 ipk
1
2
3
Configuring kmod-sched-core.
Configuring kmod-sched.
Configuring kmod-tcp-bbr.
查看相关情况
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
root@OpenWrt:~# sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = cubic
root@OpenWrt:~# sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = cubic reno bbr
root@OpenWrt:~# sysctl net.core.default_qdisc
net.core.default_qdisc = fq_codel
root@OpenWrt:~# lsmod | grep bbr
tcp_bbr 4832 0
root@OpenWrt:~# cat /etc/sysctl.conf
# Defaults are configured in /etc/sysctl.d/* and can be customized in this file
root@OpenWrt:~# ls -l /etc/sysctl.d/
-rw-r--r-- 1 root root 675 Jun 27 12:18 10-default.conf
-rw-r--r-- 1 root root 379 Jun 27 12:18 11-nf-conntrack.conf
-rw-r--r-- 1 root root 184 Jun 27 12:18 12-tcp-bbr.conf
root@OpenWrt:~# cat /etc/sysctl.d/12-tcp-bbr.conf
# Do not edit, changes to this file will be lost on upgrades
# /etc/sysctl.conf can be used to customize sysctl settings
net.ipv4.tcp_congestion_control=bbr
net.core.default_qdisc=fq
root@OpenWrt:~# sysctl -p
root@OpenWrt:~# lsmod | grep bbr
tcp_bbr 4832 0
还没生效,重启路由后再看看
1
2
3
4
root@OpenWrt:~# lsmod | grep bbr
tcp_bbr 4832 21
root@OpenWrt:~# sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = bbr
BBR 加速生效了!
但是
BBR 是TCP拥塞算法,是针对高丢包场景的,在内网服务器上效果不会太大。
本文网址: https://pylist.com/topic/186.html 转摘请注明来源
1 thoughts on "Openwrt 路由上开启BBR"
运行如下命令:
1
输出结果包含
fq
,才能证实成功