LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
Search this Thread
Old 06-22-2005, 01:03 PM   #1
cuencano
LQ Newbie
 
Registered: Jun 2005
Location: Ecuador
Posts: 11

Rep: Reputation: 0
Question How limit bandwidth


Please, how limit inblound bandwidth in fedora core 2, i use cbq but donīt work in inbound traffic.
 
Old 06-22-2005, 01:32 PM   #2
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
hmmm _why_ do you want to limit inbound bandwidth?
If you think it will prevent you from flooding, please note it is useless

I dont know if it could do the job for you, but I like to use iptables to limit inbound connections (like how many "connections" I accept on a service for a given time) but if you really need bandwidth, it won't do the job.
 
Old 06-22-2005, 01:45 PM   #3
cuencano
LQ Newbie
 
Registered: Jun 2005
Location: Ecuador
Posts: 11

Original Poster
Rep: Reputation: 0
i need in cyber becouse the navigate eat all bandwidth and the telephony don't work then i need limit the inbound bandwidth for navigation.

Thanks
 
Old 06-22-2005, 05:55 PM   #4
newpenguin
Member
 
Registered: Sep 2002
Location: lahore pakistan
Distribution: slackware,redhat, FreeBSD,openbsd
Posts: 219

Rep: Reputation: 30
there is also a iptables byte limit patch.
you can limit bandwidth easily with this.
 
Old 06-23-2005, 12:21 PM   #5
cuencano
LQ Newbie
 
Registered: Jun 2005
Location: Ecuador
Posts: 11

Original Poster
Rep: Reputation: 0
thanks, but i know about byte limit patch can you give me a tip please?
 
Old 06-24-2005, 03:43 AM   #6
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
check www.lartc.org

Last edited by born4linux; 06-24-2005 at 03:47 AM.
 
Old 06-24-2005, 10:17 AM   #7
cuencano
LQ Newbie
 
Registered: Jun 2005
Location: Ecuador
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks but i check lartc.org and not limit the inbound traffic, please help me is urgent.


Thanks.....
 
Old 06-24-2005, 02:56 PM   #8
SirGertrude
Member
 
Registered: May 2004
Location: Missouri
Distribution: Gentoo
Posts: 59

Rep: Reputation: 15
CBQ would work for your application, but is is not efficient because CBQ is used to shape traffic. You need to do ingress traffic policing.

Here is an example:

Assume that my WAN interface is eth1 and I am limiting inbound traffic from ip address: 12.12.12.12

Code:
tc qdisc del dev eth1 ingress
tc qdisc add dev eth1 handle ffff: ingress
tc filter add dev eth1 parent ffff: protocol ip prio 50 u32 match ip src 12.12.12.12 police rate 128kbit burst 15k drop flowid :1
The first line clears any existing ingress qdisc on eth1, if it gives you weird output that is fine.
The second line creates an ingress qdisc on eth1.
The third line creates a 128 Kbps bandwidth cap on all traffic coming from IP address: 12.12.12.12. If this traffic comes in at a rate of higher than 128 Kbps the action will be to drop excess packets.

NOTE: This will work if you are using a service that uses the TCP protocol because TCP will adjust its speed when it starts losing packets. If the connection is saturated with UDP traffic then this will not help you. This is not meant to prevent or mitigate attacks.

Good Luck!
 
Old 06-30-2005, 01:49 AM   #9
ikillu
Member
 
Registered: Jul 2004
Posts: 34

Rep: Reputation: 15
Try CBQ. its best for bandwidth limiting. just use a simple script file and simple configuration.

1. Download CBQ script from https://sourceforge.net/projects/cbqinit .
2. Rename cbq.init-v0.7.3 to cbq.init and cbq.init to /etc/rc.d/
3. now make a file "cbq.999-network" into /etc/sysconfig/cbq/
4. type flowing lines

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

5. now run CBQ script -> /etc/rc.d/cbq.init

AND magic of this one file simple script.

for more information see http://www.linuxsecurity.com/resourc...HOWTO/cbq.html
 
Old 06-30-2005, 05:04 AM   #10
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 293

Rep: Reputation: 31
in the RULE u can specify ports, so cbq.init will work fine for u
 
Old 07-18-2005, 05:57 AM   #11
epsharma
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Rep: Reputation: 0
I have installed cbq to throttle bandwidth . I didnt know how to gauze the bandwidth connecting to my computer .
I could not trace the log of cbq and at the same time no idea how to account bandwidth for different ip ( different ruleset )

Any help in this regard will be appreciated,

Thanks,
eswari
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vsftpd - how to limit download bandwidth but unlimited upload bandwidth? mpls mikeg Linux - Software 3 08-13-2005 02:52 PM
Limit Bandwidth andy7t Linux - Networking 6 11-30-2004 03:44 AM
NistNet bandwidth limit help... sohocoffee2 Linux - Networking 1 07-30-2004 03:29 AM
apache Bandwidth Limit genexis Linux - General 0 02-18-2004 05:54 AM
bandwidth limit n_sergiu Linux - Networking 5 08-05-2003 06:02 AM


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

Main Menu
Advertisement
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 Google+: linuxquestions
Open Source Consulting | Domain Registration