Hi,
I am using Netem to simulate network conditions. I use tc to rate control traffic to a specific ip address.
I referred to the below source :
http://lartc.org/howto/lartc.ratelimit.single.html to try out the same.
I used the following commands to rate control traffic to specific links
tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth 100mbit
tc class add dev $DEV parent 1: classid 1:1 cbq rate 500kbit \
allot 1500 prio 5 bounded isolated
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \
match ip dst 195.96.96.97 flowid 1:1
tc class add dev $DEV parent 1: classid 1:2 cbq rate 300kbit \
allot 1500 prio 5 bounded isolated
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \
match ip dst 195.96.96.98 flowid 1:2
Without these tc settings on my router, using iperf I get a throughput of 90Mbps. After I set the above commands, my measured throughput with iperf drops around 17Mbps as opposed to expected values of 500kbps. Similar pattern is observed on teh second link too.
I can see that CBQ settings control the throughput but does not give me the expected value. I am not sure what is wrong. Can someone help and give me some insights about this issue? Thanks