Search code examples
linuxbandwidthbandwidth-throttling

Bandwidth throttling using netem?


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?


Solution

  • 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,