[LARTC] Lots amounts of classes to solve the DAP problem

Linux Advanced Routing and Traffic Control

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

 



 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stef, remember the problem about DAP users? i have written a little scrip to 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 
Total BW is lets say 255kbit

                   root 1:0

User 192.168.1.1:
                         |
                        1:1 2kbit ceil 255kbit
                        / \  
                       /   \
 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
                        / \  
                       /   \
 1kbit ceil 127kbit   1:7  1:8 1kbit ceil 128kbit
                       |    |
               pfifo  1:9  1:10 sfq                       

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 script 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 were having in mind..? ( I have not set up the hashing table for filters yet)

#!/bin/bash
UPLINK=300
DEV=eth0

IP=""

for ((a=1;a<255;a++))
do
 IP=$IP" "$a
done


b=1

for a in $IP
do
 let "c=b"

   tc class add dev $DEV parent 1: classid 1:$b htb rate 2kbit ceil 300kbit
 let "b=b+1"

   tc class add dev $DEV parent 1:${c} classid 1:${b} htb rate 1kbit ceil 150kbit
 let "c=b"
 let "b=b+1"

   tc qdisc add dev $DEV parent 1:${c} handle ${b}: pfifo
 let "b=b+1"
 let "c=c-1"

   tc class add dev $DEV parent 1:${c} classid 1:${b} htb rate 1kbit ceil 150kbit
 let "c=b"
 let "b=b+1"

  tc qdisc add dev $DEV parent 1:${c} handle ${b}: sfq perturb 10
 let "b=b+1"

done

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPqWFe37diNnrrZKsEQLqHACgyyMjyFuClTgT8CZFZRUF++sFHRYAoLjA
HOWpYCLIrIa0rW32Cjh4P6bd
=E4FN
-----END PGP SIGNATURE-----


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