From: Andy Furniss Date: Fri, 18 Aug 2006 09:41:52 +0000 Subject: Re: [LARTC] Info about IFB Message-Id: <44E58B60.3040108@andyfurniss.entadsl.com> List-Id: References: <44D91973.2020805@arcoscom.com> In-Reply-To: <44D91973.2020805@arcoscom.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Samuel D=EDaz Garc=EDa wrote: > Hi, I'm looking for info about IFB devices and how I can use it to=20 > incomming traffic shapping. >=20 > Has IFB any web about it? > Do any body known where I can find more info about it? >=20 > I found this: > http://linux-net.osdl.org/index.php/IFB >=20 > But I can't stand fine how to use it to allow many ifb's devices or how=20 > to use it with "tc actions". >=20 > Any help? >=20 > Thanks >=20 To use many you'll need to specify the number with modprobe - modprobe ifb numifbs=20 ip link ls should show them all - you need to ip link set up dev ifbXX=20 aswell. to send arp coming in on eth0 to ifb19 which has a tbf on it (just to=20 see counters - would be silly to really limit arp) ip link set up ifb19 tc qdisc add dev ifb19 root tbf limit 2k rate 20kbit buffer 2k tc qdisc add dev eth0 ingress tc filter add dev eth0 parent ffff: protocol arp prio 1 u32 match u32 0=20 0 flowid 1:1 action mirred egress redirect dev ifb19 The flowid 1:1 is what the classification will be when the packet=20 returns from the ifb - unless you are shaping again (on a real dev - you=20 can't chain ifbs) it doesn't really matter what you put, but you do need=20 one as wothout it the rule will be accepted, but won't work (apart from=20 as a counter) look at counters with - tc -s qdisc ls dev ifb19 tc -s filter ls dev eth0 parent ffff: If you want to do the same sort of thing on egress you need to put=20 something classfull on the interface rather than the default pfifo_fast=20 prio will do. Some examples show using marks aswell, it's not needed as such and=20 doesn't always work as the netfilter bits keep getting out of sync with=20 ifb. Andy. _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc