LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Traffic shaping for network w/ 1 NIC (https://www.linuxquestions.org/questions/linux-networking-3/traffic-shaping-for-network-w-1-nic-240611/)

johnsto 10-09-2004 12:05 PM

Traffic shaping for network w/ 1 NIC
 
Hey,

Hopefully I can explain this clearly enough...

We have a wired network consisting of several PCs and an ADSL router that all connect together at a switch and hence give the PCs access to the internet via the router. The PCs simply use the ADSL router as their gateway.

What I'd love to do is introduce traffic shaping... but the ADSL router is hardware so I can't do it there (no supported firmware does traffic shaping, but does act as a very good firewall).

I do however have a spare mini-itx PC which is great, and ideally I'd run IPCop on it, direct all the PCs to use it as their gateway, and hook it to the router - unfortunately it only has one NIC (and there's no space in it's case for more) so I can't do this either.

Does anyone know if it's possible to use this additional PC to manage traffic shaping on this network if it's only got one NIC?

acid_kewpie 10-09-2004 02:28 PM

shouldn't be a problem. blocks of rules in cbq can be defined by a number of ways including ip subnets. see the manpages of cbq and tc for details on defining cbq classes. as a small example:
Code:

DEVICE=eth0,10Mbit,1Mbit
RATE=128Kbit
WEIGHT=10Kbit
PRIO=5
RULE=192.168.1.0/24

here any traffic on 192.168.0.1/24 subnet will be restricted to 128kbit on eth0. there doesn't need to be a physical "pipeline" to throttle, as it's done at a totally different osi layer.

johnsto 10-10-2004 05:55 AM

Thanks for the info!

So, if I setup the remaining PCs to use this one as their gateway, I could then use cbq to prioritise web access and throttle back P2P usage?


All times are GMT -5. The time now is 11:40 PM.