Re: tc does'nt limit the bandwidth!

Linux Advanced Routing and Traffic Control

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

 



segun adesina wrote:
> Hi, good people!
> 
> I wanted to limit my 4 customers to 144, 16, 32, and
> 32kbps.
> I used the following tc commands BUT IT FAILED TO
> LIMIT each and everyone of them to its bandwidth.
>  What am I doing wrong:

Do you know that tc uses somewhat unconventional abbreviations? kbps
means kiloBYTEs per second and kbit means kiloBITs per second. That
would really screw up the limiting if you had that mixed up. Read the
"Units" secion of the man page.

> 
> My tc scripts are:
> 
> tc qdisc add dev eth1 root handle 1: htb default 1
>                        #Classes#
> tc class add dev eth1 parent 1:    classid 1:1    htb
> rate     9bps ceil    9bps  #Default
> tc class add dev eth1 parent 1:    classid 1:100  htb
> rate     9bps ceil    9bps  #ICMP
> 
> 
> tc class add dev eth1 parent 1:    classid 1:5    htb
> rate  144kbps ceil 256kbps  #customer A

This class has a higher ceiling than its rate, which means it is allowed
to "borrow" unused bandwidth from the other classes. I don't know if you
intended that.

> tc class add dev eth1 parent 1:    classid 1:101  htb
> rate   16kbps ceil  16kbps  #customer B
> tc class add dev eth1 parent 1:    classid 1:111  htb
> rate   32kbps ceil  32kbps  #customer C
> tc class add dev eth1 parent 1:    classid 1:121  htb
> rate   32kbps ceil  32kbps  #customer D
> 

All these classes are operating on eth1, and should restrict bandwidth
leaving that interface. If you want to restrict traffic moving in the
other direction, you may need a corresponding set of classes.

You haven't shown us any of your tc filter commands. If nothing I've
said above has helped any, then you probably have to give us more
information or we won't be able to find what's wrong.

-Corey
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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