[LARTC] Limit filters
Paweł Staszewski
pstaszewski@artcom.pl
Wed, 5 May 2004 18:37:48 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01C432D0.10D1FC80
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
it is posible to do more than 2048 filter rules and classes like this:
=20
/sbin/tc class add dev eth1 parent 1:15 classid 1:101 htb rate =
1kbit ceil 6128kbit prio 1 quantum 1500
/sbin/tc filter add dev eth1 protocol ip pref 0 parent 1: u32 =
match ip dst 10.10.24.17 flowid 1:101
/sbin/tc qdisc add dev eth1 parent 1:101 handle 101: sfq
/sbin/tc class add dev eth1 parent 1:15 classid 1:102 htb rate =
1kbit ceil 6128kbit prio 1 quantum 1500
/sbin/tc filter add dev eth1 protocol ip pref 0 parent 1: u32 =
match ip dst 10.6.40.42 flowid 1:102
/sbin/tc qdisc add dev eth1 parent 1:102 handle 102: sfq
/sbin/tc class add dev eth1 parent 1:15 classid 1:103 htb rate =
1kbit ceil 6128kbit prio 1 quantum 1500
/sbin/tc filter add dev eth1 protocol ip pref 0 parent 1: u32 =
match ip dst 10.6.84.37 flowid 1:103
/sbin/tc qdisc add dev eth1 parent 1:103 handle 103: sfq
/sbin/tc class add dev eth1 parent 1:15 classid 1:104 htb rate =
1kbit ceil 6128kbit prio 1 quantum 1500
/sbin/tc filter add dev eth1 protocol ip pref 0 parent 1: u32 =
match ip dst 10.4.206.47 flowid 1:104
/sbin/tc qdisc add dev eth1 parent 1:104 handle 104: sfq
when i reach the 2048 number of the next inserted rule give a message :
RTNETLINK answers: File exists
------=_NextPart_000_000B_01C432D0.10D1FC80
Content-Type: text/html;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>it is posible to do more than 2048=20
filter rules and classes like this:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial =
size=3D2><BR> =20
/sbin/tc class add dev eth1 parent 1:15 classid 1:101 htb rate 1kbit =
ceil=20
6128kbit prio 1 quantum =
1500<BR> =20
/sbin/tc filter add dev eth1 protocol ip pref 0 parent 1: u32 match ip =
dst=20
10.10.24.17 flowid 1:101<BR> =
/sbin/tc=20
qdisc add dev eth1 parent 1:101 handle 101: sfq</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2><BR><BR> =20
/sbin/tc class add dev eth1 parent 1:15 classid 1:102 htb rate 1kbit =
ceil=20
6128kbit prio 1 quantum =
1500<BR> =20
/sbin/tc filter add dev eth1 protocol ip pref 0 parent 1: u32 match ip =
dst=20
10.6.40.42 flowid 1:102<BR> =
/sbin/tc=20
qdisc add dev eth1 parent 1:102 handle 102: sfq</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2><BR> =20
/sbin/tc class add dev eth1 parent 1:15 classid 1:103 htb rate 1kbit =
ceil=20
6128kbit prio 1 quantum =
1500<BR> =20
/sbin/tc filter add dev eth1 protocol ip pref 0 parent 1: u32 match ip =
dst=20
10.6.84.37 flowid 1:103<BR> =
/sbin/tc=20
qdisc add dev eth1 parent 1:103 handle 103: sfq</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2> /sbin/tc=20
class add dev eth1 parent 1:15 classid 1:104 htb rate 1kbit ceil =
6128kbit prio 1=20
quantum 1500<BR> /sbin/tc =
filter add=20
dev eth1 protocol ip pref 0 parent 1: u32 match ip dst 10.4.206.47 =
flowid=20
1:104<BR> /sbin/tc qdisc add =
dev eth1=20
parent 1:104 handle 104: sfq<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>when i reach the 2048 number of the =
next inserted=20
rule give a message :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>RTNETLINK answers: File =
exists</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> </DIV></FONT></BODY></HTML>
------=_NextPart_000_000B_01C432D0.10D1FC80--