Re: refining my rules

Linux Advanced Routing and Traffic Control

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

 



On Sunday 27 November 2005 02:06, nix4me wrote:
> #add main rate limit class
> tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit

In a 100mbit network, the full 100mbit can only be reached under optimal 
conditions (I don't know what they are though), so I suggest you measure 
the actual throughput your network can reach and use this as rate, or just 
use a slightly lower value here.

> #add leaf classes, 1:2 is lan, 1:3 is outbound max
> tc class add dev eth0 parent 1:1 classid 1:2 htb rate 100mbit

If you give the LAN class the full parent class rate, you've got two 
problems. First, your parent class will already be fully booked. There is 
nothing left for the other classes, and HTB will have to cheat somehow to 
distribute bandwidth now, which may lead to unexpected results. Second, if 
you got a lot of LAN traffic between the router and other machines 
(fileserver etc.), this traffic can take up the whole line and interfere 
with your internet traffic. So in my opinion the rate of the LAN class 
should be the rate of the parent class minus the rate(s) of your internet 
class(es).

> tc class add dev eth0 parent 1:1 classid 1:3 htb rate 40kbps
> # 1:31 is ftp with lower prio, 1:32 is ACk AND email higher prio
> tc class add dev eth0 parent 1:3 classid 1:31 htb rate 20kbps ceil
> 40kbps prio 2
> tc class add dev eth0 parent 1:3 classid 1:32 htb rate 20kbps ceil
> 40kbps prio 1

You don't have any internet traffic other than ftp and email?

Regards,
Andreas Klauer
_______________________________________________
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