2012-05-07 16 views
5

Próbuję emulować sieć jako (bitrate: 200kbps, packetloss: 0,03, opóźnienie: 400ms) i używam netem.Ograniczanie przepustowości za pomocą netemu?

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 

Gdy ten otrzymuję błąd informujący

RTNETLINK answers: No such file or directory 

Gdzie jestem będzie niewłaściwy? jak mogę to zrobić lepiej?

Odpowiedz

6
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% 

To działało. Poważnie nie wiem, o różnicy między tym dwoma,

1

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

-> Link edseek jest martwy - spróbuj stronę archive.is: http://archive.is/o4UTQ

-> czy może lepiej: http://www.lartc.org

==:> a jeszcze inny dobrym źródłem: http://myconfigure.blogspot.com/2012/03/traffic-shaping.html

Proszę uzyskać pod CMD ustawić ETH jak na swoje wymagania.

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 
+0

link do artykułu Jasona jest martwy, ale można obejrzeć w archiwum: http://archive.is/o4UTQ – CarlH