云梦
www.htcp.net

Dell R410 BCM5716 网卡 Ubuntu 16.04 更换内核开启 BBR

0x01 原因

今天为 Dell R410 服务器更换内核,更换 4.14 内核后网卡直接挂掉无法访问,经检查是该官方内核没有 BCM 网卡的驱动。真是太坑了。

网卡是:
Broadcom Corporation NetXtreme II BCM5716

输出:

root@exp# dpkg -i linux-image-4.10.17-041017-generic_4.10.17-041017.201705201051_amd64.deb 
Selecting previously unselected package linux-image-4.10.17-041017-generic.
(Reading database ... 54683 files and directories currently installed.)
Preparing to unpack linux-image-4.10.17-041017-generic_4.10.17-041017.201705201051_amd64.deb ...
Done.
Unpacking linux-image-4.10.17-041017-generic (4.10.17-041017.201705201051) ...
Setting up linux-image-4.10.17-041017-generic (4.10.17-041017.201705201051) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.17-041017-generic /boot/vmlinuz-4.10.17-041017-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.17-041017-generic /boot/vmlinuz-4.10.17-041017-generic
update-initramfs: Generating /boot/initrd.img-4.10.17-041017-generic
W: Possible missing firmware /lib/firmware/bnx2/bnx2-mips-09-6.2.1b.fw for module bnx2
W: Possible missing firmware /lib/firmware/bnx2/bnx2-mips-06-6.2.3.fw for module bnx2
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.17-041017-generic /boot/vmlinuz-4.10.17-041017-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.10.17-041017-generic
Found initrd image: /boot/initrd.img-4.10.17-041017-generic
Found linux image: /boot/vmlinuz-4.4.0-104-generic
Found initrd image: /boot/initrd.img-4.4.0-104-generic
done

如果使用 http://kernel.ubuntu.com/~kernel-ppa/mainline/ 的内核,就会提示 bnx2-mips 固件找不到的警告,重启服务器后,网卡将无法启动。

如果您误装了 kernel.ubuntu.com 的内核,千万不要关机,否则开机网卡就废了。

0x02 解决方法

如果使用 Dell R410 服务器内置的 BCM 网卡,不要使用提供 kernel.ubuntu.com 的内核。而是要使用 HWE 内核。

1. 通过如下命令安装:

apt install linux-image-generic-hwe-16.04 linux-firmware

2. 修改 sysctl.conf,在下面添加如下条目,开启 BBR:

vim /etc/sysctl.conf

net.ipv4.tcp_congestion_control = bbr
net.core.default_qdisc = fq

3. 重启服务器即可。网卡不会再挂掉了。

4. 开机后确认没有问题后,卸载旧内核:

apt purge linux-image-4.4.0-*-generic
apt purge linux-image-extra-4.4.0-*-generic
赞(0) 打赏
文章通过 CC 4.0 BY-NC-ND 协议发布,转载请注明出处:云梦 » Dell R410 BCM5716 网卡 Ubuntu 16.04 更换内核开启 BBR

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

如果您觉得文章有用,可以支持一下本站

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