LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 07-27-2005, 02:54 PM   #1
joeljkp
Member
 
Registered: Feb 2003
Distribution: Ubuntu
Posts: 41

Rep: Reputation: 15
Bandwidth throttling


I have a server here that I need to throttle back so it doesn't use up all my available bandwidth. Specifically, I need to limit all outbound traffic on eth0 to 100kbps. The server is running Debian Sarge.

I've looked up iproute2, and it looks like something I need, but I can't make any sense out of how to use it.

Anyone have a simple command line I can use to do this?
 
Old 07-27-2005, 03:27 PM   #2
SirGertrude
Member
 
Registered: May 2004
Location: Missouri
Distribution: Gentoo
Posts: 59

Rep: Reputation: 15
Yes, you will need iproute2 to do this. You may also need several options compiled in the kernel. I recommend looking over the Linux Advanced Routing & Traffic Control HOWTO for a better understanding of the topic.

If you simply want to limit an interfaces upstream bandwidth I would do it like this:

Code:
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root tbf rate 100kbit latency 100ms burst 1540
The first line cleans out the root qdisc on eth0, if this gives you a strange error message that is ok.

The second line creates a root qdisc for eth0 with a rate of 100 kbps. If any packet sits in the token bucket for more than 100 ms it will be dropped.
 
Old 07-27-2005, 04:22 PM   #3
joeljkp
Member
 
Registered: Feb 2003
Distribution: Ubuntu
Posts: 41

Original Poster
Rep: Reputation: 15
Great, this is exactly what I'm looking for.

Does this hold for all future sessions (after rebooting), or just until the next reboot? If just to the next reboot, must I run the del command again?
 
Old 07-28-2005, 12:15 PM   #4
SirGertrude
Member
 
Registered: May 2004
Location: Missouri
Distribution: Gentoo
Posts: 59

Rep: Reputation: 15
The setting is not permanent, if you reboot you will need to run the command again. If you never make changes you will never need to use the del command, I only included this to rule out problems that may have occurred if you had a root qdisc on that interface already.
 
Old 07-28-2005, 12:59 PM   #5
boostdemon
LQ Newbie
 
Registered: Jul 2005
Location: Northern VA USA
Posts: 7

Rep: Reputation: 0
this is what I used to set mine up to give priority to the VOIP system using shorwall and wondershaper:
http://www.my-opensource.org/howto/q...per-howto.html

good luck
 
  


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
bandwidth throttling z0mb1 Linux - Networking 4 11-27-2005 07:20 AM
bandwidth throttling greenmeanie Debian 1 07-10-2005 09:06 PM
Bandwidth Throttling... dolvmin Linux - Networking 3 09-21-2004 08:56 AM
Bandwidth Throttling chasingmytail Slackware 6 06-30-2004 10:38 AM
Bandwidth Throttling bg_27 *BSD 3 07-22-2003 08:09 PM


All times are GMT -5. The time now is 06:06 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 Google+: linuxquestions
Open Source Consulting | Domain Registration