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. skeal

    skeal Part of the Furniture

    Joined:
    Apr 30, 2016
    Messages:
    2,015
    Location:
    /etc
    Yes you got it! To single out 3 ips you would use /30 and use 3 out of the 4 that are available.
     
    FadgewackeR likes this.
  2. skeal

    skeal Part of the Furniture

    Joined:
    Apr 30, 2016
    Messages:
    2,015
    Location:
    /etc
    Using the alternative interface version: FreshJR_QOS_v5_ALTERNATIVE_WAN_INTERFACE.txt
    [​IMG]
     
  3. FadgewackeR

    FadgewackeR Regular Contributor

    Joined:
    Jun 19, 2018
    Messages:
    86
    Ok, job sorted... Just need to see how it works in the real world.

    I didn't change any custom rates in the script before I applied it, only the % in the bandwidth setup section... Assume the script works effectively without the custom rates?

    Will see how I go with it and try a few tests to be sure it's doing what it should. Thanks for your help.
     
  4. skeal

    skeal Part of the Furniture

    Joined:
    Apr 30, 2016
    Messages:
    2,015
    Location:
    /etc
    The custom rates give more priority to that class of traffic. You basically reserve bandwidth sort of.
     
  5. FadgewackeR

    FadgewackeR Regular Contributor

    Joined:
    Jun 19, 2018
    Messages:
    86
    The only class I really want to be sure of having priority is gaming / others. I assumed that by sorting order of priority in qos on the router app, after script application, that would take care of my prioritisation needs?

    Or have I totally missed the bus, and as were applying a script, all priority has to be defined by that?
     
  6. skeal

    skeal Part of the Furniture

    Joined:
    Apr 30, 2016
    Messages:
    2,015
    Location:
    /etc
    The first post has a list of the classes and a recommended order. I would use it if you are gaming at all. Follow those instructions it really helps.
     
    FadgewackeR likes this.
  7. FadgewackeR

    FadgewackeR Regular Contributor

    Joined:
    Jun 19, 2018
    Messages:
    86
    Yeah I thought I’d already done that, but the order of priority was done in the app...
     
  8. FadgewackeR

    FadgewackeR Regular Contributor

    Joined:
    Jun 19, 2018
    Messages:
    86
    Thanks for the continued responses @skeal

    The list of classes and priority - Do I adjust them in the router UI, or do I need to mod the rate/ciel section of the script?

    Sorry for all the dumb questions...
     
  9. skeal

    skeal Part of the Furniture

    Joined:
    Apr 30, 2016
    Messages:
    2,015
    Location:
    /etc
    Start by setting the classes as the post shows. Then adjust the bandwidth settings in the script to meet your needs. Oh it has to add up to 100, so lets say you are like me and want to allow video more bandwidth to stop other devices and what they are doing interfering with my video. I stole from voip and added it to video to keep it adding up to 100. Have a look at the values before you change them and you will see each of them the upload and download add up to 100.
     
  10. skeal

    skeal Part of the Furniture

    Joined:
    Apr 30, 2016
    Messages:
    2,015
    Location:
    /etc
    You want to keep the classes as shown in the 1st post because ping sensitive traffic should always take highest priority. Gaming and video don't need any help they rob lots of bandwidth.
     
  11. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,398
    Location:
    Australia
    Rule used to show a message that it was changing to user defined percentages,and yes it modified the ui bandwidth values.
     
  12. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,398
    Location:
    Australia
    I tried that but sadly it doesn't help if the rule isn't working in the first place.
     
  13. FadgewackeR

    FadgewackeR Regular Contributor

    Joined:
    Jun 19, 2018
    Messages:
    86
    Well my connection is performing pretty well and the quality and bloat are good, I pay for 20/10... Just need to get my priority sorted out in the custom rates later to make the script do what it really needs to do.

    I'm following suggested priority from the setup tutorial, though I haven't set up any custom rates at all yet. Was beyond me after a few G&T's last night, but thanks to @skeal for his patience! I have tweaked the "Percent of download speed guaranteed per QOS category" sections somewhat, obviously keeping to the measure of 100.

    [​IMG]

    While doing the Speedtests (on my wired Ps4 Pro), the results say wireless, which is a bit odd (it's did this pre-script btw...)

    I also noticed that the traffic at the time of the tests was classified as "Gaming" in the WebUI monitor pie chart. The Mrs was watching trash via Netflix on the upstairs PS4 earlier, and that was correctly classified as streaming...

    Will have a play about with other types of forced traffic via PS4 later and see where it sits. Hopefully I've stumbled across an anomaly, as I, like I'm sure the majority who will use the gaming rules would also, prefer all "Other" PS4 network activity to be routed away from the true gaming packet allocation.
     
    Last edited: Jul 9, 2018
    Vexira likes this.
  14. FadgewackeR

    FadgewackeR Regular Contributor

    Joined:
    Jun 19, 2018
    Messages:
    86
    The custom rates have left me more than a little perplexed, I have to be honest.

    Should your custom rates have a proportional relationship to "% speed guaranteed per QOS cat" against total bandwidth? If not, is there a preferred way to decide the custom rates?

    Code:
    ####################  Bandwidth Setup #####################
    
        user_variables() {
            #Percent of download speed guaranteed per QOS category, change below as desired     (minimum value per section 5, sum should not be greater than 100)
            NetControl_DownBandPercent=5                    #This value can be adjust as desired        **  no spaces before or after the "=" sign **
            VoIP_DownBandPercent=20                            #This value can be adjust as desired        **                no decimals              **
            Gaming_DownBandPercent=15                        #This value can be adjust as desired
            Others_DownBandPercent=10                        #This value can be adjust as desired        #Note: New destination for unidentified traffic
            WebSurfing_DownBandPercent=10                    #This value can be adjust as desired
            Video_DownBandPercent=30                        #This value can be adjust as desired
            FileTransfer_DownBandPercent=5                    #This value can be adjust as desired
            Default_DownBandPercent=5                        #This value can be adjust as desired        #Note: Original destination for unidentified traffic, repurposed for "Gaming Downloads on ports 80/443"
      
            #Percent of upload speed guaranteed per QOS category, change below as desired         (minimum value per section 5, sum should not be greater than 100)
            NetControl_UpBandPercent=5                        #This value can be adjust as desired
            VoIP_UpBandPercent=20                            #This value can be adjust as desired
            Gaming_UpBandPercent=15                            #This value can be adjust as desired
            Others_UpBandPercent=30                            #This value can be adjust as desired        #Note: New destination for unidentified traffic
            WebSurfing_UpBandPercent=10                        #This value can be adjust as desired
            Video_UpBandPercent=10                            #This value can be adjust as desired
            FileTransfer_UpBandPercent=5                    #This value can be adjust as desired
            Default_UpBandPercent=5                            #This value can be adjust as desired        #Note: Original destination for unidentified traffic, repurposed for "Gaming Downloads on ports 80/443"
        }
    I've kept the code as standard for the bandwidth setup as in the code above: So on my throttled connection of D20 / U9, for example, the % in Mb would equate to:

    NetControl_DownBandPercent= 1mb (20/100)*5
    VoIP_DownBandPercent= 4mb (20/100)*20
    Gaming_DownBandPercent= 3mb
    Others_DownBandPercent= 2mb
    WebSurfing_DownBandPercent= 2mb
    Video_DownBandPercent= 6mb
    FileTransfer_DownBandPercent= 1mb
    Default_DownBandPercent= 1mb

    NetControl_UpBandPercent= 0.45mb (9/100)*5
    VoIP_UpBandPercent= 1.8mb (9/100)*20
    Gaming_UpBandPercent= 1.35mb
    Others_UpBandPercent= 2.7mb
    WebSurfing_UpBandPercent= 0.9mb
    Video_UpBandPercent= 0.9mb
    FileTransfer_UpBandPercent= 0.45mb
    Default_UpBandPercent= 0.45mb

    Would these figures, discounting NetControl yet ensuring total rate = ciel, be a decent approximation for custom rates, or am I wildly misinterpreting this?
     
  15. Sinner

    Sinner Senior Member

    Joined:
    Sep 30, 2017
    Messages:
    289
    Location:
    Canada
    Theyre just defaults. You can and possibly should adjust them to your particular needs but theyre setup default in such a way that it should just work ok. Keep in mind any container can still use bandwidth from others if its available otherwise will make sure they get at least that much. The main goal of qos is to limit bandwidth hogs like downloads and netflix from taking all the bandwidth. So that you can still browse web comfortably or play that online game with little to no noticable lag. I personally went with all 10% and video at 30%. Works flawlessly
     
    skeal and FadgewackeR like this.
  16. Sinner

    Sinner Senior Member

    Joined:
    Sep 30, 2017
    Messages:
    289
    Location:
    Canada
    Personally i think all 10% and video 30% should be the defaults. Works very well for a larger variety of connections. I have 10/2 wireless. The 5% ones were giving me r2q too small warnings at the settings i needed. The 10% corrected that allowing me to lower my ul/dl to where i needed without the warnings as well
     
    skeal and FadgewackeR like this.
  17. FadgewackeR

    FadgewackeR Regular Contributor

    Joined:
    Jun 19, 2018
    Messages:
    86
    In relation to bandwidth setup or custom rates?
     
    skeal likes this.
  18. Sinner

    Sinner Senior Member

    Joined:
    Sep 30, 2017
    Messages:
    289
    Location:
    Canada
    Are they not the same thing? Im confused
     
  19. Sinner

    Sinner Senior Member

    Joined:
    Sep 30, 2017
    Messages:
    289
    Location:
    Canada
    Your ul/dl setting on the qos setup page need to be slightly lower than your reliable average actual speeds you can achieve with qos off. Reason for that is qos(the router) needs to be the bottleneck for your connection so it is in control. As soon as you actual connection drops below what you set there qos is broken and cant work because it doesnt know theres an issue. As for the %'s i was previously referring to, those are in the script and are my suggestions
     
  20. FadgewackeR

    FadgewackeR Regular Contributor

    Joined:
    Jun 19, 2018
    Messages:
    86
    Well understood, and they are :)

    Assume you mean the bandwidth percentages that I put in post 1656?

    Is it necessary to add / modify custom rates / ciel, or does the script just do it all for you?

    Code:
    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}
            ${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}
            ${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}
            ${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}
            ${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}
            ${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}
            ${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}
            ${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}
            
            ${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}
            ${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}
            ${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}
            ${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}
            ${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}
            ${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}
            ${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}
            ${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}