Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Let me explain what I'm trying to do, we have one 10Mbps line coming in, we want to divide that up into 3 3Mbps sections, which are defined by each subnet, then in one of these subnets we have tennents that which we want to then allocate specific amounts per tennent. (So the 3Mbps for them, might have 5x256kbps 3x1.5Mbps, etc in it)

So in my test environment, I'm just trying to get it to have the inherited classes rates and everything correctly, I've been trying with tc and with tcng, here is an example tcng which should limit 192.168.30.132 to 256kbps, however this is not the case, instead it gets the full connection speed of the link, not even the 10Mbps class inside htb.

Yet if I remove the $tennents1 from this example it provides the subnet the correct 512kbps, rather then a full link.

  dev eth1 {
     egress {
        class ( <$tennents> ) if ip_src/24 == 192.168.30.0 ;
        class ( <$tennent1> ) if ip_src/32 == 192.168.30.132 ;

        htb ( ) {
           class ( rate 10Mbps, ceil 10Mbps ) {
              $tennents = class ( rate 512kbps, ceil 512kbps ) {
                 $tennent1 = class ( rate 256kbps, ceil 256kbps ) { sfq; } ;
              } ;
           }
        }
     }
  }

Even a working example with tc commands would be great, which is the default way I started doing this however ran into same sorta issues, figured I was doing something wrong, went for the tcng method of generating the tc script, but still same issues.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.