LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-15-2009, 05:49 PM   #1
drmongolia
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
tc / iptables question


Hey,

I have a linux router. I want to throttle the amount of bandwidth sent from the external interface to the internal interface for specific hosts that are hogging bandwidth. However I'd like to identify these hosts dynamically instead of entering them in manually.

For example -- I'd like to use iptables to set a mark on local hosts that have exceeded a certain KB/s rate, and then have tc apply the filter to those specific hosts only (so that packets to this local host would be dropped over a certain rate, say 350Kbps). Then the mark would expire after a certain amount of time, etc.

I would think that this is a rather common thing, but I can't find any good examples. Can someone point me in the right direction?

Thanks!

Last edited by drmongolia; 10-15-2009 at 05:51 PM.
 
Old 10-20-2009, 08:05 PM   #2
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,112
Blog Entries: 1

Rep: Reputation: 124Reputation: 124
It's anything but the common thing. This is holly grail for any ISP Administrator. Very complicated as far as I know.
 
Old 10-25-2009, 11:52 AM   #3
landysaccount
Member
 
Registered: Sep 2008
Location: Dominican Republic
Distribution: Debian Lenny
Posts: 160

Rep: Reputation: 16
I've done this in the past but, I had to statically add the ip addresses of those users I want to throtle.
 
Old 10-26-2009, 02:54 AM   #4
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,112
Blog Entries: 1

Rep: Reputation: 124Reputation: 124
Statically yes, but for dynamical bandwidth control, and/or dynamic control based on control of the number of packets (p2p uses large number of very small packets witch is all a large problem for ISP) you need expensive software.
 
Old 10-26-2009, 04:08 AM   #5
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Rep: Reputation: 36
You can not achieve this using tc and/or iptables. The marking and limiting yes, but the rest is out of bounds.
You need to listen to the traffic whit a script or any other software, when it exceeds, mark the IP with iptables, limit it with tc, and then you can have a bash script running from crontab, to remove the IP from the iptables mark and remove that from tc.

But I don't understand what would you gain with dynamic adding of limitations. Everytime the user will exceed his limit, you'll run tc and limit him. So where is the point?

Last edited by Tux-Slack; 10-26-2009 at 04:10 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables question redss Linux - Networking 5 09-08-2009 05:33 PM
Question regarding iptables lassik Linux - Newbie 2 02-15-2009 07:54 PM
iptables question lsu420luv General 2 03-23-2006 11:38 AM
IPTables question THE RADICAL Linux - Security 4 12-15-2005 04:12 AM
Iptables Question? unixfreak Linux - Security 1 09-01-2004 09:23 PM


All times are GMT -5. The time now is 07:17 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration