Openwrt 路由上开启BBR

BBR 是一种协议算法,在 Openwrt 路由上启用 BBR 还是有一定作用的。 Openwrt 18.* 后都自带模块 kmod-tcp-bbr 安装就可以。

Openwrt

看内核版本

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 转摘请注明来源

Suggested Topics

开启BBR 加速小VPS访问速度

TCP BBR 是 Google 开发的新的拥塞控制算法,据说是用在 YouTube 上,后来开源并且已经集成到 Linux 4.9-rc8 之后版本的内核中。它可以极大提高网络速度,大大降低延迟。...

ubuntu/debian 下自行编译 OpenWRT 固件

首先声明,自行编译是一个自我折腾的过程,没时间或精力就不要试了,这里介绍个人尝试在ubuntu/debian 下编译OpenWRT固件和应用SDK 的过程。...

ARRIS SBR AC1750 路由变砖拆解折腾

五个月前在某宝上看关于 ARRIS SBR-AC1750 的介绍,挺酷的,买一台店家刷好的 PandoraBox 系统。最近才折腾,试刷其它的系统,最终变砖。...

在SAE Python上开启gzip的方法

开启 gzip 的作用自不必说,可以省很多流出带宽,可以省很多云豆。昨天这个博客的云豆消耗,其中流出带宽就占九成多,开启后就会只占五成多。...

WNDR4300 固件升级到 OpenWrt 最新版

Netgear WNDR4300 (v1) 是最经典的能刷openwrt及其分支的路由器,属于性价比比较好的一款。经得起折腾,升级、变砖、恢复,能折腾的都试了。确实是实战中一款耐刷的路由战斗机。...

OpenWrt 国内源

国内可用 OpenWrt 镜像,都同步更新到 openwrt 最新版...

Leave a Comment

1 thoughts on "Openwrt 路由上开启BBR"

#1 zhoux says:

运行如下命令:

Bash: sysctl
1
sysctl net.core.default_qdisc

输出结果包含 fq ,才能证实成功