Re: how to do probabilistic packet loss in kernel?

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Martin A. Brown --- http://linux-ip.net/ --- martin@xxxxxxxxxxxx
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux