Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have DD-WRT installed on my router and I would like to be able to restrict the bandwidth both up and down on a certain IP or Mac address. I am happy to get my hands dirty and use console.

I am sure that iptables can do this? If so could someone show me a quick example?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Well, unfortunately I haven't found a simple way to do this otherwise I would give you some examples; however, the tc command will do what you need.

Tc is a traffic shaping utility that is built into the Linux kernel. Be prepared, it isn't for the faint of heart. I recommend doing a good bit of reading about the queuing disciplines before starting.

At the least, this should give you somewhere to start:

http://www.dd-wrt.com/wiki/index.php/Tc_command

EDIT:

From that page, this link claims to have a "simple" answer:

http://lartc.org/howto/lartc.ratelimit.single.html

share|improve this answer

You can use the tc command to accomplish this. If you'd like to rate-limit a single host, there's a quick guide here:

Rate limiting a single host or netmask

If you'd like a more comprehensive setup (for example, to guarantee prioritized traffic to VoIP), DD-WRT's supports setting up QoS rules directly via its user interface. Look here:

Quality Of Service

This link from the tc creators provides a great overview of traffic shaping using their tool, which is worth a read:

The Ultimate Traffic Conditioner: Low Latency, Fast Up & Downloads

share|improve this answer

One way to do this is by placing the device in the bulk class using QoS via the web GUI then rate limiting that entire class using a cron job.

http://hardwareinsights.com/wp/2011/04/28/optimizing-your-internet-usage-with-the-qos-functionality-of-dd-wrt/

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.