From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Nychis Date: Mon, 17 Apr 2006 00:36:41 +0000 Subject: Re: [LARTC] how to do probabilistic packet loss in kernel? Message-Id: <4442E319.50309@cmu.edu> List-Id: References: <4902.128.2.140.224.1145227461.squirrel@128.2.140.224> In-Reply-To: <4902.128.2.140.224.1145227461.squirrel@128.2.140.224> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Thanks Martin and Roman. I will definately look into this. I have a question for you though... in terms of adding loss like this, this will not interact with hardware layer rate control of wireless cards right? For instance... dropping from 54Mbit to 11Mbit on an 802.11g card when loss certain loss begins occuring Martin A. Brown wrote: > Greetings George, > > : I am using iproute2 to setup fowarding, adding routes like "ip > : route add 192.168.1.3 via 192.168.1.2" > : > : I was wondering where in the kernel I can insert probabilistic > : packet loss only for forwarded packets? So that for instance I > : can drop 5% of all forwarded packets? > : > : I don't need help with the actual code, just need help finding > : where to insert this code :) > > I believe you are looking for the netem qdisc [0]. Here's just a > snippet from Stephen Hemminger's wiki page to help you imagine how > you could use netem to introduce probabilistic packet loss. > > # tc qdisc add dev eth0 parent 1:3 handle 30: netem \ > delay 200ms 10ms distribution normal > > Good luck, > > -Martin > > [0] http://linux-net.osdl.org/index.php/Netem > _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc