LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Limiting bandwidth on a linux router (https://www.linuxquestions.org/questions/linux-networking-3/limiting-bandwidth-on-a-linux-router-279413/)

<Ol>Origy 01-18-2005 03:33 PM

Limiting bandwidth on a linux router
 
Hello everyone!

I have some questions about linux networking and I wish for some answers. It's just that I have the need to limit the amount of packets that go through my linux router. I have searched these forums for answers but I can't seem to come up with a solution that would fit my system as I am just too uncertain.

Here's how my network is like:
I am using an old P2 300 MHz PC with two network cards and Red Hat 9 as my router. One network card is connected to an ADSL modem which has a static IP while the other one is connected to a switch and has an internal IP of 192.168.10.1 which is the gateway for all other computers connected to that switch. I am using an iptables firewall + masquerade server to allow internal computers to access the internet via the router. It was just a bunch of rules I needed to add to enable IP forwarding and it works fine so far.

Now suddenly I have the need to limit bandwidth to all internal PC's as sometimes one PC (usually my sisters) consumes almost all upload leaving others laggy and stuck. I need to limit the internet bandwidth to all internal PC's while still being able to use the connection between any internal PC and the router itself or the router and the internet itself with full speed. I only wish to limit the speed for connections from any internal PC to the internet. I wish to limit the upload only to a certain amount for all internal PC's (any port, any IP, protocols).

Do you have any suggestions that would fit my configuration?
Can I limit the upload with my currently installed iptables?
Should I install and use a third-party bandwidth limiting utility? Which one and why?

Warning: I'm not very good at installing new programs on linux - new to it.


Thanks for your time and any suggestions.
~Ol

arno 01-18-2005 06:26 PM

At the following location you can find a lot of information, have a look at monowall.

http://www.voip-info.org/wiki-VOIP+Routers

emu_123 01-18-2005 06:28 PM

I am having the same problem however its my brothers computer running kazaa that sucks up all the bandwidth.

My thoughts on how to limit the bandwidth are to install a different packer scheduler on the router to give my computer priority on sending packets instead of FIFO which is IIRC the default scheduler. I haven't finished compiling all the packages on my router as yet though so beyond the thoughts, not much has happened so I cannot tell you if it'll actually would work. :scratch:

Once I get it done, I will help if you need it. If you find out some other way to limit the bandwidth please do tell. :)

<Ol>Origy 01-20-2005 12:39 AM

Quote:

Originally posted by arno
At the following location you can find a lot of information, have a look at monowall.

http://www.voip-info.org/wiki-VOIP+Routers

"m0n0wall is probably the first UNIX system that has..."
Ugh... I don't like the sound of that.

Here's one particulary interesting document I found.
http://www.ibiblio.org/pub/Linux/doc...ent-HOWTO.html
I still can't seem to understand how to limit all kinds of traffic (any protocol, any port) for any PC on the subnet from this article. I'll have to study it a bit more.

emu_123 01-26-2005 12:36 AM

Quote:

Here's one particulary interesting document I found.
http://www.ibiblio.org/pub/Linux/doc...ent-HOWTO.html
Thanks for that link, that is exactly the type of thing that I was planning to do. ;) This will definitely save me a lot of time poring through the kernel network configuration and documention.

Thanks

emu_123

fr_laz 01-26-2005 02:51 AM

Hi,

I recently (last week) enabled QoS on my linux router.

Quote:

I still can't seem to understand how to limit all kinds of traffic (any protocol, any port) for any PC on the subnet from this article. I'll have to study it a bit more.
Here http://www.prout.be/qos/QoS-connecti...OWTO.html#toc4 They explain how to use MANGLE iptables's rules to mark any packet. You then apply your QOS policies to the marked packets.

So with the iptables rules, you should be able to specify all IPs / ports you want.

Hope this helps...

<Ol>Origy 01-26-2005 04:06 PM

I will look into this in the near future and post questions here if I have any.
Thanks.


All times are GMT -5. The time now is 09:48 AM.