Re: want to randomly drop packets based on percent

From: George Nychis
Date: Mon Apr 17 2006 - 19:04:52 EST




Stephen Hemminger wrote:

O


I wanted to insert artificial packet loss based on a percent so i found:
network emulab qdisc could do it, so i compiled support into the kernel and tried:
tc qdisc change dev eth0 root netem loss .1%




^^^^^^

You need to do add not change. Add will set the queue discipline
to netem (default is pfifo_fast). Change is for changing netem parameters
after it is loaded.





bahhh I see... the wiki has "change" instead of add. Now i'm running into another problem, I have an XCP qdisc that I have already added via:
tc qdisc add dev ath0 root xcp capacity 54Mbit size 500




Wiki reads as a set of examples. First uses, "add" after that "change".




therefore when I also try to incorperate loss:
tcq disc add dev ath0 root netem loss .1%

I get:
RTNETLINK answers: File exists

Is it possible to use two qdiscs on the same interface?




No, but netem is "classful" so you can put xcp inside netem.
Look at the token bucket example on the wiki.



Okay I'm slightly confused... I would like to have the traffic traverse both the XCP qdisc and the netem qdisc... looking through the wiki it shows me how to classify two sets of traffic, but how do i push all traffic through both?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/