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.
Is this compatible with 384.6 / AC3200? When using a VPN client I assume the VPN Client exceptions still need to be implemented and if so can i enter a single address if I only have one redirected IP for a client...
e.g.
iptables -D POSTROUTING -t mangle -o br0 -d 192.168.2.100 -j MARK --set-xmark 0x80000000/0xC0000000 &> /dev/null
iptables -A POSTROUTING -t mangle -o br0 -d 192.168.2.100 -j MARK --set-xmark 0x80000000/0xC0000000

Thanks...
 
Last edited:
Is this compatible with 384.6 / AC3200?

Assume maintained compatibility with new firmware releases. It is rare that a firmware update breaks compatibility.

if I only have one redirected IP for a client...
e.g.
iptables -D POSTROUTING -t mangle -o br0 -d 192.168.2.100 -j MARK --set-xmark 0x80000000/0xC0000000 &> /dev/null
iptables -A POSTROUTING -t mangle -o br0 -d 192.168.2.100 -j MARK --set-xmark 0x80000000/0xC0000000

Thanks...

Correct but append the /32 even when dealing with one client. I don’t think the omitting the CIDR range is an issue with iptables for a single client, but it doesn’t hurt.
 
Last edited:
Some simplification to the install instructions is comming.

1) Fast version is getting discontinued (it is still working as expected but will simply be removed as an option ).

The reason that it was created to primarily allow the the configuration of cascaded HTB’s for an even better QOS setup, but this feature was never realized so there is not much reason for keeping it besides eliminating the 5min wait.

2). A one line install for users who want only default parameters and no custom rules. (I didn’t find the existing 5 line procedure confusing ... but **shrugs**)

The one line install will still require ssh.

3). Can anyone confirm custom IP/port rules working correctly on the AC86U?

This is in reference to this bug.

https://www.snbforums.com/threads/r...-and-inner-workings.36836/page-85#post-417103

If they are not working on any AC86U, I will only leave the alternative version as the only version going forward for compatability reasons.)

I do prefer the current compatible version since I believe it is more cpu efficient, but for simplicities sake, it might have to be discontinued, as many people are getting confused if there is more than one version available.

---

Feedback of which install instructions seem vague/unclear would also be good. I don’t see where the issue lies with them as is.

---

Next I have a question on the custom gaming rule.

Should I leave it enabled by default applying to devices between 192.168.2.100 - 196.168.2.103?

This small range enabled by default means a non gaming device will only have a 2% chance of overlap by placing into that ip range without an explicit dhcp assignment, but realistically if you cannot uncomment a rule with a picture guide, can you even assign static IP’s?
 
Last edited:
Fresh , I think your instructions are just fine. Why bother changing for the lowest common denominator? There will always be someone out there genetically challenged
 
Fresh , I think your instructions are just fine. Why bother changing for the lowest common denominator? There will always be someone out there genetically challenged

I think that the issue doesn’t lie in the instructions being hard to understand, but rather that they are intimidating.

Simplifying the process a little more can bring more users who are having issues with QOS to give QOS another shot before dismissing QOS entirely.

The third post is extremely techical, but it is listed as the advanced section for a reason. It is present to consolidate all the information you need to see what each cryptic part of a custom rule is doing without needed to google all over the place.

The advanced section is for advanced users!! The default configuration is great as is. The additional flexibility the advanced section offers is icing on the cake for the users who need it. I have seen many users take on these advanced configuration options.

@joe scian, For example, reading post.

https://www.snbforums.com/threads/a...i-expecting-too-much-of-it.47702/#post-417242

The member found this thread but was too scared to try the solution. This script and it’s corresponding setup guide was created to try and fix the exact issues he was expierening.

Instead, that member is considering a new router, which if it is another Asus, will not make the problem any better.
 
Last edited:
Hi! I was going to chime in myself and say that I managed to get through your instructions pretty well, given that when I started I didn't even know what SSH is! I really appreciate the care and hard work you have put into the script, AND user support, all unpaid!

I just recently reverted back to stock firmware, so that I could use the AiMesh interface to improve our wireless coverage. (I know there is some energetic debate about this feature, but for our purposes it has so far worked very well.) I was pleased to see that I can still use your script, but did have some confusion with the stock install instructions. It doesn't appear to be possible to enable custom scripts in the stock firmware, so I presume the stock install should go like this (I am on a Mac):

1) turn on QOS with manual bandwidth (and, in my case, giving my dedicated VOIP devices priority in the bandwidth monitor).

2) Attach a USB drive to the router-- is it okay to just plug in a thumb drive, or do I need a proper USB drive for this to work?

3) enable SSH in the stock firmware, and SSH into the router to create the folder as you describe in your instructions:
Code:
mkdir /jffs/scripts/

4) Copy the script to the above directory using this command:
scp /users/YOUR_USERNAME/Downloads/FreshJR_QOS_compatible_v3.txt admin@192.168.1.1:/jffs/scripts/FreshJR_QOS

5) Install the script using:
sh /jffs/scripts/FreshJR_QOS -stock_install

If you could just confirm that I have this right, I will give it a try!

Also: I presume if I reset the router, I will just repeat the above process. If I update the firmware on the router using a "dirty" flash, will the script just keep working?

THANK you!
 
uhoh, I have a PS, too! Will the "mkdir" command work on a Mac, or do I need to put some kind of ssh command before it, like "scp" or "sh"?
 
I think that the issues don’t lie in the instructions being hard to understand, but rather that they are intimidating.

Simplifying the process a more can bring more users who are having issues with QOS to give it another try before dismissing QOS entirely.

I know that the third post is extremely techical, but it is the advanced section for a reason. It is simply present to consolidate all the information you need to see what each cryptic part of a custom rule is doing without needed to google all over the place.

The thing is that the advanced section is for advanced users. The default configuration is great as is. The additional flexibility is just icing on the cake for those who need it, and I have seen many users take on those options.

For example, reading post.

https://www.snbforums.com/threads/a...i-expecting-too-much-of-it.47702/#post-417242

The member found this thread br was too scared to try it. The script and it’s corresponding setup guide was created to try and fix the exact issues he was expierening.

Instead he is considering a new router, which if it is another Asus, will not make the problem any better.

Personally it can be a little daunting though its not your fault or the scripts in any way, just the procedure to get it installed or any script requires a basic knowledge of linux. I myself had 0 knowledge before finding your script and also found it a little daunting as ive always been a windows/dos user and even the apps themselves take a bit to get into.

Now I was upto the challenge and figured it out, then further advanced myself to understand a little linus and how the qos worked and proceded to mildy tweak mine how I need it. I actually enjoyed that but there are those totally non techy that may not enjoy that challenge.I can see where they might get frustrated but theres not much u can do short of maybe 1 script like you suggested to at least reduce the choice/confusion at the beginning.

Personally id stick with the compatible and if someone needs a much more advanced setup they can learn a lil if needed cuz theyre obviously that type that will be into that and be successful at it.. jus my opinion :)

What also may help is tighten up the install/modify instructions. Id suggest the install to pc instructions on the forum here and maybe default flash to router as well. Any customization put nice n neat inside the script for those looking to do more. Which you've more or less done already actually.

I just thought of something actually..Something that may be extremely useful for those wanting more custom setup, make a list of lines for specific or popular games/apps in the forum under your instructions for those needing them. we can all contribute to that list of best findings for certain apps etc.
 
