Fw: [LARTC] good bandwith example?

Linux Advanced Routing and Traffic Control

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

 



> does somebody have a working tc commandlist with bandwith limit for
> internet>lan use?

The following is a snippet that I got from my linux router vendor. I will be
putting it in place this week. They
ensure me that it will work. This takes an IP block that uses eth0 and
limits the bw for that IP block to 3Mbit.
I hope this is what you are after, as I am fairly new to this as well, I
cannot garantee this will go. It seems to
conform to what I have read thus far.

#tc qdisc add dev eth0 root handle 10: cbq bandwidth 100Mbit avpkt 1000
#tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 100Mbit rate
100Mbit allot 1514 weight 10Mbit prio 7 maxburst 100 avpkt 1000
#tc class add dev eth0 parent 10:1 classid 10:200 cbq bandwidth 100Mbit rate
3Mbit allot 1514 weight 300Kbit prio 7 maxburst 20 avpkt 1000 bounded
#tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip src
<ip/nm> flowid 10:200



> - Am I correct to assume that after giving the tc commands the commands
are
> active, right? or do I have to configure/activate something else before
> bandwith limit is working?

The should take affect when you issue them. I have them in a script file
that I can addto/modify on the fly and will be loaded on boot.


Cheers,
Chris






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