Re: Blocking N consecutive packets with netgraph



benjamin@xxxxxxxxxx wrote:

I need to test a multicast streaming media application by selectively
dropping packets in the network connecting the source to the viewer.

The capability I need is to drop N consecutive packets, where N ranges
from 1 to 50 and is chosen via the command line.

I had hoped to do this with dummynet and ipfw, but apparently I can
only drop packets with a specified probablity. The network topology
for this method was to bridge two ethernet nics, then use dummynet pipes
to vary the bandwith and packet loss rate.

I also tested a method using ipfw to temporarily enable packet block
rules using a short sleep interval, but there was only very coarse
control of the number of packets blocked.

Is it feasible to do this with netgraph? Please outline how this may
be accomplihsed.



Certainly it is as long as you are happy to write your own node.
Now, don't be scared.. nodes are relatively simple to write.

They can be loaded dynamically once written.
check out all the nodes available at:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/
you can start easily with the "sample" node.

change its name and compile it by adding a directory in the /sys/modules.netgraph directory,
copying the Makefile from another one and modifying it accordingly.

start hacking..

documantation is in:
http://www.freebsd.org/cgi/man.cgi?query=netgraph&apropos=0&sektion=4&manpath=FreeBSD+7.0-current&format=html

and all the other man pages for netgraph modules,


TIA

Tom Benjamin
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"


_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Blocking N consecutive packets with netgraph
    ... dropping packets in the network connecting the source to the viewer. ... The capability I need is to drop N consecutive packets, ... for this method was to bridge two ethernet nics, then use dummynet pipes ... I also tested a method using ipfw to temporarily enable packet block ...
    (freebsd-net)
  • Re: Blocking N consecutive packets with netgraph
    ... dropping packets in the network connecting the source to the viewer. ... The capability I need is to drop N consecutive packets, ... control of the number of packets blocked. ... This year I did the same but for ethernet ...
    (freebsd-net)
  • Re: [PATCH] ng_tag - new netgraph node, please test (L7 filtering possibility)
    ... For simple using, however, you don't need to bother all that details - just remember magic number and where to place it, and it is now simple for use with ipfw tags. ... Currently the only analyzing node in FreeBSD src tree is ng_bpf, but it merely splits incoming packets in two streams, matched and not. ... There are reasons to this, as netgraph needs to be modular, and each node does a small thing, but does it well. ... For long time ng_bpf was used for another purposes in the kernel, and now, as new ipfw features appeared, ng_tag came up for easy integration. ...
    (freebsd-current)
  • Re: [PATCH] ng_tag - new netgraph node, please test (L7 filtering possibility)
    ... For simple using, however, you don't need to bother all that details - just remember magic number and where to place it, and it is now simple for use with ipfw tags. ... Currently the only analyzing node in FreeBSD src tree is ng_bpf, but it merely splits incoming packets in two streams, matched and not. ... There are reasons to this, as netgraph needs to be modular, and each node does a small thing, but does it well. ... For long time ng_bpf was used for another purposes in the kernel, and now, as new ipfw features appeared, ng_tag came up for easy integration. ...
    (freebsd-isp)
  • Re: [PATCH] ng_tag - new netgraph node, please test (L7 filtering possibility)
    ... For simple using, however, you don't need to bother all that details - just remember magic number and where to place it, and it is now simple for use with ipfw tags. ... Currently the only analyzing node in FreeBSD src tree is ng_bpf, but it merely splits incoming packets in two streams, matched and not. ... There are reasons to this, as netgraph needs to be modular, and each node does a small thing, but does it well. ... For long time ng_bpf was used for another purposes in the kernel, and now, as new ipfw features appeared, ng_tag came up for easy integration. ...
    (freebsd-net)