Last edited:
I think this should be improved:
  1. Add a way to install the script online, without downloading it like other scripts. like these:
    (but always leaving the download option for people who want to edit it before installing it)
    Code:
    curl -O ab-solution.info/releases/latest/ab-solution.sh && sh ab-solution.sh
    or
    /usr/sbin/curl -Os https://raw.githubusercontent.com/decoderman/amtm/master/amtm && sh amtm
    or
    curl -L -s -k -O https://raw.githubusercontent.com/thuantran/dnscrypt-asuswrt-installer/master/installer && sh installer ; rm installer
    or
    /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/Adamm00/IPSet_ASUS/master/firewall.sh" -o "/jffs/scripts/firewall" && chmod +x /jffs/scripts/firewall && sh /jffs/scripts/firewall install
  2. After these options appear:
    1. Install/Update "FreshJR Adaptive QoS"
    2. Check for updates
    3. Game rules (appears an option to add or change the IP address for Game rules)
    4. Fix "VPN Client" (appears an option to add or change the IP address for Fix VPN Client)
    5. Change the traffic of some "App" to another Category
      1. Name name of the app (to know prio and mark)
      2. Change to another category
        An option appears that says add priority [enter],after the mark [enter] and then ask to what category:
        1. VOIP
        2. Gaming
        3. Others
        4. Web
        5. Streaming
        6. Downloads
        7. Defaults
      3. Show all redirected "Apps"
      4. Remove all redirected "Apps"
      5. Return to the main menu
    6. Uninstall
  3. Add this comment: If you do not understand what these options are for, read my main thread.
  4. Create a post with the priority and mark of the most important Apps.
  5. Also, add this script to amtm - Asuswrt-Merlin Terminal Menu
In this way it is easier for people to install the script and add the IP addresses.
 
Last edited:
Attach a USB drive to the router-- is it okay to just plug in a thumb drive, or do I need a proper USB drive for this to work?

Any storage device will work. It can be a thumb drive / flash drive / usb drive / external disk drive / portable harddrive whatever you want to call it.

If I update the firmware on the router using a "dirty" flash, will the script just keep working?

It should. You can always check the system log for "adaptive QOS:" log entries after a reboot.

Without a reboot you can always run

/jffs/scripts/FreshJR_QOS -debug

inside ssh and check for output. If Undf Prio is not 1:17, then it is still working.

Will the "mkdir" command work on a Mac, or do I need to put some kind of ssh command before it, like "scp" or "sh"?

The

mkdir /jffs/scripts

command should be been executed inside the ssh session.
(in other words this means, that the command should not of been "ssh mkdir /jffs/scripts" but rather that you have established a ssh connection before issuing "mkdir /jffs/scripts" )

When dealing with any ssh connection, all commands are executed during a session are done locally on the router itself with ZERO reliance on the computer issuing the command.
 
Last edited:
Thank you! Learn something new every day on this thread.

Just to clarify, after the mkdir command during the ssh session, the following scp command has to be done OUTSIDE the ssh session.

This isn't an issue for the RMerlin install, as they don't need the initial ssh session, but I do see it getting confusing for the stock install.

For stock install

1) connect to ssh
2) create folder
3) exit ssh

4) scp transfer file

5) connect to ssh
6) run install command
7) exit ssh

--

This chain of steps is unfortunately gets confusing for users on stock firmware and looking back at the instructions I did not explicitly state these steps in detail. I will clarify this section.

Thanks for the recommendation.

--

Feel free to hold off on the install as I am in the process of updating the post to make this simpler!
 
Last edited:
Some simplification to the install instructions is comming.

1) Fast version is getting discontinued (it is still working as expected but will simply be removed as an option ).

The reason that it was created to primarily allow the the configuration of cascaded HTB’s for an even better QOS setup, but this feature was never realized so there is not much reason for keeping it besides eliminating the 5min wait.

2). A one line install for users who want only default parameters and no custom rules. (I didn’t find the existing 5 line procedure confusing ... but **shrugs**)

The one line install will still require ssh.

3). Can anyone confirm custom IP/port rules working correctly on the AC86U?

This is in reference to this bug.

https://www.snbforums.com/threads/r...-and-inner-workings.36836/page-85#post-417103

If they are not working on any AC86U, I will only leave the alternative version as the only version going forward for compatability reasons.)

I do prefer the current compatible version since I believe it is more cpu efficient, but for simplicities sake, it might have to be discontinued, as many people are getting confused if there is more than one version available.

---

Feedback of which install instructions seem vague/unclear would also be good. I don’t see where the issue lies with them as is.

---

Next I have a question on the custom gaming rule.

Should I leave it enabled by default applying to devices between 192.168.2.100 - 196.168.2.103?

This small range enabled by default means a non gaming device will only have a 2% chance of overlap by placing into that ip range without an explicit dhcp assignment, but realistically if you cannot uncomment a rule with a picture guide, can you even assign static IP’s?
What happened to the cascaded HTB, may I ask how it differs from normal HTB.
 
What happened to the cascaded HTB, may I ask how it differs from normal HTB.

AdaptiveQOS has an initial HTB to separate traffic into 8 categories.

Eg. NET CONTROLS through DEFAULTS
Within each category is another HTB intended to deal with “Highest, High, Medium, Default, Lowest” client priority designations. These are the cascaded HTB’s I am referring too .


The fast/fakeTC script was created to allow the ability to improve the cascaded HTB setup and allow “Highest, High, Medium, Default, Lowest” designations to work in a way that I would expect them too.

In recent firmware releases. Asus/Trendmicro changed their approach to the cascaded HTB’s where I am not able fix them even with the fakeTC approach.

As as a result I am recommending all devices to have default priority, as assigning different priorities to clients will lead to terrible bandwidth allocation compared to leaving them all the same priority.

I fully had a plan to fix this via the fakeTC, but internal changes since firmware 384+ made it difficult.
 
Last edited:
AdaptiveQOS has an initial HTB to separate traffic into 8 categories.

Eg. NET CONTROLS through DEFAULTS
Within each category is another HTB intended to deal with “Highest, High, Medium, Default, Lowest”. These are the 8 cascaded HTB’a.


The fast/fakeTC script was created to allow the ability to improve the cascaded HTB setup to would allow “Highest, High, Medium, Default, Lowest” designations to work in a way that I would expect them too.

In recent firmware releases. Asus/Trendmicro changed their approach to the cascaded HTB’s where I am not able fix them even with the fakeTC approach.

As as a result I am recommending all devices to have default priority, as different priorities have a terrible bandwidth allocation with the asus setup.

I fully had a plan to fix this via the fakeTC, but internal changes since firmware 384+ made it impossible.
Wow that's impressive prioritiseing traffic with in the containers them selves, well I'm extremely saddened by what Asus has done I'm hoping a future relase from them might allow you to carry out your fixes.
 
Wow that's impressive prioritiseing traffic with in the containers them selves, well I'm extremely saddened by what Asus has done I'm hoping a future relase from them might allow you to carry out your fixes.

Luckily fq-codel gets great results even if all clients are all in the same priority within each container.

The only thing you are missing out is guaranteeing extra bandwidth towards specific clients, which in my opionion isn’t too big of a deal.

If you decide to move clients out of the default category, bandwidth allocation gets stupid between clients in different groups due to a terrible setup, so I do not recommend it.
 
So how does it work in sfq if you don't mind me asking just all set to default or similar to your original idea?

If it was possible to actually preform what you were trying to achieve that would be awesome, hang on what's the difference between HTB and HSBC
 
So how does it work in sfq if you don't mind me asking?

Sfq means packets waiting to be uploaded/downloaded within a queue will be chosen at random (Stochastic).

Codel means any packet within a queue that is older than xx seconds will be assumed to be toxic and will be destroyed. Any packets less than xx seconds will still be chosen stochastically (at random).

Fq-codel includes discarding toxic packets via the expiration time mentioned above but the FQ prefix means “fair queuing” This means that instead of packers being chosen at random/stochastic, it will look at packets per connection to make sure bandwidth is more fairly than being completely chosen.

---


HTB’s are nessary to segregate bandwidth between user or categories.

This script fixes bandwidth between the main traffic categories but bandwidth allocation between users within categories is broken.

Luckily if all users lumped together thenewer queining disciplines are able to make sure everyone is treated fair, and it’s as if the cascaded htb does not exist.

The higher, high, medium, default, lowest labels should have solely existed to be able to guarantee some users more bandwidth over others. As is Asus has them ridiculously broken, so it is not useful to touch them as I mentioned in the first post.

Treating all users equal within a category shouldn’t be an issue for 99% of the people.

This is why I mentioned that everyone should stay within the same priority, but didn’t feel like writing out the reason.
 
Last edited:
I understand now thanks, I wonder if HSBC packet scheduler would help in anyway?
 
Status
Not open for further replies.

Latest threads

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