From mboxrd@z Thu Jan 1 00:00:00 1970 From: "GoMi" Date: Tue, 22 Apr 2003 18:10:03 +0000 Subject: [LARTC] Lots amounts of classes to solve the DAP problem Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org =20 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stef, remember the problem about DAP users? i have written a little scrip t= o create 255 classes each for an ip of my segment, what do you think, am i = mistaken anywhere? I am not sure i am getting the concept right. The idea is=20 Total BW is lets say 255kbit root 1:0 User 192.168.1.1: | 1:1 2kbit ceil 255kbit / \ =20 / \ 1kbit ceil 127kbit 1:2 1:4 1kbit ceil 128kbit | | pfifo 1:3 1:5 sfq User 192.168.1.2 | 1:6 2kbit ceil 255kbit / \ =20 / \ 1kbit ceil 127kbit 1:7 1:8 1kbit ceil 128kbit | | pfifo 1:9 1:10 sfq =20 And soo on 255 times... I now the rate of the classes add up to be more than the total BW but since= i am doing that for 2 ADSL working with multipath (loadbalanding) routing,= i think there will never be all users using one interface. Dont know if my= assumption is right.. To end up i have to set up a hashing table to create all the filters. The s= cript to create the structure is the one on the bottom. What do you think? = Am i going in the right direction or did i just completly missed what you w= ere having in mind..? ( I have not set up the hashing table for filters yet) #!/bin/bash UPLINK00 DEV=3Deth0 IP=3D"" for ((a=3D1;a<255;a++)) do IP=3D$IP" "$a done b=3D1 for a in $IP do let "c=3Db" tc class add dev $DEV parent 1: classid 1:$b htb rate 2kbit ceil 300kbit let "b=3Db+1" tc class add dev $DEV parent 1:${c} classid 1:${b} htb rate 1kbit ceil 1= 50kbit let "c=3Db" let "b=3Db+1" tc qdisc add dev $DEV parent 1:${c} handle ${b}: pfifo let "b=3Db+1" let "c=3Dc-1" tc class add dev $DEV parent 1:${c} classid 1:${b} htb rate 1kbit ceil 1= 50kbit let "c=3Db" let "b=3Db+1" tc qdisc add dev $DEV parent 1:${c} handle ${b}: sfq perturb 10 let "b=3Db+1" done -----BEGIN PGP SIGNATURE----- Version: PGP 8.0 iQA/AwUBPqWFe37diNnrrZKsEQLqHACgyyMjyFuClTgT8CZFZRUF++sFHRYAoLjA HOWpYCLIrIa0rW32Cjh4P6bd =E4FN -----END PGP SIGNATURE----- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/