Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need simple and accurate solution to limit bandwidth in wifi network for testing purpose.

Since it will be for testing it will be used with only one device. I do not need control per device (MAC address). I think control per interface would be sufficient.

I use this simple script to crate MASQUERADE:

#!/bin/bash

ptables --table nat -F

iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE

Devices connect through second wireless interface (wlan1). It have to be accurate at low speeds (for example wlan0 is connected to AP that is connected to 5Mbps network and I would like to limit it to 64 Kbps on wlan1).

One more think, it would be sufficient if it will work only with http protocol, so I'm also thinking about using some special http proxy then using something like HTB.

share|improve this question
    
similar question but Windows related: superuser.com/questions/16081/… –  Maciek Sawicki Nov 30 '10 at 8:09

1 Answer 1

You should be able to do it with tc...it's built into both linux distros I use. Here's a simple example with a 1 page explanation: http://www.linux.org/docs/ldp/howto/Adv-Routing-HOWTO/lartc.ratelimit.single.html You can match almost anything and throttle different classes differently if you like.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.