What's new

[Release] FreshJR Adaptive QOS (Improvements / Custom Rules / and Inner workings)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
Currently https traffic from google drive is hitting 0x800d & https version of dslreports is hitting 0x8013.

This grep filter works great to compare success hits upon fresh QOS restart with low traffic.

Code:
tc filter show dev br0 | grep "mark" | grep -v "success 0"

Also I made a typo in script v382.2. Ninja edit incoming.

Here is 382.2 again, with typo fixed.
https://pastebin.com/pA10JSXT
I am using this script on my RT-AC88U with the Merlin 382.2 Beta 2 firmware. It seems to work pretty well. Do you know if the script will work with the upcoming Merlin 384.3 builds? Thanks.
 
I am using this script on my RT-AC88U with the Merlin 382.2 Beta 2 firmware. It seems to work pretty well. Do you know if the script will work with the upcoming Merlin 384.3 builds? Thanks.

Usually the script works through many releases. Just try it and see.
 
For some reason my https traffic is getting collected against 0x8014, not 0x8013. So, I've had to change this line in FreshJR's script:

Code:
${tc} filter add dev br0 protocol all prio 22 u32 match mark 0x80130000 0xc03f0000 flowid ${Web}

to:

Code:
${tc} filter add dev br0 protocol all prio 22 u32 match mark 0x80140000 0xc03f0000 flowid ${Web}

Now, all my https downloads are getting recognized as web traffic instead of net control packets.
 
dsl reports with https is in "net control" with this update, too. Rest is working fine here ;-)
thank you
 
