Re: Htb, imq and sfq traffic shaping

Linux Advanced Routing and Traffic Control

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

 



Ixen Gerthannes wrote:
Hello, I wrote a simple traffic shaping script (below) that should
have allowed me to shape my internet traffic a bit (ppp0 - adsl
128kbit/64kbit; local interface eth0). The script works only
partially - the speed is being limited but too much. Without running
this script my download rate is about 10kBytes (with second computer
also downloading at about 6kBytes). After running it my download
speed decreases to about 1..2kBytes and so the second computer. Could
you tell me what have I done wrong ?

Thank you for replies. Ixen

-------------- My configuration:


If you are shaping on and using PC1 and forwarding traffic for PC2 then you only need one IMQ.

You need to send all inbound on ppp0 to it in PREROUTING.

Shape egress directly on ppp0.

Traffic from the shaping PC will have ppp0s address not eth0s, you need to mark local addresses in postrouting mangle for the queues on ppp0.

IMQ needs to be set to hook after nat in prerouting. This may be the default AB?

To filter inbound local (denatted) ip addresses you can't mark with iptables you need to use tc filters. Remember traffic to/from the shaping PC over ppp0 will have ppp0s address.

You need to back off from 128/64 - maybe 100/50, it depends what you want to shape for. There are other tweaks if you really care about latency.

You need to sacrifice downstream bandwidth - and upstream unless you are prepared to find link overheads and tweak/patch.

Andy.

_______________________________________________
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