1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

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

Discussion in 'Asuswrt-Merlin' started by FreshJR, Jan 12, 2017.

  1. charlie2alpha

    charlie2alpha Senior Member

    Joined:
    Nov 15, 2014
    Messages:
    409
    Location:
    Greece
    Excellent. I'll try the script soon, I'm looking for a replacement of traditional QoS and this script seems to be it.
     
  2. Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!
  3. MarCoMLXXV

    MarCoMLXXV Guest

    Without the intention to diminish all the hard work @FreshJR has put in this great script, but if you upgrade to the current stable release of Asuswrt-Merlin (380.68), you'll most likely will already be amazed by the improvements @RMerlin has made to Adaptive QoS, specifically by adding the fq_codel discipline. There's nothing 'traditional' about it anymore and it works great out of the box, with some simple, minor configuration (choose which discipline you want to use, defining your bandwith etc.).

    Having said that, @FreshJR has managed to take that even a step further, by allowing you to define max bandwidth per category, adding custom rules, the ability for unidentified traffic to have it being redirected to the right category, so it's get the right priority. If you upgrade, you'll be in for a treat :) (don't forget to read the 380.68 changelog as there are some major changes, specifically to the UI which you need to be aware of and follow the instructions!)
     
  4. charlie2alpha

    charlie2alpha Senior Member

    Joined:
    Nov 15, 2014
    Messages:
    409
    Location:
    Greece
    Custom rules are a must for my use case. Tried Adaptive QoS in the not so distant past and it was worthless for me. It's major flaw (which makes it a success in generic consumer use cases!) for me is it's lack of customization and that causes most of my traffic to end up as unknown.

    Sent from my Nexus 9 using Tapatalk
     
  5. MarCoMLXXV

    MarCoMLXXV Guest

    then I think you've come to the right place :) I don't use any custom rules, very satisfied as it's running currently, but there are many around here with specific knowledge way over my head...
     
    charlie2alpha likes this.
  6. strangeluck

    strangeluck Occasional Visitor

    Joined:
    Aug 11, 2015
    Messages:
    49
    fq_codel is definitely a big improvement, but the limits as set in the Asus defaults are borderline worthless. I wouldn't recommend anyone run adaptive QoS without this script. See the first post in this thread for a good explanation of how terrible the Asus implementation is.
     
  7. MarCoMLXXV

    MarCoMLXXV Guest

    That's absolutely true, but for those with no interest in running and editing custom scripts, thinking ssh is short for shush, fq_codel is definitely an improvement over the previous available diciplines, even with Asus ridiculous preset boundaries.
     
    Vexira likes this.
  8. strangeluck

    strangeluck Occasional Visitor

    Joined:
    Aug 11, 2015
    Messages:
    49
    Heh, good point. Any QoS implementation is probably better than none for most people.
     
    Vexira likes this.
  9. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,286
    Location:
    Australia
    asus should be more open with traffic detection, they need a way to allow users to submit requsts for games to be added to classification or devices
     
  10. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    27,252
    Location:
    Canada
    Nothing custom about realtc, it's just a copy of the regular tc. This is so it can be called by the script that patches itself on top of "tc", intercept parameters, modify them, then pass them along to realtc.

    The fq_codel code resides entirely in the kernel (aside from tc needing to be a recent enough version to handle the fq_codel and overhead parameters).
     
  11. MarCoMLXXV

    MarCoMLXXV Guest

    If I understood correctly, even Asus is not to blame, as they can't change anything about that, they've just decided to use closed, proprietary code from Trend Micro (good code, used in there enterprise solutions as well) in our router's firmware. But I agree with you, they should either keep it fully up to date (if ever possible, as every user has it's own preferences/requirements and there will probably not be a way to satisfy each and every one of them) or allow user requests so they can modify traffic detection to fit our needs.
     
  12. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,286
    Location:
    Australia
    sry I mean they should have a way for us to make requests that they pass on to trend.
     
    MarCoMLXXV likes this.
  13. MarCoMLXXV

    MarCoMLXXV Guest

    So, if I understand you correctly, when using QoS, one shouldn't install tc from entware-ng, as it won't have the patches applied needed for QoS currenlty?
     
  14. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    27,252
    Location:
    Canada
    The source code is not patched. The patch is done at the filesystem level, where all calls to /usr/sbin/tc are redirected to faketc, which modifies the parameters, before handing them over to realtc.
     
  15. maxsteel

    maxsteel Regular Contributor

    Joined:
    Dec 27, 2014
    Messages:
    55
    Am I missing something guys? My connection is more stable with ATM unchecked and overhead set to Zero instead of 40 (since I use ADSL) ?
     
  16. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,286
    Location:
    Australia
    thats odd what modem are you using?
     
  17. beboptrumpet

    beboptrumpet Occasional Visitor

    Joined:
    Nov 15, 2013
    Messages:
    43
    Location:
    Indianapolis, IN, USA
    IMG_1116.PNG
    Does setting a custom order or setting it to prioritize game, streaming, or web surfing do anything while running this script?
     
  18. Tomo

    Tomo New Around Here

    Joined:
    Apr 28, 2016
    Messages:
    2
    Hi FreshJR, thank you for the great job.

    I'm using the 380.68 Merlin firmware on my Ac68U with automatic Qos ( manual bandwith, fq_codel), i have a Adsl2+ 20/1.

    I wanted try your script but i'm not very expert, i changed the ip of the router from 192.168.1.1 to 10.0.0.1 and i wanted know if i need change some things in the script (ip router and bandwith for 20/1) before send it.

    Then i discovered that the game GuildWars2 isn't recognise from Trend Micro Engine, any chance in the future to optimizing the script in this case ?

    Thank you !
     
  19. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    749
    No nothing needs changing.

    When you are installing, on the pscp step change the ip from 192.168.1.1 to your 10.0.0.1 router ip.

    As for guild wars, find out what port it uses and add a custom rule.
     
    Tomo likes this.
  20. charlie2alpha

    charlie2alpha Senior Member

    Joined:
    Nov 15, 2014
    Messages:
    409
    Location:
    Greece
    So I have the script a try, unfortunately my iptables rules although they appear correct they do not seem to work. The counters remain always at zero, which means no packets are ever marked.

    Everything I read about the DPI engine suggest that iptables rules are useless as the packet marking is completely overridden by the DPI engine itself.

    I had partial success with some tc rules only but tc rules are just too limited for the filtering I need. I'm afraid that I'm stuck with the traditional QoS for now and that means that I am also stuck with firmware 380.65_4 since anything newer breaks IPv6 mangle handling. Bummer.
     
    Last edited: Sep 12, 2017
  21. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,286
    Location:
    Australia
    What port does it use, I'll mod the rules in for you.
     
    Tomo likes this.
Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!