Now when i try to add/change tc qdisc with a loss of 0.5% I see following error:
ing:~ tc qdisc change dev en1 root netem loss 0.5%
Error: Qdisc not found. To create specify NLM_F_CREATE flag.
ing:~ tc qdisc add dev en1 root netem loss 0.5%
Error: Specified qdisc not found.
ing:~
How to fix it ??
Also i tried setting back to pfifo_fast (default netem rule) and then tried to add loss of 0.5% i see following issue
ing:~ tc qdisc add dev en1 root pfifo_fast
ing:~ tc qdisc show dev en1
qdisc pfifo_fast 8004: root refcnt 92 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
ing:~ tc qdisc add dev en1 root netem loss 0.5%
Error: Exclusivity flag on, cannot modify.
ing:~
Here again I tried deleting pfifo_fast tc rule but fq_codel got set back and where i was unable to set loss 0.5%
Packet loss
Random packet loss is specified in the 'tc' command in percent. The smallest possible non-zero value is:
232 = 0.0000000232%
# tc qdisc change dev eth0 root netem loss 0.1%
This causes 1/10th of a percent (i.e 1 out of 1000) packets to be randomly dropped.
An optional correlation may also be added. This causes the random number generator to be less random and can be used to emulate packet burst losses.
# tc qdisc change dev eth0 root netem loss 0.3% 25%
This will cause 0.3% of packets to be lost, and each successive probability depends by a quarter on the last one.
Probn = .25 * Probn-1 + .75 * Random
I'm really interested in this topic, so looking forward to any updates. What version of Linux are you using? I may install netem on Ubuntu and check it out.