[LARTC] bandwidth limiting on packet size !

Linux Advanced Routing and Traffic Control

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

 



I'm doing this in my setup. To match packet sizes, I use a filter that
looks at the 3rd byte in the ip header. The total length in the ip header
takes up two bytes, bytes 3 to 4 (or 2-3 if you're counting starting from
0 as you should when using a filter) for a maximum packet size of 65535.
My filter looks like the following:

tc filter add dev ppp0 parent 2:0 protocol ip prio 5 u32 match ip \
protocol 6 0xff match u8 0x00 0xff at 2 flowid 2:3

The second match does the following: It looks in the first byte of the two
byte field and matches 00 only. This means that the packet can only be big
enough to fill up on byte worth of data which equates to a size no greater
then 255 bytes. You can play around with it to get different values. It
seems to work fine for me.

Hope this helps,

-Ross Skaliotis

On Wed, 6 Mar 2002, Arindam Haldar wrote:

> hi all,
>
> i  also wanted 2 know if someone has tried bandwidth limiting on packet
> size with tc and >>> WITHOUT USING IPTABLES !
> can anyone lend his expertise on the above pls...
> thanx in advance
>
> A.H
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>



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