Posted: Sun Nov 04, 2012 14:59 Post subject: Steps for Permanently limit Bandwidth of a PC using DD-WRT ?
I've just Flashed DD-WRT to my D-Link DIR-600 Router.. My only motive to flash DD-WRT was to Limit the Bandwidth of my roommate's PC on my network.. I have a 2mbps Broadband Connection(Bill paid by me) which is shared over my DIR-600 Wifi router..
My Broadband Plan has a 15GB full speed(2mbps) Download limit after which the speed would reduce to 256kbps..
So, i want to limit that specific PC of my roommate to a bandwidth of 512kbps permanently (even when my PC is switched off).. And only i should get the whole bandwidth of 2mbps on my PC and phone..
I've read a lot of DD-WRT QoS Tutorials but i still haven't found the proper steps to achieve all of this..??
you could create guess wifi network, give your housemate access to that and then restrict bandwidth
I have successfully implemented on this for a small company who hire out meeting rooms and wanted to provide wifi access but with limited bandwidth
as far as I know QoS on ddwrt doesnt work too well.
How to Set a guest account and limit its bandwidth??
Also, will it reduce the signal strength if we set Two wifi networks on a Single Channel Wifi Router..??
see attached document, this is done for a WAP (as in the router is connected via a cat6 cable to the main router that provides internet access). so you will need some changes on the iptables bit
see attached document, this is done for a WAP (as in the router is connected via a cat6 cable to the main router that provides internet access). so you will need some changes on the iptables bit
TCA="tc class add dev br1"
TFA="tc filter add dev br1"
TQA="tc qdisc add dev br1"
SFQ="sfq perturb 10"
tc qdisc del dev br1 root
tc qdisc add dev br1 root handle 1: htb
tc class add dev br1 parent 1: classid 1:1 htb rate 1024kbit
$TQA parent 1:1 handle 10: $SFQ
$TFA parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:1
iptables -t mangle -A POSTROUTING -d 192.168.100.0/24 -j MARK --set-mark 10
TCAU="tc class add dev imq0"
TFAU="tc filter add dev imq0"
TQAU="tc qdisc add dev imq0"
insmod imq
insmod ipt_IMQ
ip link set imq0 up
tc qdisc del dev imq0 root
tc qdisc add dev imq0 root handle 1: htb
tc class add dev imq0 parent 1: classid 1:1 htb rate 512kbit
$TQAU parent 1:1 handle 10: $SFQ
$TFAU parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:1
iptables -t mangle -A PREROUTING -s 192.168.100.0/24 -j MARK --set-mark 10
change subnet to reflect yours and also the upload bit doesnt work for some reason.. still investigating this issue.
Can you please tell me what are those two htb rates mentioned above( 1024kbit and 512kbit).??
Will these settings effect my main network which i would be using and, also does all these changes reversible(revert back to default settings)??
Last edited by varunmehta11 on Mon Nov 05, 2012 12:21; edited 1 time in total
Also.. Don't i need to add these lines in the iptables.??
iptables -I FORWARD -i br1 -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -m state --state NEW -j DROP
iptables -t nat -I POSTROUTING -o br0 -j SNAT --to `nvram get lan_ipaddr`
iptables -I INPUT -i br1 -m state --state NEW -j DROP
iptables -I INPUT -i br1 -p udp --dport 67 -j ACCEPT
iptables -I INPUT -i br1 -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i br1 -p tcp --dport 53 -j ACCEPT
yes you need to in order to restrict access to your main network. Also the above relates to the secondary router set up as a WAP - you will need to change the lan_ipaddress to wan_ipaddress.
Also.. Don't i need to add these lines in the iptables.??
iptables -I FORWARD -i br1 -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -m state --state NEW -j DROP
iptables -t nat -I POSTROUTING -o br0 -j SNAT --to `nvram get lan_ipaddr`
iptables -I INPUT -i br1 -m state --state NEW -j DROP
iptables -I INPUT -i br1 -p udp --dport 67 -j ACCEPT
iptables -I INPUT -i br1 -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i br1 -p tcp --dport 53 -j ACCEPT
yes you need to in order to restrict access to your main network. Also the above relates to the secondary router set up as a WAP - you will need to change the lan_ipaddress to wan_ipaddress.
Sorry to bother you.. As i'm a novice. Can you please tell me which lines from above do i have to add.? I have my Wifi router connected through a cat6 cable to an ADSL Modem..