Installing Kernel 5.X with Google BBR support in centos7 box

Install elrepo & new kernel

rpm --import
rpm -Uvh
yum --enablerepo=elrepo-kernel install kernel-ml -y

Lets understand in which position our new kernel installs. Rows begins with 0, so if you see new kernel on the top you should choose grub-set-default 0

egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
grub2-set-default 0

Check that our new kernel install successfully.

uname -r

Lets enable BBR

echo 'net.core.default_qdisc=fq' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv4.tcp_congestion_control=bbr' | sudo tee -a /etc/sysctl.conf
sysctl -p

And lets check that our bbr module enabled successfully.

# Check if BBR is enabled, output should be "bbr cubic reno"
sysctl net.ipv4.tcp_available_congestion_control
# Verify, output should be bbr
sysctl -n net.ipv4.tcp_congestion_control
# Check that module loads, output should be (tcp_bbr 20480  1)
lsmod | grep bbr

When new kernel released just update it via yum and check new grub-set-default.

yum update --enablerepo=elrepo-kernel
egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
grub2-set-default 0

For autoload new kernel after update edit file /etc/default/grub and set GRUB_DEFAULT=0

GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop crashkernel=auto"

Leave a Reply

Your email address will not be published.