Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bandwidth limiting on a LAN
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Anquietas
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jul 2008
Posts: 83

PostPosted: Mon Jan 24, 2011 12:20 am    Post subject: Bandwidth limiting on a LAN Reply with quote

Hello,

I have a Linux Box running Gentoo which is a gateway (acts like a router), dhcp, iptables, bind installed.. etc...
Every station in the LAN uses this Linux box as a gateway.

I want to implement an EASY or DIRECT solution with which I can limit the bandwidth on the "Postrouting" mode (Incoming+Outgoing traffic for and from the LAN stations).

For example:
I want the LAN stations to be limited to 1 Mb/s instead of 8 Mb/s, which is the full capacity of the bandwidth of my server in external testings.

Please guide me to a solution (which I can understand), TCL / HTB or direct iptables mangle command, whatever, something I can understand and put in practice for limiting my LAN stations' net speeds.

Thank you.
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Mon Jan 24, 2011 12:57 am    Post subject: Re: Bandwidth limiting on a LAN Reply with quote

Not much to go on here - do you mean limit each PC to 1MBs-1 or all of them?

I did a quick Google (other search engines exist) and found this:

http://www.linuxquestions.org/questions/linux-server-73/applying-download-speed-limit-iptables-842906/

Read it, follow up on the advice given and post back if you have any more specific questions.

Cheers
Jon
Back to top
View user's profile Send private message
Anquietas
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jul 2008
Posts: 83

PostPosted: Mon Jan 24, 2011 2:39 pm    Post subject: Reply with quote

Yes, but I don't understand a thing...

So, I've instaleld HTBInit, it works...

I have a couple of files:
eth1 eth1-2.root eth1-2:3.computer1 eth1-2:3.comptuer2 eth1-2:3.computer3 eth1-2:3:30.def eth1-2:4.remote

How must I arrange them or what should I type in them to achieve Limiting to 1 Mb/s for each of my computers in my LAN ??

Please help, I only found documentation for limiting Upload... I need for Download & Upload (full bandwidth limiting for my LAN Clients).

UPDATE:
I see that limiting in eth1-2:3:30.def works... however, I understand that this is an exception file and it limits everything... if my rules do not match the above files.

Please help me to make my rules properly in the htb files, I want diferentiated limiting based on IPs of the LAN Stations !
Back to top
View user's profile Send private message
eulogious
n00b
n00b


Joined: 18 Feb 2008
Posts: 35

PostPosted: Tue Jan 25, 2011 2:31 am    Post subject: Reply with quote

I hate say it, but you've got a long road ahead. If you didn't understand what was in the post that was linked to above, then you need to sit down and do some serious reading of the manual. I have managed to limit my upload, and that took several weeks of reading, trying things and asking the right questions here before I got it, and I still don't really understand it. The download is a little more problematic, and I never bothered to try it.

If you do understand the principals that iptables works on, there is no real way that you will be able to setup your network they way you want, so I really suggest googling iptables and reading how the packets flow, and understand the different commands and how they affect the flow of traffic. Once you do that, some of the pieces should fit together, at least they did for me. I am not being an ass here, I am just telling you what I have done, and I am still learning and it's been several years since I started this project :lol:

Here's a good start. My QoS solution is posted in there, so that should give you something to go after...

https://forums.gentoo.org/viewtopic-t-671336-highlight-iptables+firewall.html

Hope that helps. I can try to help you where I can, but I am by no means an expert!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum