QoS Assistance on TP-Link WR1043ND

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
Bascotie
DD-WRT Novice


Joined: 17 Mar 2008
Posts: 26

PostPosted: Fri Apr 26, 2013 4:50    Post subject: QoS Assistance on TP-Link WR1043ND Reply with quote
Router: TP-LINK WR1043ND Atheros based
Build: V24SP2 STD (came out today 4/25/2013)build 21061
AR9132


Hi guys,

I read the wiki link on setting up QoS and have all the basic settings done, but I'm starting to think my case is a bit different.

In my case, using MAC based QoS does not quite work since I have a constant stream of pc's being fixed here with different mac addresses (and windows update bogs down the network!)

My download speed is about 20MBps
My upload speed is about 2MBps

What I wanted to do was tell the WHOLE network to only allow about 15MBps to any one person at a time, while keeping the extra 5MBps as 'reserve' (so if one client is downloading, say, Windows 7 SP1, the other clients still have some bandwidth to work off of")

Is there a setup I can use to accomplish this? Thank you
Sponsor
Mile-Lile
DD-WRT User


Joined: 24 Feb 2013
Posts: 320
Location: Belgrade

PostPosted: Fri Apr 26, 2013 6:28    Post subject: Reply with quote
set Static Lease which wil bind IP and MAC, in QoS put httpdownload and ftp to bulk class...
if you want hardcore bandwidth limiting you can use Rober Mytkowski Script Generator (use google to find it) to help you with a CLI commands...
tatsuya46
DD-WRT Guru


Joined: 03 Jan 2010
Posts: 1551
Location: Winnipeg, Canada

PostPosted: Fri Apr 26, 2013 9:02    Post subject: Reply with quote
Give a screenshot so i can see what type of qos that unit has cause sadly dd-wrt qos is NOT consistent across units as it should be.. also update to r21233 not r21286 as that has a qos bug causing reboots randomly, next build after r21286 will have that fixed.
_________________
[BROADCOM] Linksys E3000 -------------> DD-WRT v24-sp2 (05/27/13) mega(k3.x) - build 21676 **BRICKED**
[ATHEROS] TP-LINK TL-WDR4900 v1.3 --> DD-WRT v24-sp2 (04/18/14) std - build 23919
[ATHEROS] NETGEAR WNDR3700 v1 ----> DD-WRT v24-sp2 (04/18/14) std - build 23919
[ATHEROS] D-Link DIR-825 B1 ----------> DD-WRT v24-sp2 (04/18/14) std - build 23919

Atheros Wi-Fi Settings Wiki --> http://www.dd-wrt.com/wiki/index.php/Atheros/ath_wireless_settings

LATEST FIRMWARE(S) --> ftp://dd-wrt.com/betas/
Bascotie
DD-WRT Novice


Joined: 17 Mar 2008
Posts: 26

PostPosted: Fri Apr 26, 2013 17:21    Post subject: Reply with quote
Thanks guys.

The only build I see is 21061 (latest I mean)

Here is a screenshot of the short and sweet QoS page:



Will the 2nd post's commands still work with this?
tatsuya46
DD-WRT Guru


Joined: 03 Jan 2010
Posts: 1551
Location: Winnipeg, Canada

PostPosted: Fri Apr 26, 2013 21:22    Post subject: Reply with quote
No that will cause more problems.. by reading what you want & with the qos type you have this is simple, and the latest firmwares are bolded right in my signature thats where they all go the main site is outdated..

-do not use mac erase any entries you have in there
-use hfsc + fq_codel with port set to wan
-set max up/download limits accordingly, lets say if you have a 20mbps down 2mbps up rated line while you actually get 19.9mbps down & 1.9mbps up enter 19.75mbps down & 1.8mbps up or so (make sure its in KBPS FORM!) The top most values are GLOBAL LIMITS for the entire network, see below to enforce the limits you mentioned you wanted.
-if your network subnet is 192.168.1.1/24, under netmask enter 192.168.1.0 "24" after the /. Then limit that entry to the values you desire 15mbps down & whatever up? That will limit *ALL* clients on that 192.168.1.x subnet to that limit & is shared. I believe to have it individually PER CLIENT, if its fixed now, is 192.168.1.1 with "0" after the / instead. Try both & see which is more what you want, one of them will be for sure (do not enter both of those entries at once!).

Also check all of the boxes for tcp packet prioritization.

_________________
[BROADCOM] Linksys E3000 -------------> DD-WRT v24-sp2 (05/27/13) mega(k3.x) - build 21676 **BRICKED**
[ATHEROS] TP-LINK TL-WDR4900 v1.3 --> DD-WRT v24-sp2 (04/18/14) std - build 23919
[ATHEROS] NETGEAR WNDR3700 v1 ----> DD-WRT v24-sp2 (04/18/14) std - build 23919
[ATHEROS] D-Link DIR-825 B1 ----------> DD-WRT v24-sp2 (04/18/14) std - build 23919

Atheros Wi-Fi Settings Wiki --> http://www.dd-wrt.com/wiki/index.php/Atheros/ath_wireless_settings

LATEST FIRMWARE(S) --> ftp://dd-wrt.com/betas/
Bascotie
DD-WRT Novice


Joined: 17 Mar 2008
Posts: 26

PostPosted: Fri Apr 26, 2013 22:33    Post subject: Reply with quote
Thanks Tatsuya! beautiful write up

I tried looking at the link to the downloads in your signature, but the latest 1043ND is 4-15, I think the one on the site was 4-25?

Anyway, seems like we can accomplish it with the current firmware so I'll give it a shot and let you know how it goes. thanks again!

UPDATE:

Here's how it looks. Unfortunately in the netmask section I cannot specify by speed, only 'class' (exempt, premier, etc)

Bascotie
DD-WRT Novice


Joined: 17 Mar 2008
Posts: 26

PostPosted: Mon Apr 29, 2013 4:40    Post subject: Reply with quote
I haven't run a true test yet, but I had a concern about this setup .

If we're telling the WAN link to let in the full amount, but then telling the internal LAN to only allow, say, 80-90% of that, isn't that the same as telling the WAN link to let in 80-90% of total bandwidth and not specifying anything for the lan itself?

In the end, you could have 20MBps coming in on the WAN, but if something is downloading at full speed on the network, it'll just take the 80%-90% that we assigned to the LAN and the extra 10% left over will not be able to get used anyway?

Just checking on this, maybe I'm understanding it incorrectly, as well
Bascotie
DD-WRT Novice


Joined: 17 Mar 2008
Posts: 26

PostPosted: Mon May 20, 2013 19:49    Post subject: Reply with quote
Bump.

The above method did not work. Thank you for trying to help, though. Anyone know of another method that will allow FULL bandwidth through WAN, BUT limit total bandwidth being used by a single download, client, etc?

Example: If Windows update is running, I don't want it taking up the full 20MBps, I want to have a leeway of about 5MBps, so if there's a download on one machine, it still leaves 5MB/sec for other clients to surf the web, stream, vonage, etc
correzpond
DD-WRT Novice


Joined: 11 Jun 2011
Posts: 13

PostPosted: Tue Jun 04, 2013 14:04    Post subject: Qos Reasonably stable on WNDR3700v1 under v21286 Reply with quote
I finally got QoS working last week on my WNDR3700v1 with DD-WRTv21286. My objective was to priorize video streaming over my ATH1 5GHz network to 3 loungeroom connected devices as 'premium'and depriortize to 'bulk' any bittorrent downloads that might be in progress on ethernet attached PCS. Initially I tried prioritizing the video streaming devices (WDTVLIVE x2, Sony TV and SonyBluRay) by their Mac address, and deprioritising utorrent to 'bulk'by port range. This proved both unstable for the Mac Addresses and problematic for the uTorrent Port Range (i.e. since utorrent can use 100's of ports often overlapping other services such as Http for downloading. What has worked and remained stable over the past week is prioritising the video devices by IP address instead of Mac address as 'Premium' and de-prioritising bittorrent as 'Bulk' based on the predefined Layer7 service. I also added service exemptions for HTTP and HTTPS (is classified these services as 'Premium') and a couple of additional IP defined exceptions for two Laptops (as 'Express') so that these services & machines can largely avoid the war between streaming video and bittorrent. Now uTorrent can be hurtling along at 6000kpbs but will reliably throttle down to 40=60 kbps when HD Video is streaming to any of the other devices which are prioritised vis their IP address while allowing HTTP/HTTPS browsing services & high-priority laptops to function at acceptable speeds across the network.
correzpond
DD-WRT Novice


Joined: 11 Jun 2011
Posts: 13

PostPosted: Tue Jun 04, 2013 15:15    Post subject: Try adding a block of ''Premium' dynamic P Addresses Reply with quote
In answer to Bascotie's original question I would have thought that similar to Mile-Lile's suggestion, that setting services for httpdownload and ftp to 'bulk' (1-100%) was a good start since all other unspecified connections should operate above this as 'standard' (5-100%) by default assuring that they always had a higher priority than http or ftp downloads.

However if you were to use dynamic DHCP assignment to assign IP address to the prioritised machines being repaired in the range 192.168.1.50 to 192.168.1.100 (for example) as they were connected, you could you add this address range in a condensed block using the CIDR notation as required by QoS for Prioritizing by IP using either 'Premium' or 'Exempt' priority. Although multiple connected machines are likely to play together more nicely if they each understand that there bandwidth limits (i.e. if 'Premium' priority is used across of this block of IP addresses instead of 'Exempt').

192.168.1.50/31 "Premium"

192.168.1.52/30 "Premium"

192.168.1.56/29 "Premium"

192.168.1.64/27 "Premium"

192.168.1.96/30 "Premium"

192.168.1.100/32 "Premium"

References http://www.dd-wrt.com/wiki/index.php/Quality_of_Service and http://ip2cidr.com/
correzpond
DD-WRT Novice


Joined: 11 Jun 2011
Posts: 13

PostPosted: Tue Jun 04, 2013 15:28    Post subject: dding a block of ''Premium' dynamic P Reply with quote
Unfortunately just re-reading the precedence of QoS commands, netmask (IP) QoS specifications always take precedence over service QoS specifications, so any http and ftp download services running on the specified machines 192.168.1.50 - 192.168.1.100 are likely to be superseded by their netmask specification and therefore operate as 'premium' priority instead of 'bulk'.
Mile-Lile
DD-WRT User


Joined: 24 Feb 2013
Posts: 320
Location: Belgrade

PostPosted: Tue Jun 04, 2013 19:25    Post subject: Reply with quote
No, you misunderstood everything. Netmask Priority QoS is for prioritizing subnets. For example: If you have 192.168.2.1/24 and 192.168.88.1 (yours Guest network -VAP) you will
use Netmask Priority QoS. Like this:

Othervise use MAC Priority.
For me, ddwrt QoS works perfect. Here is my setup, maybe it will help someone.
First of all, you must set proper your BT client (utorrent for example).

If you use adsl set maximum upload rate to 10kbit/s


Now, you have to disable teredo connections since you wont need it in LAN it will just saturate routers CPU. In windows, run this commands in cmd:
netsh
interface
teredo
set state disabled

On NAT/QoS/ tab set like this:

On Administration tab set like this:

On NAT/QoS/UPnP tab eneable UPnP (it is not security risk dont worry)

If you have someone on your LAN that uses alot of torrents and you can`t teach him about discipline you can limit his number of tcp/udp connections from iptables.
First, set him Static Lease (Services tab\Services\Add Static Lease). In that way DHCP will bind IP for his MAC. Then in Administration\Command these two line Save as Firewall
Rule:
iptables -t nat -I PREROUTING -p tcp --syn -s 192.168.x.x -m limit --limit-burst 150 -j DROP
iptables -t nat -I PREROUTING -p ! tcp -s 192.168.x.x -m limit --limit-burst 100 -j DROP

Ofcourse x.x change with last octet number of his IP:)

_________________
TP-Link TL-WR841ND v3 SVN revision 23919
ftp://dd-wrt.com/betas/2014
correzpond
DD-WRT Novice


Joined: 11 Jun 2011
Posts: 13

PostPosted: Wed Jun 05, 2013 9:16    Post subject: Reply with quote
I don't think we are talking the same language on prioritizing by IP Address using CIDR notations Mile-Lile but that isn't really an issue as long as what we are using works. Interesting to see your QoS settings with uTorrent. In my experience it is really only necessary to ensure that bittorrent protocol encryption (i.e. your 3rd uTorrent screenshot) is disabled so that the outgoing uTorrent stream can be read by the bittorrent layer7 service QoS rule. And even this probably isn't necessary if you are only concerned with throttling inbound data since encryption on inbound data is controlled by the sender. Also while port-forwarding to a nominated port (e.g. 60000 in your example) might help uTorrent's own handling of inbound connections, it's important to understand that this designated port is only used by uTorrent for incoming connection requests and that uTorrent will mostly work quite well whether this port is forwarded or not. For example if you run "cmd>netstat -a" on a machine running uTorrent you will see that uTorrent actually uses a whole range of ports typically from 1024 to 65535. This is why I found it easier to throttle uTorrent by applying the bittorent layer7 service rule (i.e. the same as you have done) instead of attempting to pre-empt the port ranges it would use and then limit it by a custom port range rule. I also haven't found it necessary to limit the number of tcp/udp connections for individual uTorrent users, or for that matter apply any particular controls on individual uTorrent clients other than specifying the bittorrent service QoS rule in the router. For example I have uTorrent running on 2 machines in my network and QoS will automatically throttle the utorrent clients from full incoming bandwidth (around 600kbps downloading combined) to a trickle of 40-50 kpbs (or less) if a prioritised service or client is running.
Mile-Lile
DD-WRT User


Joined: 24 Feb 2013
Posts: 320
Location: Belgrade

PostPosted: Wed Jun 05, 2013 12:32    Post subject: Reply with quote
you are right, but I have other problems. When I only use service prioritizing, it limits bandwith, but huge numbers od tcp/udp connections saturate my CPU to 100% and than LAN is very slow... I have weak cpu 400mhz...
_________________
TP-Link TL-WR841ND v3 SVN revision 23919
ftp://dd-wrt.com/betas/2014
correzpond
DD-WRT Novice


Joined: 11 Jun 2011
Posts: 13

PostPosted: Wed Jun 05, 2013 13:41    Post subject: oS Reply with quote
Yes I have read that the bitorrent Layer7 service QoS rule can slow down a router handling significant torrent traffic because the router has to inspect every packet, however I haven't noticed any significant performance drop on my WNDR3700 with QoS enabled vs. disabled.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum