Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Long shot - anyone repaired a netgear router?

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Networking
Register FAQ Community Calendar

Limit bandwidth for secondary (guest) SSID?
Reply
 
Thread Tools
Old 19-01-2012, 19:48   #1
garmcqui
Inactive
 
Join Date: Feb 2010
Posts: 74
garmcqui is an unknown quantity at this point
Limit bandwidth for secondary (guest) SSID?

hi all,

I have set up a secondary SSID on my D-Link DIR-615 (DD-WRT build 14896) so that guests can log on easily when they're round.

That side of it's working fine, both SSID's are working. However, I want to limit the bandwidth on the guest SSID (br1) to 2mbps down/1mbps up (cable bandwidth is 20mbps/5mbps).

I've used the following code (found online) in the firewall command box:

Quote:
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
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 2048kbit
$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.2.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 1024kbit
$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.2.0/24 -j MARK --set-mark 10
iptables -t mangle -A PREROUTING -j IMQ --todev 0
And I'm achieving these results on Speedtest.net:

Private SSID:



Guest SSID:



Ok, now as you can see it is limiting the incoming bandwidth as requested, but not the outgoing, as the guest network is still achieving full upload speeds:

Any ideas what's wrong?

Thanks
garmcqui is offline   Reply With Quote
Advertisement
Old 20-01-2012, 19:27   #2
qasdfdsaq
cf.mega poster
 
Join Date: Aug 2004
Posts: 11,207
qasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronze
qasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronze
Re: Limit bandwidth for secondary (guest) SSID?

What's imq0 and why do you have it?
qasdfdsaq is offline   Reply With Quote
Old 20-01-2012, 19:39   #3
garmcqui
Inactive
 
Join Date: Feb 2010
Posts: 74
garmcqui is an unknown quantity at this point
Re: Limit bandwidth for secondary (guest) SSID?

no idea. Like I said, I just got this code off the net. But it seemed to work for the download, just not the upload...
garmcqui is offline   Reply With Quote
Old 20-01-2012, 22:35   #4
qasdfdsaq
cf.mega poster
 
Join Date: Aug 2004
Posts: 11,207
qasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronze
qasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronzeqasdfdsaq is cast in bronze
Re: Limit bandwidth for secondary (guest) SSID?

Well then. I'd suggest just using the buttons on the QoS page if you don't know what you're doing with the script

Ironically the QoS on dd-wrt has a reputation of being flakey and not behaving like you expect it to, yet configuring it via the web interface is one of the only ways of actually getting it to behave consistently.
qasdfdsaq is offline   Reply With Quote
Old 21-01-2012, 08:47   #5
garmcqui
Inactive
 
Join Date: Feb 2010
Posts: 74
garmcqui is an unknown quantity at this point
Re: Limit bandwidth for secondary (guest) SSID?

ok, am giving QOS another try, will let you know how I get on...

Thanks...
garmcqui is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:30.


Server: osmium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum