1. Post filters have been ramped up due to high spam activity. If your post is marked for moderation, be patient. A moderator will review and release it as soon as possible.
    Dismiss Notice
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. Nodiaque

    Nodiaque Occasional Visitor

    Joined:
    Mar 17, 2017
    Messages:
    19
    I do have a lot of tc rules, maybe that's the problem?

    Code:
    @RT-AC3100-0000:/jffs/scripts# tc filter show dev br0
    filter parent 1: protocol all pref 1 u32
    filter parent 1: protocol all pref 1 u32 fh 800: ht divisor 1
    filter parent 1: protocol all pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:2
      mark 0x0000 0xc0000000 (success 350927)
    filter parent 1: protocol all pref 2 u32
    filter parent 1: protocol all pref 2 u32 fh 827: ht divisor 1
    filter parent 1: protocol all pref 2 u32 fh 827::800 order 2048 key ht 827 bkt 0 flowid 1:17
      mark 0x80000000 0xc000ffff (success 1182641)
    filter parent 1: protocol all pref 3 u32
    filter parent 1: protocol all pref 3 u32 fh 806: ht divisor 1
    filter parent 1: protocol all pref 3 u32 fh 806::800 order 2048 key ht 806 bkt 0 flowid 1:12
      mark 0x80000000 0xc03f0000 (success 2929)
    filter parent 1: protocol all pref 4 u32
    filter parent 1: protocol all pref 4 u32 fh 824: ht divisor 1
    filter parent 1: protocol all pref 4 u32 fh 824::800 order 2048 key ht 824 bkt 0 flowid 1:16
      mark 0x80010000 0xc03f0000 (success 2042812)
    filter parent 1: protocol all pref 6 u32
    filter parent 1: protocol all pref 6 u32 fh 825: ht divisor 1
    filter parent 1: protocol all pref 6 u32 fh 825::800 order 2048 key ht 825 bkt 0 flowid 1:16
      mark 0x80030000 0xc03f0000 (success 243)
    filter parent 1: protocol all pref 7 u32
    filter parent 1: protocol all pref 7 u32 fh 80b: ht divisor 1
    filter parent 1: protocol all pref 7 u32 fh 80b::800 order 2048 key ht 80b bkt 0 flowid 1:13
      mark 0x80040000 0xc03f0000 (success 37848)
    filter parent 1: protocol all pref 8 u32
    filter parent 1: protocol all pref 8 u32 fh 807: ht divisor 1
    filter parent 1: protocol all pref 8 u32 fh 807::800 order 2048 key ht 807 bkt 0 flowid 1:12
      mark 0x80050000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 9 u32
    filter parent 1: protocol all pref 9 u32 fh 808: ht divisor 1
    filter parent 1: protocol all pref 9 u32 fh 808::800 order 2048 key ht 808 bkt 0 flowid 1:12
      mark 0x80060000 0xc03f0000 (success 641)
    filter parent 1: protocol all pref 10 u32
    filter parent 1: protocol all pref 10 u32 fh 81f: ht divisor 1
    filter parent 1: protocol all pref 10 u32 fh 81f::800 order 2048 key ht 81f bkt 0 flowid 1:15
      mark 0x80070000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 11 u32
    filter parent 1: protocol all pref 11 u32 fh 805: ht divisor 1
    filter parent 1: protocol all pref 11 u32 fh 805::800 order 2048 key ht 805 bkt 0 flowid 1:11
      mark 0x80080000 0xc03f0000 (success 9)
    filter parent 1: protocol all pref 12 u32
    filter parent 1: protocol all pref 12 u32 fh 803: ht divisor 1
    filter parent 1: protocol all pref 12 u32 fh 803::800 order 2048 key ht 803 bkt 0 flowid 1:10
      mark 0x80090000 0xc03f0000 (success 8)
    filter parent 1: protocol all pref 13 u32
    filter parent 1: protocol all pref 13 u32 fh 820: ht divisor 1
    filter parent 1: protocol all pref 13 u32 fh 820::800 order 2048 key ht 820 bkt 0 flowid 1:15
      mark 0x800a0000 0xc03f0000 (success 126)
    filter parent 1: protocol all pref 14 u32
    filter parent 1: protocol all pref 14 u32 fh 821: ht divisor 1
    filter parent 1: protocol all pref 14 u32 fh 821::800 order 2048 key ht 821 bkt 0 flowid 1:15
      mark 0x800b0000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 15 u32
    filter parent 1: protocol all pref 15 u32 fh 81e: ht divisor 1
    filter parent 1: protocol all pref 15 u32 fh 81e::800 order 2048 key ht 81e bkt 0 flowid 1:15
      mark 0x800c0000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 16 u32
    filter parent 1: protocol all pref 16 u32 fh 81c: ht divisor 1
    filter parent 1: protocol all pref 16 u32 fh 81c::800 order 2048 key ht 81c bkt 0 flowid 1:14
      mark 0x800d0000 0xc03f0000 (success 241)
    filter parent 1: protocol all pref 17 u32
    filter parent 1: protocol all pref 17 u32 fh 826: ht divisor 1
    filter parent 1: protocol all pref 17 u32 fh 826::800 order 2048 key ht 826 bkt 0 flowid 1:16
      mark 0x800e0000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 18 u32
    filter parent 1: protocol all pref 18 u32 fh 809: ht divisor 1
    filter parent 1: protocol all pref 18 u32 fh 809::800 order 2048 key ht 809 bkt 0 flowid 1:12
      mark 0x800f0000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 20 u32
    filter parent 1: protocol all pref 20 u32 fh 80a: ht divisor 1
    filter parent 1: protocol all pref 20 u32 fh 80a::800 order 2048 key ht 80a bkt 0 flowid 1:12
      mark 0x80110000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 21 u32
    filter parent 1: protocol all pref 21 u32 fh 801: ht divisor 1
    filter parent 1: protocol all pref 21 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:10
      mark 0x80120000 0xc03f0000 (success 17)
    filter parent 1: protocol all pref 22 u32
    filter parent 1: protocol all pref 22 u32 fh 802: ht divisor 1
    filter parent 1: protocol all pref 22 u32 fh 802::800 order 2048 key ht 802 bkt 0 flowid 1:10
      mark 0x80130000 0xc03f0000 (success 2833)
    filter parent 1: protocol all pref 23 u32
    filter parent 1: protocol all pref 23 u32 fh 804: ht divisor 1
    filter parent 1: protocol all pref 23 u32 fh 804::800 order 2048 key ht 804 bkt 0 flowid 1:10
      mark 0x80140000 0xc03f0000 (success 1345)
    filter parent 1: protocol all pref 24 u32
    filter parent 1: protocol all pref 24 u32 fh 822: ht divisor 1
    filter parent 1: protocol all pref 24 u32 fh 822::800 order 2048 key ht 822 bkt 0 flowid 1:15
      mark 0x80150000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 26 u32
    filter parent 1: protocol all pref 26 u32 fh 823: ht divisor 1
    filter parent 1: protocol all pref 26 u32 fh 823::800 order 2048 key ht 823 bkt 0 flowid 1:15
      mark 0x80170000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 27 u32
    filter parent 1: protocol all pref 27 u32 fh 81d: ht divisor 1
    filter parent 1: protocol all pref 27 u32 fh 81d::800 order 2048 key ht 81d bkt 0 flowid 1:14
      mark 0x80180000 0xc03f0000 (success 1269)
    filter parent 1: protocol all pref 31 u32
    filter parent 1: protocol all pref 31 u32 fh 80c: ht divisor 1
    filter parent 1: protocol all pref 31 u32 fh 80c::800 order 2048 key ht 80c bkt 0 flowid 1:14
      mark 0x801c0000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 32 u32
    filter parent 1: protocol all pref 32 u32 fh 80d: ht divisor 1
    filter parent 1: protocol all pref 32 u32 fh 80d::800 order 2048 key ht 80d bkt 0 flowid 1:14
      mark 0x801d0000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 33 u32
    filter parent 1: protocol all pref 33 u32 fh 80e: ht divisor 1
    filter parent 1: protocol all pref 33 u32 fh 80e::800 order 2048 key ht 80e bkt 0 flowid 1:14
      mark 0x801e0000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 34 u32
    filter parent 1: protocol all pref 34 u32 fh 80f: ht divisor 1
    filter parent 1: protocol all pref 34 u32 fh 80f::800 order 2048 key ht 80f bkt 0 flowid 1:14
      mark 0x801f0000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 35 u32
    filter parent 1: protocol all pref 35 u32 fh 810: ht divisor 1
    filter parent 1: protocol all pref 35 u32 fh 810::800 order 2048 key ht 810 bkt 0 flowid 1:14
      mark 0x80200000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 36 u32
    filter parent 1: protocol all pref 36 u32 fh 811: ht divisor 1
    filter parent 1: protocol all pref 36 u32 fh 811::800 order 2048 key ht 811 bkt 0 flowid 1:14
      mark 0x80210000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 37 u32
    filter parent 1: protocol all pref 37 u32 fh 812: ht divisor 1
    filter parent 1: protocol all pref 37 u32 fh 812::800 order 2048 key ht 812 bkt 0 flowid 1:14
      mark 0x80220000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 38 u32
    filter parent 1: protocol all pref 38 u32 fh 813: ht divisor 1
    filter parent 1: protocol all pref 38 u32 fh 813::800 order 2048 key ht 813 bkt 0 flowid 1:14
      mark 0x80230000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 39 u32
    filter parent 1: protocol all pref 39 u32 fh 814: ht divisor 1
    filter parent 1: protocol all pref 39 u32 fh 814::800 order 2048 key ht 814 bkt 0 flowid 1:14
      mark 0x80240000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 40 u32
    filter parent 1: protocol all pref 40 u32 fh 815: ht divisor 1
    filter parent 1: protocol all pref 40 u32 fh 815::800 order 2048 key ht 815 bkt 0 flowid 1:14
      mark 0x80250000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 41 u32
    filter parent 1: protocol all pref 41 u32 fh 816: ht divisor 1
    filter parent 1: protocol all pref 41 u32 fh 816::800 order 2048 key ht 816 bkt 0 flowid 1:14
      mark 0x80260000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 42 u32
    filter parent 1: protocol all pref 42 u32 fh 817: ht divisor 1
    filter parent 1: protocol all pref 42 u32 fh 817::800 order 2048 key ht 817 bkt 0 flowid 1:14
      mark 0x80270000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 43 u32
    filter parent 1: protocol all pref 43 u32 fh 818: ht divisor 1
    filter parent 1: protocol all pref 43 u32 fh 818::800 order 2048 key ht 818 bkt 0 flowid 1:14
      mark 0x80280000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 44 u32
    filter parent 1: protocol all pref 44 u32 fh 819: ht divisor 1
    filter parent 1: protocol all pref 44 u32 fh 819::800 order 2048 key ht 819 bkt 0 flowid 1:14
      mark 0x80290000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 45 u32
    filter parent 1: protocol all pref 45 u32 fh 81a: ht divisor 1
    filter parent 1: protocol all pref 45 u32 fh 81a::800 order 2048 key ht 81a bkt 0 flowid 1:14
      mark 0x802a0000 0xc03f0000 (success 0)
    filter parent 1: protocol all pref 46 u32
    filter parent 1: protocol all pref 46 u32 fh 81b: ht divisor 1
    filter parent 1: protocol all pref 46 u32 fh 81b::800 order 2048 key ht 81b bkt 0 flowid 1:14
      mark 0x802b0000 0xc03f0000 (success 0)
    
     
  2. deddc23efb

    deddc23efb Regular Contributor

    Joined:
    Nov 28, 2017
    Messages:
    52
    Location:
    Canada
    Well, the stats are definitely showing that your Default (1:17) flowId is getting hit a lot. There is nothing going to Other (1:15).
    Given that you don't see the syslog entry, I still think the script isn't running.
    You can invoke it manually ... simply run "FreshJR_QOS". Perhaps you're hitting something annoying like Dos formatting messing up the script.
    Line 50 in FreshJR's version of the script has a log event that should show up in your syslog. (If you want you can change it to "logger -s " to have it output to stdout as well.)
    If you do not see that log event, the script isn't running.

    Other evidence of this is that you don't see custom rules that FreshJR put in the script ... they go at Pref 2 as well.

    In my personal version I've added a log event at the end as well just so I know it has completed and done something.
     
  3. Nodiaque

    Nodiaque Occasional Visitor

    Joined:
    Mar 17, 2017
    Messages:
    19
    hmmm... yeah something is def wrong, it's like the script isn't runable:
    upload_2018-1-13_10-2-34.png
     
  4. Nodiaque

    Nodiaque Occasional Visitor

    Joined:
    Mar 17, 2017
    Messages:
    19
    I deleted the file and copy/paste the whole code directly into putty. Now I'm getting error on runtime, which is because of the bad paste done by the copy in nano. I'll reupload the file
     
  5. Nodiaque

    Nodiaque Occasional Visitor

    Joined:
    Mar 17, 2017
    Messages:
    19
    That's weird, I'm getting the same error, script not found, when I upload the file again
     
  6. Nodiaque

    Nodiaque Occasional Visitor

    Joined:
    Mar 17, 2017
    Messages:
    19
    Ok, I decided to make a copy/paster from the old freshjr 192 script, now it seems to compile something, I'm waiting for it to end
     
  7. deddc23efb

    deddc23efb Regular Contributor

    Joined:
    Nov 28, 2017
    Messages:
    52
    Location:
    Canada
    Someone else had a similar problem. Do a dos2unix on the file - you can do this in place in the cli.
     
    Vexira likes this.
  8. Nodiaque

    Nodiaque Occasional Visitor

    Joined:
    Mar 17, 2017
    Messages:
    19
    Bah, I replaced the file from the old freshjr that was doing something, now I have a log entry stating it has started the modification. I'm still waiting on the prompt return. Is that suppose to be long?
     
  9. deddc23efb

    deddc23efb Regular Contributor

    Joined:
    Nov 28, 2017
    Messages:
    52
    Location:
    Canada
    Yeah it has a long wait (3 minutes) to avoid colliding with ASUS filter startup.
     
  10. Nodiaque

    Nodiaque Occasional Visitor

    Joined:
    Mar 17, 2017
    Messages:
    19
    Ah, ok. Yeah it just returned and I got some loging information. It does seems to work right now, I'll have an eye on it. Thank you!
     
  11. deddc23efb

    deddc23efb Regular Contributor

    Joined:
    Nov 28, 2017
    Messages:
    52
    Location:
    Canada
    Good news.
    Good news.

    You can double check that the config is correct by examining the pref 2 filters in your tc filter show dev br0 output (and eth0). You should see that the filter that has the 0x8000ffff goes to in your case I think flowid 1:15 rather than flowid 1:17 .
     
    Nodiaque likes this.
  12. medwatt

    medwatt Occasional Visitor

    Joined:
    Jun 13, 2017
    Messages:
    49
    Thanks for your reply. I'm currently on Merlin 382_2. All my downloads get categorized either as "Web Surfing" or "Net Control Packets" and as a result they talk the highest priority.

    https://pastebin.com/CueyUxP4
     
  13. deddc23efb

    deddc23efb Regular Contributor

    Joined:
    Nov 28, 2017
    Messages:
    52
    Location:
    Canada
    medwatt if you include the -B1 flag on your grep it will show you 1 line before the match. That tells you what treatment the traffic is going to (the flow Id at the end of the line.) An efficient version of the command that only shows non zero hits and includes the flow id line would be "
    tc filter show dev br0 | grep -B1 "success [1-9]"

    edited... kept screwing up the end of the command..
     
  14. medwatt

    medwatt Occasional Visitor

    Joined:
    Jun 13, 2017
    Messages:
    49
    Here you go :

    https://pastebin.com/27amyPwQ
     
  15. deddc23efb

    deddc23efb Regular Contributor

    Joined:
    Nov 28, 2017
    Messages:
    52
    Location:
    Canada
    Hmm. Yes. The entries you highlighted originally are being classed as category 0 and category 1 traffic. The last digit in the flowid is the "traffic priority" 0 highest, 7 lowest (original default).

    I don't see anything really wrong in your output.

    It looks like your filters are correct ... or at least the same as on my router. The Net Control filter hit is matching the packets as marked by ASUS and putting them in priority 0. The question for you is WHY is ASUS tagging them that way - are you certain that is incorrect? Have you updated your trend micro signatures? Have you you configured IP tables rules that could be remarking these packets for processing by tc?

    How are you deciding that the traffic is being classified incorrectly? I watch the pps in QoS Statistics screen to what is instantaneously active.

    Wish I could be more help.

    /dedd
     
  16. medwatt

    medwatt Occasional Visitor

    Joined:
    Jun 13, 2017
    Messages:
    49
    I am downloading files using internet download manager and the download manager on my web browser. In fact, no traffic gets directed into the "File Transfer" container. Presently, the internet is unusable when someone is downloading something. I'm going to return back to the previous firmware.
     
  17. deddc23efb

    deddc23efb Regular Contributor

    Joined:
    Nov 28, 2017
    Messages:
    52
    Location:
    Canada
    Release 382.1_2 works well with the script FreshJR published (make sure the file has no odd Dos file problems ... dos2unix). What release were you testing?

    /dedd
     
  18. medwatt

    medwatt Occasional Visitor

    Joined:
    Jun 13, 2017
    Messages:
    49
    That firmware version does not exist for my device (AC68U). I'm back to v380.67 where things work fine. I hope FreshJR will take a look at my issue.
     
  19. deddc23efb

    deddc23efb Regular Contributor

    Joined:
    Nov 28, 2017
    Messages:
    52
    Location:
    Canada
    I'm not sure much can be done for you by the tool. The issue appears to be the pre-classification of your traffic.

    It occurred to me that you can influence that by changing the priority treatment for devices within the GUI. Did you happen to try to prioritize different devices on the QOS-Bandwidth Monitor screen? If you had bumped your test device to high priority, the Trend Micro marking might look .. odd.. just a guess.
    Hope it goes well for you.

    /Dedd
     
  20. medwatt

    medwatt Occasional Visitor

    Joined:
    Jun 13, 2017
    Messages:
    49

Share This Page