Prioritizing forwarded traffic over locally generated traffic

Linux Advanced Routing and Traffic Control

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

 



Hi,

I'm a complete newbie at this traffic shaping / QoS stuff so please excuse
me if this is a silly question. I've searched and searched on Google and I
just end up confusing myself even more, so I thought I'd post my question to
this list and see whether someone can help me!

Basically, I am running a Linux box as a NAT router on my home network
(machine name marvin). I want to use mldonkey on the router box for P2P
downloads. What I wish to do, is to have any traffic that originates on the
internal LAN take priority over traffic that is generated from mldonkey on
marvin. I don't wish to restrict the maximum bandwidth for the P2P downloads
on a permanent basis if I can help it - so that all the bandwidth is used
all of the time.

My plan was to use the PREROUTING and OUTPUT chains of the mangle table to
mark the packets, and then use some form of qdisc/class structure that will
prioritise one over the other.

The aim of this is to have an upload that would normally take say 20 seconds
from a machine on the LAN still take 20 seconds when mldonkey is uploading -
so the NAT traffic will take all the bandwidth away from mldonkey. The
closer to this aim I can get the better!

To test implementations, I am using SFTP to upload a file from both a
machine on my internal network (named slartibartfast), and marvin (the
router machine) simultaneously. The perfect behaviour would be for the
upload on slartibartfast to take 20 seconds, and the upload on marvin to
take 40.

I have tried various setups of qdiscs and classes, using various examples
from all over the web (including the LARTC FAQ/cookbook) but I haven't been
able to get anywhere near my aim. All of the attempts I've made have led to
both uploads taking near enough 40 seconds, as they are both running at 50%
of the available bandwidth. I would like it to give almost all the bandwidth
to slartibartfast for the first 20 seconds, and then all the bandwidth to
marvin for the remaining time. 

I would really appreciate it if someone could tell me whether:
a) This setup is actually possible! 
b) If using the mangle table chains is correct for this
c) If it is, the easiest/best/fastest way to implement it. Just some hints
for the right direction would be fine!

Many thanks in advance,
Neil Greatorex




_______________________________________________
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