Re: Control Trafic

Linux Advanced Routing and Traffic Control

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

 



On Wednesday 28 September 2005 03:14, Daniel Phlander wrote:
> I have an error in this script as it is not working and I can't figure
> out what that is.

Your current class trees look like this:

eth0 HTB root qdisc 1: (default 30)
|
\--- HTB root class 1:1 (100mbit)
     |
     \--- HTB parent class 1:20 (90mbit)
     |    |
     |    \--- HTB leaf class 1:21 (70mbit)
     \--- HTB parent class 1:30 (1536kbit)
          |
          \--- HTB leaf class 1:31 (128kbit)

eth1 HTB root qdisc 1: (default 30)
|
\--- HTB root class 1:1 (100mbit)
     |
     \--- HTB parent class 1:20 (90mbit)
     |    |
     |    \--- HTB leaf class 1:21 (70mbit | 80mbit)
     \--- HTB parent class 1:30 (1736kbit)
          |
          \--- HTB leaf class 1:31 (64kbit | 256kbit)

> ### /// 3] Clasele pentru fiecare client
> #
> # client adresa marcaj metro internet
> # ------------------------------------------------------------------
> # client 1 85.120.48.0/25 1 :21 :31
> # client 2 192.168.2.0/24 2 :22 :32
> # client 3 192.168.3.0/24 3 :23 :33
> # client 4 192.168.4.0/24 4 :24 :34

I don't understand the language of the comments, so I ignored them earlier. 
But I take it that the 1:21 and 1:31 classes are supposed to be user 
classes and there will be more following? If done right, that would make 
sense. You have to make sure that child class rates add up to the parent 
class rate. So for example, since you gave 1:21 70mbit of 90mbit, the 
other clients together are not allowed to take more than 20mbit of 
guaranteed rate.

The only problem left fixing then are the filters. Your default class in 
both cases is 30, that's no good because it's no leaf, but a parent class. 
Then you have filters pointing to parent classes and filters attached to 
parent classes. That's probably no good either; so far I only had success 
when attaching filters directly to the QDisc.

So all your filter rules must look something like this:

tc filter add dev <device> parent 1: bla bla bla flowid 1:x where x has to 
be a leaf class (currently 21 or 31 only).

Same goes for default value, it must be a leaf class.

HTH
Andreas
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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