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:
    801
    In your case you are setting upload and download traffic with an upload mark.

    Your upload traffic towards remote server 563 was would filter correctly within TC.
    Your download traffic towards local port 563 would be whitelisted within TC as a result of an incorrectly assigning upload mark on download traffic.

    Designating the interface && two sets of marks syntax is correct and recommended.
     
    Last edited: Jun 2, 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. Jack Yaz

    Jack Yaz Very Senior Member

    Joined:
    Apr 20, 2017
    Messages:
    1,119
    You refer to up/down marks, yet I only see marks defined once. Do you mean the interface (therefore direction)?

    I'll change the rule to explicitly refer to eth0 and see what happens.

    EDIT: even without my flawed iptables rule, TC seems to get incoming traffic right with a port matching rule

    EDIT2: TC on sport for br0, works fine, traffic goes to right category.
    ppp0 is needed for upload. So despite wan0_ifname reporting eth0, it's wrong! ppp0 as shown in firewall-start is correct.
     
    Last edited: Jun 3, 2018
  4. Jack Yaz

    Jack Yaz Very Senior Member

    Joined:
    Apr 20, 2017
    Messages:
    1,119
    Ah....a possible bug. If the firewall restarts, it doesn't clear QoS. So your persistence check does not spot the iptables rules are gone, since the check seems to be based on:

    Code:
    [ "${undf_flowid}" == "1:17" ]
     
  5. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    801
    I’ll fix both bug reports later today.

    Thanks @Jack Yaz

    No there are two sets of upload download marks, in addition to the two interfaces.
     
    Vexira likes this.
  6. Jack Yaz

    Jack Yaz Very Senior Member

    Joined:
    Apr 20, 2017
    Messages:
    1,119
    No worries, I've just discovered a schoolboy error in my script, which is now fixed =/
     
  7. Pit_g

    Pit_g Occasional Visitor

    Joined:
    Mar 11, 2018
    Messages:
    24
    RT-AC68U-0E08: / tmp / home / root # nvram get wan0_ifname
    vlan832

    Script: FreshJR_QOS_v4_ALTERNATIVE_WAN_INTERFACE

    All "$wan" changed to "vlan832" in uploads

    Installed and testing..........
     
  8. Pit_g

    Pit_g Occasional Visitor

    Joined:
    Mar 11, 2018
    Messages:
    24
    freshjr_qos_v4_alternative_wan_interface.txt

    Script works fine ....




    Just be careful with this message in syslog, after activating qos:

    kernel: *** ERROR: [tdts_shell_ioctl_sig_op_load: 95] tdts_core_rule_parsing_trf_load () fails!

    With this problem ......... the traffic does not go to the desired container .......



    (I recommend reboot the router completely after turning off the qos ....... before beginning the installation of the script ........) then installation works fine.....with no problem
     
    Vexira likes this.
  9. skeal

    skeal Very Senior Member

    Joined:
    Apr 30, 2016
    Messages:
    1,578
    Observation: I have come back to FreshJR after experimenting with Traditional QOS. That was a large eventual waste of time as I 'm not totally sure it is not totally fixed. This script runs QOS on an Asus router better than anything else. It should be your go to QOS solution. That is all. Keep up the great work Fresh!
     
    Quoc Huynh and FreshJR like this.
  10. Gasutr 45

    Gasutr 45 Occasional Visitor

    Joined:
    May 23, 2018
    Messages:
    11
    I have a router RT-AC1900P and my internet service is by cable modem, your script works without problem.
    I ask you, your script work on an RT-AC86U? (I'm going to buy an RT-AC86U)
     
  11. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    801
    Users have reported success on the RT-AC86U.
    If you have a non-eth0 internet setup, you might have to use the alternative script version.

    I do not own the RT-AC86U, so @Gasutr 45 confirm with other users as I am not in a position to give definate confirmation. I am leaning towards the YES.
     
    Last edited: Jun 9, 2018
    Vexira and Gasutr 45 like this.
  12. Gasutr 45

    Gasutr 45 Occasional Visitor

    Joined:
    May 23, 2018
    Messages:
    11
    Thank you!
     
  13. skeal

    skeal Very Senior Member

    Joined:
    Apr 30, 2016
    Messages:
    1,578
    Couldn't do this with Traditional QOS. Great work Fresh!
    [​IMG]
     
    Kingp1n likes this.
  14. johnathonm

    johnathonm Regular Contributor

    Joined:
    Aug 1, 2014
    Messages:
    157
    Hi,

    Question, when I have installed FreshJRQOS onto the router and am on the configuration section of QOS it wants me to select a profile (i.e. web surfing, games etc.), which one do I select?

    Thanks,
    J
     
  15. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    801
    The “Customize” list with the order mentioned in the first post is recommended.
     
    Last edited: Jun 10, 2018
  16. johnathonm

    johnathonm Regular Contributor

    Joined:
    Aug 1, 2014
    Messages:
    157
    ok, I wasn't clear on that. Thanks very much.
     
  17. WalkedDave

    WalkedDave Occasional Visitor

    Joined:
    May 26, 2017
    Messages:
    11
    Hello im see this in system log:


    Jun 10 12:13:55 kernel: br0: received packet on vlan1 with own address as source address
    Jun 10 12:13:55 kernel: br0: received packet on vlan1 with own address as source address

    I have the alternative script because i receve net by vlan and i use a swith tl-link sg105E i have config vlan´s in the tp
     
  18. Atomic7431

    Atomic7431 Occasional Visitor

    Joined:
    Apr 25, 2018
    Messages:
    15
    Turned QoS off then on again and have the following -

    Jun 13 14:58:00 kernel: Ebtables v2.0 registered
    Jun 13 14:58:15 nat: apply nat rules (/tmp/nat_rules_ppp0_eth0)
    Jun 13 14:58:15 custom_script: Running /jffs/scripts/firewall-start (args: ppp0)
    Jun 13 14:58:20 rc_service: httpd 399:notify_rc restart_qos;restart_firewall
    Jun 13 14:58:35 nat: apply nat rules (/tmp/nat_rules_ppp0_eth0)
    Jun 13 14:58:36 custom_script: Running /jffs/scripts/firewall-start (args: ppp0)
    Jun 13 14:58:36 adaptive QOS: Delayed Start Triggered (5min)
    Jun 13 15:03:38 adaptive QOS: Applying - Down Rules
    Jun 13 15:03:38 adaptive QOS: Applying --- Up Rules
    Jun 13 15:03:39 adaptive QOS: Modifying Class Rates
    Jun 13 15:03:39 kernel: HTB: quantum of class 10011 is big. Consider r2q change.
    Jun 13 15:03:39 kernel: HTB: quantum of class 10012 is big. Consider r2q change.
    Jun 13 15:03:39 kernel: HTB: quantum of class 10013 is big. Consider r2q change.
    Jun 13 15:03:39 kernel: HTB: quantum of class 10014 is big. Consider r2q change.
    Jun 13 15:03:39 kernel: HTB: quantum of class 10015 is big. Consider r2q change.

    Then i ran the command to check what my connection is named as -

    nvram get wan0_ifname
    i get - eth0

    so am i ppp0 or eth0?

    Im on a fibre to the premesis PPPOE connection
     
    Last edited: Jun 13, 2018
  19. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    801
    Is this before or after the script modifications take place in system log?

    The iptable rules in the script only change packet marks so your error messages really shouldn’t be coming from the rules.

    Futhurmore, if these errors occur before the script is ran then it is definitely not caused by it.

    Firewall start is always correct. JackYaz immediatly reported this bug but I haven’t pushed the fix yet.

    I will try to do so today. It’s a simple change.
     
    Last edited: Jun 13, 2018
    Kingp1n likes this.
  20. Kingp1n

    Kingp1n Regular Contributor

    Joined:
    Feb 27, 2018
    Messages:
    56
    @FreshJR
    Do we need to remove the QoS script to run this command below or can we still run if using the fast script?
    custom_script: Running /jffs/scripts/firewall-start (args: eth0)
     
  21. skeal

    skeal Very Senior Member

    Joined:
    Apr 30, 2016
    Messages:
    1,578
    Try disabling asusnat on the tools/other settings page.
     
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!