Mic*_*nik 16 networking linux debian tcp-offload-engine
我想在我的 debian 服务器上禁用 tcp-offloading ("TOE")。
ethtool -K .....
Run Code Online (Sandbox Code Playgroud)
不过我有一些愿望:
将它干净地集成到 debian
这写着:没有 rc.local,我也想避免伪 rc 脚本...
我猜,它正在安装 ethtool 并使用pre-up.d/ -Hook 使用/etc/network/interfaces 中的选项解除 TOE配置。
我想使用FAI以通用方式解除我所有(未来)服务器的配置。(因为 fai 已经到位 - 并且想要!)某些硬件不支持脚趾选项呢?如果禁用不存在的选项,网络会失败吗?我想不这样做应该是稳健的,但这似乎也不是我想要的解决方案。
它使配置非常混乱,因为 atm 有 11 个选项!使用多个 NIC 这对我来说很容易出错。
没有更通用的解决方案吗?我有一个 sysctl,但还没有找到。我的愿望是:
echo 0 > /proc/sys/net/core/enable_tcp_offloading
Run Code Online (Sandbox Code Playgroud)
PS:我很惊讶地发现我的“新硬件”默认启用了 TOE,因为这个:http : //www.linuxfoundation.org/collaborate/workgroups/networking/toe
小智 16
在 Debian 上,该ethtool软件包现在提供了一个if-up.d脚本,用于实现卸载(和其他ethtool设置)选项。
你只需要安装这个包并在/etc/network/interfaces.
auto eth0
iface eth0 inet static
address 10.0.3.1/255.255.248.0
gateway 10.0.2.10
offload-tx off
offload-sg off
offload-tso off
Run Code Online (Sandbox Code Playgroud)
尤里卡!找到“我的”解决方案!
我只是将我自己的禁用脚趾脚本放在/etc/network/if-up.d/ 中,它完全禁用了 tcp-offloading。
作为奖励,我添加了一个/etc/network/interfaces -Option,可以禁用它。
#!/bin/bash
RUN=true
case "${IF_NO_TOE,,}" in
no|off|false|disable|disabled)
RUN=false
;;
esac
if [ "$MODE" = start -a "$RUN" = true ]; then
TOE_OPTIONS="rx tx sg tso ufo gso gro lro rxvlan txvlan rxhash"
for TOE_OPTION in $TOE_OPTIONS; do
/sbin/ethtool --offload "$IFACE" "$TOE_OPTION" off &>/dev/null || true
done
fi
Run Code Online (Sandbox Code Playgroud)