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.
@maxsteel

Everything looks correct.

Just for peace of mind, try redirecting 443 traffic into downloads (temporarily) and then perform a https dslreports speedtest to see if the rules work.

1) Either WAN port rules are not working on your router (works fine on my end)
or
2) Your nzb bulk transfer traffic is not on 563

Changed all 443 to Downloads. Dslreports test was directed to "web surfing" in downloading, and couldn't decide for the upload since it data transfer was divided between file transfer category and web surfing.

Does that state 86u as the culprit for the dysfunctional QoS?
 
Changed all 443 to Downloads. Dslreports test was directed to "web surfing" in downloading, and couldn't decide for the upload since it data transfer was divided between file transfer category and web surfing.

Does that state 86u as the culprit for the dysfunctional QoS?

Yes it seems like the WAN port rules are non functional on your setup.

Can you PM the output of "tc filter show dev br0" with the WAN port rules applied. I'd like to take a look at it.

As an alternative approach, go into appanalysis, find the app name that usenet is being identified as, use the appdb option in the script to correlate that app name with its mark, then redirect that mark instead of WAN ports.
 
Last edited:
1) I have this IP 192.168.2.8 in the Script. (Lines 92, 117 and 118)
Now from the IP 192.168.2.8 to 192.168.2.11 the game rule works.

2) Change the IP of the router:
Go to LAN -> LAN IP and change "IP Address" to 192.168.2.1

3) Add a static IP from ASUS WebUI to your consoles and that the number of each console is close Example:
Xbox1 IP 192.168.2.8
Xbox2 IP 192.168.2.9
PS4 IP 192.168.2.10
Nintendo IP 192.168.2.11

Follow this Guide to better understand how it works: ADVANCED QOS RULES


Notes: Go to LAN -> DHCP Server and change "IP Pool Starting Address" to 192.168.2.100, only Adds static IP from 192.168.2.2 to 192.168.2.99




I think Windows updates are in the download category, when I update to 1803 (RS4), I did not look at what category are the windows updates.


@maxsteel Try compatible version

Just a question, why do i have to use these IPs specifically? why can't i use the ones I provided? I already reserved them...
 
@FreshJR Really have to ask what IP tables are being modified at the end of the script, seems after resetting the router Upnp was being flaky till I installed the script again, then it works normal which is odd.
Also thank you for your hard work.
 
@FreshJR Really have to ask what IP tables are being modified at the end of the script, seems after resetting the router Upnp was being flaky till I installed the script again, then it works normal which is odd.
Also thank you for your hard work.

No iptables are being modified by me,

There are two iptables rules present for gaming but they are disabled/commented out by default.
Any iptables rules in the templates have ZERO effect outside the QOS system.

Any iptables changes are done by the QOS sytem/ASUS themselves.

You can do

Code:
iptables -S

before and after QOS and compare the changes.
 
No iptables are being modified by me,

There are two iptables rules present for gaming but they are disabled/commented out by default.
Any iptables rules in the templates have ZERO effect outside the QOS system.

If iptables is changing, then it has to be done by the QOS sytem/ASUS themselves.

You can do

Code:
iptables -S

before and after QOS and compare the changes.
Weird after qos says modifying download band with or rusles, it says something about IP tables rules being changed or modified, only with the script installed, Mabye it's probably because I have the highest logging level enabled lol I just realized that.

But on the good new side the script has been giving me amazing pings.
Also thanks again.
 
it says something about IP tables rules being changed or modified

Yes, that bit of the log states that the script is "executing" any user defined rules located under the function "iptables_up_rules".

By default that function has no active rules, so when gets executed it wont do anything.

It can run the two iptables and any other rules that users place in that location, but the gaming ones are commented out by default.
 
Last edited:
This might be a placebo, but I think after QOS is running for an extended period of time that QOS gets slightly (imperceptibly) slower.

Can someone who has 1week+ of QOS uptime, do a ping test, restart QOS and do another ping test?