Something weird is happening on my end. Since I installed the script, my Core1 CPU is always at 100% non stop. Temperature is rising above 80C on CPU :(.

Edit: For some reason, my /jffs wasn't working in ssh. I restarted the router (well, even that didn't work, interface was saying it was restarting but it wasn't, I had to remove power) and now it's working fine with latest 382.3 version. Don't know what was going on
 
Last edited:
Sorry @Nodiaque, could not replicate that issue.

Did you check you system log to see if Adaptive QOS was stuck in a loop. It really shouldn't be able to get stuck like that.

You can run a "top" command in putty to pull up a process task manager. That one will show cpu usage by application.

To exit you press "q" while viewing the live stats.

NOTE: DO NOT FORGET TO EXIT. DO NOT CLOSE PUTTY AND ASSUME THE "TOP" TASK MANAGER WILL AUTO EXIT.

Since it wont, and it will continue to eat resources while you are not using it.
 
I think it was because of the logging. The /Jffs partition was corrupted, couldn't even browse with putty. When I tried to reboot the router, didn't work, I had to remove power from it. I had logging on Debug left on for the past week, maybe that broke something. After the restart, everything was back to normal.

On a side note, would there be something to force torrent traffic to be transfer category? Because it get tagged as others:
upload_2018-1-20_14-23-1.png


Clearly I dodn't do 32gb of others ;)
 
Torrents have been covered before.

Either create a rule for their assigned port range or open your client and make it mark its packets with a dsp mark and create a rule for that dsp mark.

Examples of dsp mark are buried in this thread.

Port range rule templates are included with the script.
 
I though about setting a GPO to mark utorrent traffic. Problem is, it ask me for a DSCP value from 0 to 64 and I don't know what to input. I tried to understand the meaning vs the script for download category but I don't get the correlation.
upload_2018-1-20_19-23-15.png
 
I though about setting a GPO to mark utorrent traffic. Problem is, it ask me for a DSCP value from 0 to 64 and I don't know what to input. I tried to understand the meaning vs the script for download category but I don't get the correlation.
View attachment 11640

No correlation to category.

You need to create a new tc filter rule. This rule will be placed in the custom rule section. It will identify packets with your chosen dscp mark. Feel free to search this thread of TOS or DSCP mark since I 100% posted an example rule here before. I don't know it off the top of my head anymore, and don't want to research again.

It's not a common rule, so I didn't include it in the templates.

Or if you dont' want to do that. Just use create a rule for a port range (its a little easier since the templates are present in the script and need minimal changes, so you dont have to search at all).

Also what is GPO? Microsoft group policy editor?? Utorrent should have its own setting built into the app.
 
No correlation to category.

You need to create a new tc filter rule. This rule will be placed in the custom rule section. It will identify packets with your chosen dscp mark. Feel free to search this thread of TOS or DSCP mark since I 100% posted an example rule here before. I don't know it off the top of my head anymore, and don't want to research again.

It's not a common rule, so I didn't include it in the templates.

Or if you dont' want to do that. Just use create a rule for a port range (its a little easier since the templates are present in the script and need minimal changes, so you dont have to search at all).

Also what is GPO? Microsoft group policy editor?? Utorrent should have its own setting built into the app.

As an aside, if you are using Windows, you may need to specifically configure Windows to allow your application to set the DSCP on outgoing traffic as well as choosing the code point in uTorrent. You can confirm if uTorrent is successfully setting the values by inspecting the outgoing packets using Wireshark (or tcpdump ...)
/dedd
 
I'm unsure what I'm suppose to check in that though.

If using port, is that rule because in the script, it says to check in thread and in thread, unless I don't get how to search, I don't see the rule for port range:

${tc} filter add dev eth0 protocol all prio 1 u32 match ip sport 20000:22000 0xffff flowid ${Downloads}

?

THank you
 
I'm unsure what I'm suppose to check in that though.

If using port, is that rule because in the script, it says to check in thread and in thread, unless I don't get how to search, I don't see the rule for port range:

${tc} filter add dev eth0 protocol all prio 1 u32 match ip sport 20000:22000 0xffff flowid ${Downloads}

?

THank you

I suspect that's not correct. The range is specified simply with the port value and the mask. There is some useful info here:

https://serverfault.com/questions/231880/how-to-match-port-range-using-u32-filter

Not sure whether the version of tc in the ASUS firmware supported extended match. Try it in cli and see. Otherwise you can manage with u32 port mask - assuming you can constrain uTorrent to a port range.
 
No problem for utorrent, I was already using custom QoS rules in TomatoWRT. My uTorrent is set to not used nat-pnp and upnp and a specific port range. I'll check that and manage to find something that work. Thank you
 
I just tried with the exemple of iptables to simply mark the port, and I'm getting error

########:/tmp/home/root# iptables -D POSTROUTING -t mangle -o eth0 -s 0:32000-32400/0 -j MARK --set-mark 0x40030001
iptables: No chain/target/match by that name.
 
ok I think I got it:
${tc} filter add dev eth0 protocol all prio 1 u32 match ip dport 27222 0xffff flowid ${Downloads} # utorrent
${tc} filter add dev eth0 protocol all prio 1 u32 match ip dport 32000 0xff00 flowid ${Downloads} # utorrent
${tc} filter add dev eth0 protocol all prio 1 u32 match ip dport 32256 0xffb0 flowid ${Downloads} # utorrent
${tc} filter add dev eth0 protocol all prio 1 u32 match ip dport 32384 0xfff0 flowid ${Downloads} # utorrent

port 27222 and port 32000:32400
also put the sport rules mathing.

Question thoguh, prio 1, what does it refer to? Because all the other rules have pro 2 or 22, so I'm unsure if 1 is the good one
 
ok I think I got it:
${tc} filter add dev eth0 protocol all prio 1 u32 match ip dport 27222 0xffff flowid ${Downloads} # utorrent
${tc} filter add dev eth0 protocol all prio 1 u32 match ip dport 32000 0xff00 flowid ${Downloads} # utorrent
${tc} filter add dev eth0 protocol all prio 1 u32 match ip dport 32256 0xffb0 flowid ${Downloads} # utorrent
${tc} filter add dev eth0 protocol all prio 1 u32 match ip dport 32384 0xfff0 flowid ${Downloads} # utorrent

port 27222 and port 32000:32400
also put the sport rules mathing.

Question thoguh, prio 1, what does it refer to? Because all the other rules have pro 2 or 22, so I'm unsure if 1 is the good one

good catch. The template rules have not been updated. All custom rules have to be prio2.

This is due to layout changes in 382+ firmwares.

(Well prio1 will work, but prio2 will be slightly more efficient)
 
Ok. Something I saw that is weird, on the statistic page, the download portion doesn't reset properly:

upload_2018-1-23_14-33-27.png


I think it's more a firmware related issue though. I toggle QoS on/off and the upload got reset. I have to check now if others still get all the bandwidth on download like I see here, which doesn't happen on upload
 
Status
Not open for further replies.

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top