質問

I am trying to emulate a network as (bitrate: 200kbps , packetloss: 0.03, delay: 400ms) and I am using netem.

tc qdisc add dev eth1 root handle 1:0 netem delay 400ms loss 0.03%
tc qdisc add dev eth1 parent 1:1 handle 10: tbf rate 200kbit buffer 1600 limit 3000

When i run this i am getting error stating

RTNETLINK answers: No such file or directory

Where am I going wrong? how can I do it better?

役に立ちましたか?

解決

tc qdisc add dev eth1 root handle 1:0 tbf rate 200kbit buffer 1600 limit 3000
tc qdisc add dev eth1 parent 1:0 handle 10: netem delay 400ms loss 0.03%

This worked. Seriously not sure about the difference between this two,

他のヒント

Please refer http://edseek.com/~jasonb/articles/traffic_shaping/classes.html

--> edseek link is dead - try the archive.is page: http://archive.is/o4UTQ

--> or perhaps better: http://www.lartc.org

==:> and yet another good resource: http://myconfigure.blogspot.com/2012/03/traffic-shaping.html

Please get the below cmds to set eth as per your requirements.

tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: htb default 1
tc class add dev eth1 parent 1: classid 0:1 htb rate 200kbit
tc qdisc add dev eth1 parent 1:1 handle 10: netem delay 400000 5 loss 0.03%
tc qdisc ls dev eth1
tc class ls dev eth1
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top