In command prompt:
Code:
ping google.com -n 100

After the 100 samples are complete, only compare the before/after averages (dont care about max/min)


A discrepancy of 10ms+ should warrant adding a feature into the script restart QOS on either a daily or weekly basis.

--

A couple samples should suffice but by the time I am able to amass 4 samples it will take me a month.

This might be worth looking into.

If you are doing this testing, do it at off peak times so users streaming/downloading stuff on the network are not skewing the results.
 
Hi,

Can someone help me please, i know there is the traffic analyzer, but how would i know what a game is using as its default category?
I cant see the game im testing listed anywhere in the analyzer?
Star Citizen is the one i want to see what its being classed as?

thanks
 
Hi,

I cant see the game im testing listed anywhere in the analyzer?

If you don't see it's name, then it most likely isn't explicitly identified as a video game.

Either it is being mis-identified as something else or if you are seeing traffic in "general" then keep in mind that "general" in app analysis actually means unidentified (gotta love consistent names) which I then redirect into others. If you devices IP is part of the gaming rule then that "general" would be redirected into gaming instead of others.

If you do see traffic in ANY app analysis identifier, you can parse that traffics destination using new -appdb paramenter as explained in the third post. The function performs the hex conversion and cross references with TC filter show dev br0 in the background for you.

Currently I found that appdb supports 1 word queries searches but only since I forgot to include a set of parentheses to support multi word queries.

I don't feel like pushing a new revision just to support multi word queries since everything could be looked up with a partial 1word search.
 
Last edited:
EDIT: Not A QOS issue just don't know how to move to its own thread

I just switched from Tomato.... very impressed with adaptive QOS! I have an asus RT-68U running Merlin's 384.5 and FreshJR_fast_V1.

I have a VPN routing all traffic from one internal IP 192.168.1.242 through the VPN using Policy (strict).

When QOS is disabled and VPN is disabled all traffic is correctly displayed in the bandwidth monitor.

When QOS is disabled and VPN is enabled all traffic is shown as upload. However I can reach max speeds Up and Down from my ISP.

When QOS is enabled and VPN is disabled. All works excelent!

When the VPN and the QOS is enabled both with FreshJR and with the Standard QOS. This traffic shows up correctly as download in the QOS statistics. The Traffic is shown only as upload and the amount is equal to the actual amount of Ul/Dl traffic in the bandwidth monitor. The problem is that QOS maxes out this traffic based on the Upload limits only and does not take into account the download limits at all. therefore the actual speed is much lower. The CPU is around 6% and the load average is about 0.24-0.55.

Not sure where to go from here.
 
Last edited:
Hi,

With the current settings, i have the PS4 set IP as 192.168.2.8 but it was downloading system update, the traffic was going to Default and not gaming, whats the issue?

Also i was at the same time downloading iphone software via itunes the traffic was going to Video & Streaming...

Code:

${tc} filter add dev br0 protocol all prio $1 u32 match ip dst 192.168.2.8/30 match mark 0x80000000 0x80000fff flowid ${Ga$
${tc} filter add dev br0 protocol all prio $1 u32 match ip dst 192.168.2.9/30 match mark 0x80000000 0x80000fff flowid ${Ga$


iptables -D POSTROUTING -t mangle -o eth0 -s 192.168.2.8/30 -m mark --mark 0x40000000/0x4000ffff -j MARK --set-mark ${Gami$
iptables -A POSTROUTING -t mangle -o eth0 -s 192.168.2.9/30 -m mark --mark 0x40000000/0x4000ffff -j MARK --set-mark ${Gami$
 
With the current settings, i have the PS4 set IP as 192.168.2.8 but it was downloading system update, the traffic was going to Default and not gaming, whats the issue?

There is no issue. Game updates and downloads have been redirected AWAY from gaming and placed into Defaults as intended by the script. ("defaults" traffic also has been placed 1 category higher than the bottom user set category but this is not reflected in the UI )

This is intended so the "Gaming" category only has real gaming traffic.
Bulk Game/System updates should be low priority.

This has been explained in release notes, the script comments, re-explained in a few subsequent posts, AND other other users pointed again and some even linked my old posts. READ!!!

It gets tiring explaining the same thing over and over again. I am not customer service.
(@fearz this rant wasn't directed only at you, but I have been getting repeat questions for a while now)


New issues, discussion, bug reports, etc is all welcome.
Repeating the same thing over and over is detrimental to discussion. Common courtosy is to read the last 5-10 pages and see if you issues has been covered or you know ... at least the first 3 posts......

Feel free to disable that rule if you don't like it, but why would you want a file transfer to get low pings and as a result get high pings on web surfing/voip/etc instead? Just because its a game related download, doesn't mean it should get game traffic....

Not sure where to go from here.

The best I can do is white list that VPN tunnel traffic so it becomes zero rated in the upload category.
I do not have the knowledge to make that traffic appear in the correct corresponding "upload/download" sections as it should.

Other users had simpler requests, where wireless traffic was not showing up in QOS for some models, and ASUS didn't even issue a fix for that. I doubt they will take a serious look at this request.

While with whitelisting, the clients performance not be throttled, QOS will end up not working well since the zero rated traffic will make total network usage exceed QOS limits and you will end up getting bufferbloat.

---

Let me clarify the setup.

The router acts as a VPN client that is connected to a VPN server outside your local network.
When your specified local device connects to the router, all its traffic is actually ran through the VPN tunnel opened on the router.
This is done transparently so the client has no knowledge of the VPN.

Can you not setup the tunnel on the client so traffic would show up correctly?
 
Last edited:
Hello!
If someone have such problem:
kernel: HTB: quantum of class 100** is big. Consider r2q change.

Then just add "quantum" option to 'FreshJR_QOS file", in "custom_rates" section.

'Quantum 60000' - for 100mbp/s isp
'Quantum 180000' - for 300mbp/s isp
etc..

EXAMPLE:
custom_rates() {
echo "Modifying Class Rates"
${tc} class change dev br0 parent 1:1 classid 1:10 htb ${PARMS}prio 0 rate ${DownRate0}Kbit ceil ${DownCeil}Kbit burst ${DownBurst0} cburst ${DownCburst0} quantum 180000
${tc} class change dev br0 parent 1:1 classid 1:11 htb ${PARMS}prio 1 rate ${DownRate1}Kbit ceil ${DownCeil}Kbit burst ${DownBurst1} cburst ${DownCburst1} quantum 180000
${tc} class change dev br0 parent 1:1 classid 1:12 htb ${PARMS}prio 2 rate ${DownRate2}Kbit ceil ${DownCeil}Kbit burst ${DownBurst2} cburst ${DownCburst2} quantum 180000
${tc} class change dev br0 parent 1:1 classid 1:13 htb ${PARMS}prio 3 rate ${DownRate3}Kbit ceil ${DownCeil}Kbit burst ${DownBurst3} cburst ${DownCburst3} quantum 180000
${tc} class change dev br0 parent 1:1 classid 1:14 htb ${PARMS}prio 4 rate ${DownRate4}Kbit ceil ${DownCeil}Kbit burst ${DownBurst4} cburst ${DownCburst4} quantum 180000
${tc} class change dev br0 parent 1:1 classid 1:15 htb ${PARMS}prio 5 rate ${DownRate5}Kbit ceil ${DownCeil}Kbit burst ${DownBurst5} cburst ${DownCburst5} quantum 180000
${tc} class change dev br0 parent 1:1 classid 1:16 htb ${PARMS}prio 7 rate ${DownRate6}Kbit ceil ${DownCeil}Kbit burst ${DownBurst6} cburst ${DownCburst6} quantum 180000
${tc} class change dev br0 parent 1:1 classid 1:17 htb ${PARMS}prio 6 rate ${DownRate7}Kbit ceil ${DownCeil}Kbit burst ${DownBurst7} cburst ${DownCburst7} quantum 180000

${tc} class change dev eth0 parent 1:1 classid 1:10 htb ${PARMS}prio 0 rate ${UpRate0}Kbit ceil ${UpCeil}Kbit burst ${UpBurst0} cburst ${UpCburst0} quantum 180000
${tc} class change dev eth0 parent 1:1 classid 1:11 htb ${PARMS}prio 1 rate ${UpRate1}Kbit ceil ${UpCeil}Kbit burst ${UpBurst1} cburst ${UpCburst1} quantum 180000
${tc} class change dev eth0 parent 1:1 classid 1:12 htb ${PARMS}prio 2 rate ${UpRate2}Kbit ceil ${UpCeil}Kbit burst ${UpBurst2} cburst ${UpCburst2} quantum 180000
${tc} class change dev eth0 parent 1:1 classid 1:13 htb ${PARMS}prio 3 rate ${UpRate3}Kbit ceil ${UpCeil}Kbit burst ${UpBurst3} cburst ${UpCburst3} quantum 180000
${tc} class change dev eth0 parent 1:1 classid 1:14 htb ${PARMS}prio 4 rate ${UpRate4}Kbit ceil ${UpCeil}Kbit burst ${UpBurst4} cburst ${UpCburst4} quantum 180000
${tc} class change dev eth0 parent 1:1 classid 1:15 htb ${PARMS}prio 5 rate ${UpRate5}Kbit ceil ${UpCeil}Kbit burst ${UpBurst5} cburst ${UpCburst5} quantum 180000
${tc} class change dev eth0 parent 1:1 classid 1:16 htb ${PARMS}prio 7 rate ${UpRate6}Kbit ceil ${UpCeil}Kbit burst ${UpBurst6} cburst ${UpCburst6} quantum 180000
${tc} class change dev eth0 parent 1:1 classid 1:17 htb ${PARMS}prio 6 rate ${UpRate7}Kbit ceil ${UpCeil}Kbit burst ${UpBurst7} cburst ${UpCburst7} quantum 180000
}

2018_05_18_12_10_32.png
 
Hello!
If someone have such problem:


Then just add "quantum" option to 'FreshJR_QOS file", in "custom_rates" section.

Why make quantum smaller? I wouldn't recommend it.

Imagine bandwidth as a pile of sand.
Quantum is the size of your shovel for traffic allocation.

It is saying your shovel is pretty big. You might want to consider a smaller one.

A smaller shovel will use more CPU power..

--

We are okay with using big shovels since we have fast internet. We can ignore the recommendation.

This error message was during the time of WAY slower connections since if you have a small pile of sand, you dont want a big shovel.
 
Last edited:
Why make quantum smaller? I wouldn't recommend it.

Imagine bandwidth as a pile of sand.
Quantum is the size of your shovel for traffic allocation.

It is saying your shovel is pretty big. You might want to consider a smaller one.

A smaller shovel will use more CPU power..

--

We are okay with using big shovels since we have fast internet. We can ignore the recommendation.

This error message was during the time of WAY slower connections since if you have a small pile of sand, you dont want a big shovel.
So there's no way to have a dynamic quantum that's calculated based off the inputted bandwidth values?
 
Why make quantum smaller? I wouldn't recommend it.

Imagine bandwidth as a pile of sand.
Quantum is the size of your shovel for traffic allocation.

It is saying your shovel is pretty big. You might want to consider a smaller one.

A smaller shovel will use more CPU power..

--

We are okay with using big shovels since we have fast internet. We can ignore the recommendation.

This error message was during the time of WAY slower connections since if you have a small pile of sand, you dont want a big shovel.

Yes you are right. After series of testings I'm noticed that download speed decreased, so reverted back..
 
Status
Not open for further replies.

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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