Re: Shaping incoming traffic on the other interface

Linux Advanced Routing and Traffic Control

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

 



Matteo Brusa <miagi@xxxxxxxxxx> writes:

> tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
> tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10

I'm using sfq as well. But I'm wondering if I wouldn't be better off with
pfifo with a short queue. One of the entries in the HTB faq suggests using sfq
can make it hard to limit bandwidth precisely because it requires enough
memory that tcp_wmem kicks in. Or is that only for locally generated traffic?

> tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 10 fw flowid 1:10
> tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 20 fw flowid 1:20
> 
> The packets are marked in the POSTROUTING chain of the mangle table, as usual.
> I'm running kernel 2.4.20-30.9 custom and iptables v1.2.7a. HTB is reported as 3.10.
> Note that the problem raises when i hit the ceil throuput.

I'm still unsure whether I want to be using iptables to mark packets or stick
with the tc filters I inherited from wshaper.

Marking packets in iptables has the advantage that it knows which packets were
natted and what the host on the far side of the NAT is. It also has some more
flexible methods for matching.

One thing I'm wondering, is it possible in iptables to mark all packets after
some amount of traffic? Like, for example I want port 80 traffic to be higher
priority than ftp-data and bittorrent, but only for regular browsing. If I
download something over, say, 200k I want to to get downgraded to the same
group as ftp-data and bittorrent. Also, bittorrent has a habit of occasionally
using random ports and doesn't set TOS. So if iptables knew that that flow had
already transfered more than some threshold of data it could downgrade it.

Actually another possibility is any flow open for more than, say, 30s could be
downgraded.

I don't think the qdiscs handle things at this granularity, but iptables sure
does. I don't recall seeing any of these features but it doesn't seem like it
would be much of a stretch for it.

-- 
greg

_______________________________________________
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