Ubuntu 14.04 - tc 不工作

Ubuntu 14.04 - tc 不工作

我之前曾在其他服务器上使用过 tc 来限制端口 80 上的总可用带宽,以确保在一天的高峰时段端口 22 有足够的吞吐量。我现在需要一些帮助来解释以下 tc 规则失败的原因:

tc qdisc add dev eth0 root handle 2 htb default 1
tc class add dev eth0 parent 2: classid 2:6 htb rate 1048576kbit
tc class add dev eth0 parent 2:6 classid 2:100d htb rate 911360Kbit
tc filter add dev eth0 parent 2: protocol ip pref 4 u32 match ip sport 80 0xffff classid 2:100d

添加最后一行(过滤器添加一行)后,出现以下错误:

RTNETLINK answers: Operation not supported
We have an error talking to the kernel

内核版本是3.10.23-xxxx-std-ipv6-64,操作系统是Ubuntu 14.04。

答案1

您使用 OVH 提供的自定义内核启动了 OVH 服务器,而不是 Linux 发行版提供的内核。OVH 提供的内核可能不包含您需要的所有模块。重新配置您的专用服务器以从硬盘启动,在您的 OVH 帐户管理页面中。

相关内容