Bandwidth throttling

What's the easiest way (in Linux) to throttle the bandwidth (both in and out) on a Linux box.

I have a test server running on a T1 line (remember when that was HUGE?).

From 9-6 Monday-Friday, I need to limit the total bandwidth on eth0 to 256kbps in / 256kbps out. After that it's share and share alike with their other 3 servers on that T1.

Normally I'd set it up on a separate interface on the Router and limit it there, but that's not a option in this setup.


//sorry if non-Linode VPS questions are not allowed in this forum - if that's the case - delete away//

2 Replies

I haven't done it myself, but I think you basically just need to implement QOS/traffic shaping on those interfaces according to the rules you desire.

Not sure if you can embed the time parameters or not, but worst case you could just schedule a task to adjust the parameters around the weekday schedule.

Note that shaping can only effectively be implemented during outbound packet processing, so for the inbound path you'd do it on the output interface to the test server.

Googling for linux traffic shaping should show up various references. Though a bit dated, I think the advanced routing & traffic control howto is still relevant as well (for example, might be a place to start).

– David

Well, you can treat your inbound pipe like it's a 256kbps connection, and TCP streams will slow themselves down to adapt, but there's nothing you can do to stop protocols without congestion control from consuming more than that.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct