无此类文件或目录错误

无此类文件或目录错误

本文介绍了RTNETLINK答案:无此类文件或目录错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1. ETH=$1
2. LATENCY=$2
3. LOSS=$3
4. JITTER=$4
5. BW=$5
6. sudo /sbin/tc qdisc del dev eth0 root
7. sudo /sbin/tc qdisc add dev eth0 root handle 1: netem delay $LATENCY $JITTER
8. sudo /sbin/tc qdisc add dev eth0 parent 1:1 handle 10: netem loss $LOSS
9. sudo /sbin/tc qdisc add dev eth0 parent 10:1 handle 20: htb default 1
10.sudo /sbin/tc class add dev eth0 parent 20: classid 0:1 htb rate $BW ceil $BW
11.sudo /sbin/tc qdisc show

上面的代码导致:

RTNETLINK answers :No such file or directory

在执行第8、9、10行时出错.

解决方案

问题是缺少内核模块和/或内核支持.确保您可以运行

modprobe sch_netem

启用后,我还必须重新构建内核,因为启用网络仿真后会启用某些内置功能.

另请参见 http://forums.fedoraforum.org/showthread.php?t= 285408 http://www.linuxfoundation.org/collaborate/workgroups/networking /netem

1. ETH=$1
2. LATENCY=$2
3. LOSS=$3
4. JITTER=$4
5. BW=$5
6. sudo /sbin/tc qdisc del dev eth0 root
7. sudo /sbin/tc qdisc add dev eth0 root handle 1: netem delay $LATENCY $JITTER
8. sudo /sbin/tc qdisc add dev eth0 parent 1:1 handle 10: netem loss $LOSS
9. sudo /sbin/tc qdisc add dev eth0 parent 10:1 handle 20: htb default 1
10.sudo /sbin/tc class add dev eth0 parent 20: classid 0:1 htb rate $BW ceil $BW
11.sudo /sbin/tc qdisc show

The above code results in:

RTNETLINK answers :No such file or directory

error on line 8,9,10 upon execution.

解决方案

The problem is with missing kernel modules and/or kernel support. Make sure you can run

modprobe sch_netem

I also had to rebuild the kernel after I enabled because there's something built-in that is enabled after you enable network emulation.

See also http://forums.fedoraforum.org/showthread.php?t=285408 and http://www.linuxfoundation.org/collaborate/workgroups/networking/netem

这篇关于RTNETLINK答案:无此类文件或目录错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 11:07