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

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    749
    Welcome to FreshJR's Adaptive QOS modification script!

    --------OVERVIEW--------

    Adaptive QOS works amazing, but I have decided to tweak it as I have a few issues with it out of the box. Each of these is addressed by my script.

    Issue 1:

    The first issue is caused by the traffic groups. More specifically, the issue is caused by the existence of the default category. Unidentified traffic goes to the Default category. I would like it to go to Others instead. My reasoning is explained below.

    If you go to the QOS statistics, it shows you your traffic priorities and the last 3 seconds of each categories utilization. My setup is as follows.

    Class Total Rate Packet rate
    • Net Control Packets
    • VoIP and Instant Messaging
    • Gaming
    • Others
    • Web Surfing
    • Video and Audio Streaming
    • File Transferring
    • Default
    The issue is that VOIP, like wifi calling and facetime is currently unidentified. This will make it fall to the last category.

    This will cause correctly identified traffic like neflix, youtube, filedownloads, torrents, and web surfing to ALL have greater priority than my poor old VOIP traffic. I wanted to have VOIP get first priority, but it seems to be getting the wrong end of the stick.

    This negative effect extends to poor gaming performance as well. Many games are undetected and will also get the same wrong end of the stick.

    It's a shame that the default category does not have adjustable priority. My scripts fixes that! A workaround I have performed is to route unidentified traffic into the rarely used, but webUI adjustable, Others category. With this you can punish known bandwidth hogs to give them worse priority than unknown traffic. Use as desired!​

    Issue 2:

    UPDATE: I am happy to say Asus addressed issue2 in v382 and up! They now do at least 5% of total bandwidth for each catagory with others as high as 20%. This is a very SIGNIFICANT improvement from the original iteration. I welcome this change!!!!

    The largest issue with Asus's implementation of QOS is with their rate/ceil class values. The QOS categories each have an individual rate/ceil defined.

    So what is this rate or ceil you may ask?

    Rate = Minimum reserved bandwidth for a QOS container
    Ceiling = Maximum bandwidth allowed for a QOS container

    Note in this post: QOS container = QOS category = QOS Class. I will be using all terms interchangeably
    To understand how this could be a problem you have to know how rate/ciel work in practice. Here's a summary.

    Available bandwidth goes to container 1 until it hits rate. Then it will go to container 2 until rate, and so on up to container 7. At this point there will be a lot of unused bandwidth available. This bandwidth will go back to container 1 until it hits its ceil, then container 2 until ceil, and so on up to container 7. No bandwidth is wasted!

    Lets look at some examples, with a 100 mbps connection for easy numbers.

    Example Setup 1 (Okay):
    Code:
    Downloads       container 1     40 mbps rate / 100 mbps ciel      1000 mbps supplied by server.
    Web Surfing     container 2     10 mbps rate / 100 mbps ciel      5 mbps needed
    Streaming       container 3     20 mbps rate / 100 mbps ciel      30 mbps video stream
    
    What would happen is as follows:
    
    Downloads     75 mbps
    Web Surfing   5   mbp
    Streaming     20  mbps   <--- Suffering because of download priority
    
    Bad setup in my opinion because I do not agree in reducing streaming quality to speed up a file transfer.
    This is a non issue since it is a preference setup by the user.  They deem whats appropriate.
    

    Example Setup 2 (GOOD):

    Code:
    Same as above but with better container priorities
    
    Web Surfing     container 1      10 mbps rate / 100 mbps ciel    5mbps needed
    Streaming       container 2      20 mbps rate / 100 mbps ciel    30mbps video stream
    Downloads       container 3      40 mbps rate / 100 mbps ciel    1000 mbps supplied by server.
    
    What would happen is as follows:
    
    Web Surfing    5mbps used
    Streaming      30mbps used
    Downloads      65mbps used <-- Bandwidth taken from here if needed
    
    Optimal setup in my opinion since every category has reasonable guaranteed bandwidth, same as the last setup.
    The difference is that excess bandwidth is offered to categories in a logical order for my usage.
    
    Example Setup 3 (TERRIBLE):
    Code:
    Same as above but different is container rates (128 kbps each =  0.128 mbps)
    
    Web Surfing     container 1      0.128 mbps rate / 100 mbps ciel     5 mbps needed
    Downloads       container 2      0.128 mbps rate / 100 mbps ciel     1000 mbps supplied by server.
    Streaming       container 3      0.128 mbps rate / 100 mbps ciel     30 mbps video stream
    VOIP            container 4      0.128 mbps rate / 100 mbps ciel     2 mbps voice
    Gaming          container 5      0.128 mbps rate / 100 mbps ciel     1 mbps gaming
    
    What would happen is as follows:
    
    Web Surfing   5 mbps used
    Downloads     94.6 mbps used
    Streaming     0.128 mbps used <- DEAD
    VOIP          0.128 mbps used <- DEAD
    Gaming        0.128 mbps used <- DEAD
    
    Terrible setup in my opinion.
    I would never want traffic in any category to completely stall.
    There are no user options to correct this.
    
    I will leave it up to your imagination as to who implemented a 0.128 mbps guaranteed rate per QOS container. They have the knobs to adjust these numbers but instead decided not to allow users to adjust them while themselves messing up the initial positions. (ASUS addressed this in v382+)

    In my script these rates are defined as percentages of total download bandwidth and are adjustable to your liking. This means no matter how much the network is constrained, various types of traffic should still flow.

    There is one issue still outstanding that bugs me. Inside each container, that traffic has to go through the rate/ciel process again to divide up the available traffic per device requesting it. Once again, a certain manufacturer has setup guaranteed rates of 0.128 mbps per LAN client. This can lead to a situation where one user eats all the bandwidth within a container and starves everyone else if viewing a fast enough data source.

    As a result, I only recommend "default" device priority so everyone get's a sane allotment of bandwidth.​
    Issue 3:

    No lengthy write up here. The issue is that we cannot create custom rules to fit any additional needs or deficiencies with the traffic definitions database!
    My script allows for custom rules. I will be explaining these in another post as this one is already too long.​

    Description / Install Guide / Advanced Settings in next posts

    (Note: For user specific additions/modifications to the script's default parameters I recommend using Notepad++ as it will offer most clarity to what is going on)
     

    Attached Files:

    Last edited: May 10, 2018
  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. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    749
    Description

    The script comes in two varieties. Please choose whichever one works for you.

    1) compatible
    FreshJR_QOS_compatible_v
    Legacy Users: Compatible Version supports ALL firmware
    2) fast
    FreshJR_QOS_fast_v
    FreshJR_QOS_fast_v_fakeTC
    Currently supported firmware's are v380+
    1) Compatible Version
    The compatible version waits 5 minutes after any QOS settings have been initiated in webUI to run. All the custom settings in the script are applied after this wait period.

    This method is the most reliable/compatible since it does NOT interfere with ASUS's original commands.

    A drawback to this method is that it is possible to trigger a QOS environment reset without triggering the subsequent modification script. Some examples of this are checking for QOS definition updates or changing AiProtect settings in the webUI.

    To overcome this, the script runs a persistence check everyday at 3:30 am to see if it has to be reapplied.

    During the initial 5 minute wait period, any connection directed to any QOS container (from the original rules) will have that traffic remain in that container for the duration of the connection. Traffic rules are only parsed upon opening a NEW connection.
    2) Fast Version (Experimental)
    The fast version intercepts ALL qos commands realtime. This means there is never a moment where qos modifications are going to be missed.

    A drawback to this method is that it interferes with ASUS's original commands. This can lead to errors. An example of this are system log errors from ASUS detecting unexpected delays in QOS initialization due to the command interception.

    The potential error messages currently were NOT harmful or detrimental to actual QOS performance, instead they were only short blips in the system log.
    Irregardless, hacky work-around's have been applied to significantly reduce the occurrence of these messages.
    The act of command interception and error message work-around's may lead to instability, which is why a compatible version is available depending on what trade-offs the user wants to make.​

    Install /Update Guide

    Prerequisites:
    In your router you need Custom Scripts & SSH enabled.
    (1) Administration -> System -> Enable JFFS custom scripts and configs -> YES -> Apply
    (2) Administration -> System -> Enable SSH-> LAN Only-> Apply
    You can disable SSH after installation if you do not want to leave it available for security reasons.

    Prerequisites for Users on Stock / Default / Unmodified Asus Firmware
    The "compatible" version is the only version that is compatible with stock firmware. The "fast" version will not work.

    A prerequisite for this installation method is that a USB drive will have to be attached to the router 24/7.

    The install instructions are mostly the same as below except for THREE different steps.

    1)First you should start QOS and then install the script.

    If QOS isn't started before the install, you will either have to wait until 3AM or reboot the router before the script modifications take effect. This happens because it is not possible to detect a qos environment reset when QOS is toggled on/off via the WebUI and trigger the script afterwards. This is a limitation of the stock firmware.

    To partially work around this limitation, the script is triggered (parsing the QOS environment) when a USB drive is first detected (happens on boot), daily at 3:30 AM, and once right after the install procedure.
    2) Before sending over the files with pscp, execute the following command via putty or a terminal ssh session.

    Code:
     mkdir /jffs/scripts/ 
    This is needed since pscp will refuse to send files to a non existent directory. A Putty/SSH guide is present below.
    3) From this point you can simply follow the install instructions, with one minor difference.

    Replace the -install parameter with -stock_install. **IMPORTANT**

    ** Once again, do not use FreshJR_QOS -install **
    ** You have to use FreshJR_QOS -stock_install **

    The -uninstall command is the same for all users, so no issues on this end.

    How it Works:

    The stock firmware has a "post_mount" trigger that executes when external storage is initialized.
    I used this "post_mount" trigger to have the script persist throughout reboots which is why a USB drive is required.​
    Windows:
    You will need putty and pscp, as well as the script.

    http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

    You do not have to install these executables, they are portable. Move them, and the script, into a new folder called Putty on your C:\ drive.

    It should look like this:
    C:\Putty\putty.exe
    C:\Putty\pscp.exe​
    AND
    C:\Putty\FreshJR_QOS_compatible_v3.txt​
    OR
    C:\Putty\FreshJR_QOS_fast_v1.txt
    C:\Putty\FreshJR_QOS_fast_v1_fakeTC.txt​


    1) turn OFF qos
    2) In command prompt

    Compatible Version:
    Code:
    cd C:\putty\
    pscp -scp C:\Putty\FreshJR_QOS_compatible_v3.txt [email protected]:/jffs/scripts/FreshJR_QOS
    
    Fast Version:
    Code:
    cd C:\putty\
    pscp -scp C:\Putty\FreshJR_QOS_fast_v1.txt [email protected]:/jffs/scripts/FreshJR_QOS
    pscp -scp C:\Putty\FreshJR_QOS_fast_v1_fakeTC.txt [email protected]:/jffs/scripts/FreshJR_QOS_fakeTC
    

    3) In putty

    Code:
    dos2unix /jffs/scripts/FreshJR_QOS
    dos2unix /jffs/scripts/FreshJR_QOS_fakeTC
    sh /jffs/scripts/FreshJR_QOS -install
    
    4) turn ON qos
    Mac/Linux:
    You will need to download the script.

    1. turn OFF QOS

    2. In TERMINAL

    Compatible Version:
    Code:
    scp /users/YOUR_USERNAME/Downloads/FreshJR_QOS_compatible_v3.txt [email protected]:/jffs/scripts/FreshJR_QOS
    
    Fast Version:
    Code:
    scp /users/YOUR_USERNAME/Downloads/FreshJR_QOS_fast_v1.txt [email protected]:/jffs/scripts/FreshJR_QOS
    scp /users/YOUR_USERNAME/Downloads/FreshJR_QOS_fast_v1_fakeTC.txt [email protected]:/jffs/scripts/FreshJR_QOS_fakeTC
    
    3. In TERMINAL

    Code:
    ssh [email protected]
    
    dos2unix /jffs/scripts/FreshJR_QOS
    dos2unix /jffs/scripts/FreshJR_QOS_fakeTC
    sh /jffs/scripts/FreshJR_QOS -install
    
    4. turn ON qos

    QOS Setup:

    1) Use manual bandwidth with limits set to 85-95% of your non-throttled speedtest results

    To zone in on the ideal bandwidth setting within this range you need to be aware of these relations while testing with DSLreports Speedtest:
    If you are getting poor bufferbloat grade, reduce WebUI speeds
    If you are getting poor quality, increase WebUI speeds.
    With these effects in mind, zero in on the ideal speed to get highest overall grade as quality/bufferbloat have an inverse relationship.
    Always perform testing without other network activity so the results are consistent and not skewed.

    Note: Do not use the Automatic bandwidth setting. It does not work well!
    Automatic bandwidth prioritizes traffic but will NOT reduce bufferbloat.
    Bufferbloat is what makes your internet unresponsive when it is under load.
    Bufferbloat is the main reason of implementing QOS.

    If your bandwidth is not stable, then I guess the "automatic" setting of traffic prioritization would better then no QOS.
    If I was in this non-ideal circumstance of having wildly varying bandwidth, I would recommend inputting peak speeds instead of using automatic bandwidth. Peak speeds should work slightly better, but bufferbloat will still be present.
    2) I recommend keeping all devices at default priority.

    Currently traffic allotted between devices of different categories does not produce sane results.
    Dedicated VOIP lines are an exception (By this I mean real VOIP lines not your cellphone)
    3) I recommend the following QOS traffic priority list.

    VoIP
    Gaming
    Others
    Web Surfing
    Video and Audio Streaming
    File Transfers

    Keep in mind that "Unidentified traffic" will flow into "Others" with this script.

    I routed "Snapchat" away from VoIP since I didn't want to to get VoIP priority.
    It is in "Others" since I still wanted Snapchat to get higher priority than Web Surfing.

    For users who are NOT using the optional gaming rule, keep in mind that "Others" can potentially have a lot of gaming traffic. "Gaming" users may want to consider moving "Snapchat" into "Web Surfing" so gaming traffic does not have to fight with Snapchat over bandwidth.
    4) sfq vs fq-codel ?
    I perfer the performance of fq-codel, but feel free to experiment in this area.
    Here are some results of my testing.

    - I get a significantly faster RAMP to max defined speed (a signature trait of CoDel) compared to sfq.
    - The initial bufferbloat spikes are reduced significantly faster with Fq-CoDel.
    - My bufferbloat is +10-20ms above average with Fq-Codel, vs +20-40ms with sfq.

    Results:

    [​IMG]

    [​IMG]
    Uninstall Guide

    An uninstall is NOT needed between updates.

    Only time an uninstall is needed is when switching from the fast version -> compatible version of the script.

    Code:
    /jffs/scripts/FreshJR_QOS -uninstall
    
    Temporarily Disable & Re-enable:

    Code:
    /jffs/scripts/FreshJR_QOS -disable
    
    or
    
    /jffs/scripts/FreshJR_QOS -enable
    
     
    Last edited: Jul 13, 2018
  4. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    749
    ----------------ADDITIONAL CONFIGURATION----------------

    -If you have a DSL / Fiber / Anything Not Automatically Assigned an IP Connection
    -If you use your router as a VPN client you should apply extra rules since out of the box
    -VPN download traffic is whitelisted or may erroneously show up in uploads
    -VPN upload traffic is whitelisted
    https://www.snbforums.com/threads/r...-and-inner-workings.36836/page-78#post-412034

    ------------------ REPORTED/KNOWN BUGS --------------------


    Some users have reports that rules related with filtering by PORT & IP are not functioning correctly.

    Feel free to visit this post for diagnostic steps to see if the issue is affecting you, and a workaround solution if you are experiencing the same issue.

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


    --------------COMMONLY ASKED QUESTIONS---------------

    1) What is the difference between Local(LAN) and Remote(WAN) Ports/IPs when configuring custom rules.

    2) Is this an issue?

    Code:
    HTB: quantum of class 10016 is big. Consider r2q change.
    
    NO​

    3) Is this an issue?

    Code:
    ERR[parse_qos_conf:932] Can't set new QoS conf while QoS is started!
    ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
    ioctl_iqos_op_config() fail!
    ERR[qos_start:3344] QoS is already started!
    ioctl_iqos_op_switch(1) fail!
    
    Not unless the errors are continuously looping without stopping​

    4) How do I know the script/QOS is working?

    Execute

    Code:
    /jffs/scripts/FreshJR_QOS -debug
    
    and make sure

    Undf Prio is NOT 1:17​

    ---------------------ADVANCED QOS RULES---------------------

    For even more information about the script configuration, do not forget to open the script Notepad++ and read the green header comments!

    The advanced QOS portion below is to be used in conjunction with the information present in the scripts header comments.

    Enable the Optional Gaming Oriented Rule :
    The optional gaming rule requires your console devices:
    1) to have a static IP assignment in Asus WebUI.

    1. Go to Router home page
    2. Click "LAN" on the left hand side
    3. Scroll down to "Manually Assigned IP around the DHCP list (Max Limit : 128)"
    4. Find your gaming devices in the drop down list and manually assign IP's
    2)this static IP range of your gaming consoles has specified, once again, in the gaming rule itself via CIDR notation AND the gaming rule also has to be un-commented.

    [​IMG]
    [​IMG]
    The modified script then has to be saved and re-uploaded to the router.​

    Custom Rule Templates:
    --Categorize traffic into QOS container to/from LAN PC by its PORT.
    --Categorize traffic into QOS container to/from LAN PC by its IP
    --Categorize traffic into QOS container to/from LAN PC by its MAC
    --Categorize traffic into QOS container to/from WAN SERVER by its IP
    --Categorize traffic into QOS container to/from WAN SERVER by its PORT.

    Rule Templates further explained in comments of script code.​

    Port Range Syntax:

    Port ranges used in rule templates are defined by a PORT and a MASK. Below is a table showing the port range available.


    To use:
    1) Select a desired port to open.
    2) See what masks will work your desired port against the the limitations shown below.
    3) Select your desired mask for your port.

    Code:
    Mask        Grants Ports  Above Start                   Limitations
    FFFF               0                                      Any Port
    FFFE               1                                 Port Divisible by 2
    FFFC               3                                 Port Divisible by 4
    FFF8               7                                 Port Divisible by 8
    FFF0               15                                Port Divisible by 16
    FFE0               31                                Port Divisible by 32
    FFC0               63                                Port Divisible by 64
    FF80               127                               Port Divisible by 128
    FF00               255                               Port Divisible by 256
    FE00               511                               Port Divisible by 512
    FC00               1023                              Port Divisible by 1024
    F800               2047                              Port Divisible by 2048
    F000               4095                              Port Divisible by 4096
    
    You cannot use any mask with any port (Except for mask FFFF).
    All ports have to follow limitations above to work with a specific mask.
    If you apply a mask to a port that does not follow the limitations, it will not work.

    Example:
    Code:
    Port    Mask       Range
     8     0xFFFC       8-11
     6400  0xFFF8    6400-6407
     6400  0xFFF0    6400-6415
     6500  0xFFF0   NOT POSSIBLE
    
    For those that want a system level explanation of what is happening you can read this supplemental portion.
    The way a match is made is that a CPORT (the port being checked against the rule) is turned into binary format. It is then bitwiseAND'd with the MASK, that was also turned to binary format. The result of this operation is checked for equality with the defined PORT in the rule. It will match on its defined range and fail on anything outside. For for example lets do PORT 8 with MASK C, lets see the results when checked against CPORTS 6 and 10.

    Code:
    Check Port 6:
    CPort 6 = 0110   (This is 6 in binary)
    Mask C =  1100   (This is C in binary)
    ______________   (bitwiseAND OPERATION)
    Result = 0100
    Port 8 = 0010    (This is 8 in binary)
    _______________  (AND OPERATION)
    NO MATCH.         Result = port 6 is not included within range of port 8 with mask C
    
    
    Check Port 10:
    CPort 10 = 1010   (This is 10 in binary)
    Mask C =  1100    (This is C in binary)
    _______________   (bitwiseAND OPERATION)
    Result = 1000
    Port 8 = 1000     (This is 8 in binary)
    _______________   (AND OPERATION)
    MATCH.            Result = port 10 is within range of port 8 with mask C
    
    
    

    IP Ranges Syntax:
    IP ranges are defined by a IP and a MASK, same as above but in CIDR notation instead of a hex mask.
    You can google CIDR calculators and see what ranges open. I did not create a table.

    Example:

    Code:
    192.168.1.100/32 = 192.168.6.100 - 192.168.6.100
    192.168.1.100/30 = 192.168.6.100 - 192.168.6.103
    192.168.1.100/28 = 192.168.1.96 - 192.168.1.111
    
    
    App Analysis Redirection:
    It is possible to redirect currently identified traffic by the QOS definitions database into another traffic container.
    This is typically done if you do not agree with the originally chosen traffic destination.
    (Eg. Remove "Snapchat" from VoIP )


    It is possible to see what traffic is being identified as via WebUI -> Adaptive QOS -> Bandwidth Monitor -> Make sure "AppAnalysis" is ON -> click on any device using traffic -> Write down or remember the name of the traffic you want to lookup or redirect.
    **Note: General means "Unidentified" **

    With the name known, you can look up the traffic's mark and recommended prio for use with a custom script rule.

    Aka: /jffs/scripts/FreshJR_QOS -appdb "Snapchat"
    App Database

    The qos app database can be viewed via

    Code:
    cat /tmp/bwdpi/bwdpi.app.db
    
    The app.db has marks identified via decimal numbers, while TC uses hex.
    Some conversion is necessary to crossreference, but a quick reference table has been attached.

    Code:
    pref 1         LAN               mark 0x0000
    pref 2         DEFAULT           mark 0x8000
    pref 3         VOIP              mark 0x8000       (0)
    pref 4         DOWNLOADS         mark 0x8001       (1)
    pref 6         DOWNLOADS         mark 0x8003       (3)
    pref 7         STREAMING         mark 0x8004       (4)
    pref 8         VOIP              mark 0x8005       (5)
    pref 9         VOIP              mark 0x8006       (6)
    pref 10        OTHERS            mark 0x8007       (7)
    pref 11        GAMING            mark 0x8008       (8)
    pref 12        NET               mark 0x8009       (9)
    pref 13        OTHERS            mark 0x800a       (10)
    pref 14        OTHERS            mark 0x800b       (11)
    pref 15        STREAMING         mark 0x800c       (12)
    pref 16        WEB               mark 0x800d       (13)
    pref 17        DOWNLOADS         mark 0x800e       (14)
    pref 18        VOIP              mark 0x800f       (15)
    pref 20        VOIP              mark 0x8011       (17)
    pref 21        NET               mark 0x8012       (18)
    pref 22        NET               mark 0x8013       (19)
    pref 23        NET               mark 0x8014       (20)
    pref 24        OTHERS            mark 0x8015       (21)
    pref 26        OTHERS            mark 0x8017       (23)
    pref 27        WEB               mark 0x8018       (24)
    
     
    Last edited: Jul 14, 2018 at 7:31 PM
  5. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    27,249
    Location:
    Canada
    Pinging @vanic in case he might have a suggestion for you.
     
  6. nezolder

    nezolder New Around Here

    Joined:
    Jan 6, 2017
    Messages:
    4
  7. el pescador

    el pescador Regular Contributor

    Joined:
    Jan 15, 2016
    Messages:
    190
    Does this explain why im getting more consistent online gaming on tomato?
     
  8. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    749
    If your game is not identified and your internet is maxing out, then adaptive QOS does more harm then good. Your game is getting last priority.

    If your game is identified, adaptive QOS is amazing. If you properly set up your limits your ping will not spike and you will not get buffer bloat with the game getting first priority.

    I do not know what QOS tomato has. Asus has traditional QOS as well if you want to set up your games manually. Then it should be equivalent to tomato.
     
    Vexira and beboptrumpet like this.
  9. vanic

    vanic Regular Contributor

    Joined:
    Mar 3, 2015
    Messages:
    141
    Location:
    Taiwan
    @Merlin and @FreshJR,

    What could I do for you?
    For this?
    No catagories can exist beyond level7(defaults). If that was possible, I was planning to move video streaming and file transfers to levels 8 and 9.
    => only prio 0 ~ prio 7, max numbers of catagories are 8.

    So my two plans were to find out what integer stood for unclassified traffic and move it up, or create two priority sets after the default priority didn't work.
    => As Merlin said, if you don't match any number as list, it will be unclassified traffic.
    => create two priority sets after the default priority didn't work : I don't know what you mean here, could you explain?
    => default rule / qdisc : always exists, you can see by command line "tc qdisc show"
    => even if no qos, qdisc still exists (actually, it means for default rule or default qdisc).

    Still can't believe that the function that identifies traffic does not return some integer to define unknown traffic.
    => So leave class 8 (prio7 is empty) for this purpose, is it what you want?

    Thanks,
    Vanic
     
  10. el pescador

    el pescador Regular Contributor

    Joined:
    Jan 15, 2016
    Messages:
    190
    Maybe a silly question but why would it not recognise gaming traffic?
     
  11. el pescador

    el pescador Regular Contributor

    Joined:
    Jan 15, 2016
    Messages:
    190
    Another question.
    I have triple vlans.

    One runs through the ONT....the telephone.
    2 run through the ASUS...internet and tv.

    Does changing the vlan priority make a difference?
    ie...voip vlan is recomended to be 5 (i think ) which when you compare the priortities it says that priority is for low ping.

    I have internet at default prority...but my gaming should be equal to voip or better imo....not at default.
     
  12. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    27,249
    Location:
    Canada
    Because it simply doesn't know how to recognize it. All a router can do to identify a type of traffic is look at the connection ports, remote address, and maybe the content at the beginning of the connection. It has no idea what program is running on the PC itself. So if the signatures provided by Trend Micro doesn't have any definition for your specific game (or if your game recently changed something that Trend Micro were using to recognize it), it will be unrecognized traffic, and will fall in the default category.
     
  13. vanic

    vanic Regular Contributor

    Joined:
    Mar 3, 2015
    Messages:
    141
    Location:
    Taiwan
    vlan : using switch tag to bypass packet in switch port, not to go through CPU and qos / dpi engine can't see this packet.
     
  14. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    749
    Vanic, I would like to give unclassified traffic higher priority. I was reading up on the tc command.

    This is the filter for unclassified traffic:
    Code:
    filter parent 1: protocol all pref 1 u32 fh 813::800 order 2048 key ht 813 bkt 0 flowid 1:17
      mark 0x40000000 0x4000ffff
    Can I change flowid so I can route it into a different priority class? 1:13 for example.
    After it gets into class 1:13, should i about how it is marked? Should I try to mark it as something else, example 0x400d0000 0x403f0000 would mark it as web browsing instead.

    If I can't edit the filter, can I change the priority of class 1:17? Prio = 3 for example.
    Code:
    class htb 1:17 parent 1:1 leaf 17: prio 7 rate 128Kbit ceil 8192Kbit burst 3200b cburst 9598b
    I still have to find the commands on how to modify filters or change class priority. I am very new to this.

    Thank you so much for checking in. I know it was a lot of text.
     
    Last edited: Jan 18, 2017
  15. vanic

    vanic Regular Contributor

    Joined:
    Mar 3, 2015
    Messages:
    141
    Location:
    Taiwan
    Hi @FreshJR,

    Actually, even if you know how to setup tc or iptables by yourself, you still can't break our rule in dpi engine, TrendMicro reserves the last priority for default rule / unclassified class, and their tc (traffic control) rule is created by kernel module, so ASUS can't modify anything on this, and you can't, too. Adaptive qos has its rule (powered by TrendMicro), I think we are hard to change anything if you want to use it. Sorry for that I can't disclose more detail technique on this.

    Thanks,
    Vanic
     
  16. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    749
    Thanks for looking into it.

    If you are in a position to do so, maybe suggest to make unclassifed traffic available able to have configurable priority in future updates.

    In my case, most of traffic is marked correctly but T-Mobile wifi VIOP calling is uncatagorized and gets last priority. I would prefer for any undentified traffic to be above video streaming and downloads.

    Some other users on here wish the same.

    I don't know your involvement, but congratulations on the router design and QOS if you were apart of it. best I have ever used.
     
  17. Sar Mange

    Sar Mange New Around Here

    Joined:
    Jan 25, 2017
    Messages:
    1
    I am having similar issues with my Ooma VoIP. None of the packets are being sorted in the correct classification and all traffic is being set to default. I did see that perhaps AIProtection has to be enabled in order for the packets to be sorted. If this is true which parts have to be enabled? Thanks!
     
  18. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    749
    Incorrect. If adaptive qos is enabled, packets are being sorted. There are no dependencies that also have to be toggled on.

    If they are being sorted into incorrect categories nothing really you can do except hope a definitions update will fix it in the future, or use traditional qos instead.

    Go to administration, firmware update, click check next to signature version. That's what updates the sorting filter if you are on an old one. I am on 1.142

    Also under bandwidth monitor, set the ooma box to highest priority, dragging the red label onto the ooma box. That should further increase its priority, but im guessing default traffic will still get the crap end of the stick.

    For me, I'm switching to traditional qos and explicitly defining T-Mobile wifi calls since that's the major thing I don't want to lag. But adaptive would be best since I could depriotize Netflix and downloads.
     
    Last edited: Jan 25, 2017
  19. el pescador

    el pescador Regular Contributor

    Joined:
    Jan 15, 2016
    Messages:
    190
    So how do we get FIFA 17 gaming packets in the correct category?
     
  20. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    749
    Short answer. You don't and we can't.

    The adaptive qos/packet sorting is done by trend micro for asus.

    Trend micros implementation is proprietary and closed off. In other words, it's a black box with zero modification allowed. It's supplied to asus and they just "plug" it in and turn it on. Not even they control it.

    Reverse engineering and hacking together a work around is outside my skill level.

    Your best bet is using traditional qos and manually defining the game.

    Otherside that, hope that in the future the sorting signatures will get corrected, or that uncatagorized packets get adjustable priority, or that hacks are done to adjust definitions/priority.
     
  21. el pescador

    el pescador Regular Contributor

    Joined:
    Jan 15, 2016
    Messages:
    190
    Bad news.
    :(
     
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!