What's new

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

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
In light of the latest merlin update, will updating reset the script or will it crossover seamlessly?
 
In light of the latest merlin update, will updating reset the script or will it crossover seamlessly?

Seamless
 

Thanks! Just did the update, took quite a while after manually rebooting the router but everything seems fine!

So with Undf Prio being at 2 it means it's doing it's thing right? Sorry for all the noobish questions, just want to make sure!

putty_2018-10-12_12-11-32.jpg


Also, a complete off-topic here but is QoS Packet Scheduler in Windows Adapter settings needed at all?
 
Last edited:
Command prompt (admin) is asking me for a password, I'm assuming it's the password to access the router's web interface but I'm getting access denied repeatedly. Ever come across something like this before?
Is your router username still admin or did you rename it to something else? That’s the username needed in the putty command.
 
Do i need to enable Manually Assigned IP as a settings or just and the gaming pc to the DHCP-Liste ?

What value do i need for mask bits ? Where can i find it or do i have to use 30 and just put my own ip adress in the cidr calculator and use all the same values ?
 
Last edited:
@FreshJR i have upgraded to 384.8 Alpha 1 and when i run your script i now get these QOS items in my logs, they were not there
before the upgrade, is it anything to be concerned about?
Oct 13 13:30:09 rc_service: httpd 268:notify_rc restart_qos;restart_firewall
Oct 13 13:30:37 BWDPI: fun bitmap = 17f
Oct 13 13:30:39 rc_service: httpd 268:notify_rc restart_qos;restart_firewall
Oct 13 13:30:39 rc_service: waitting "restart_qos;restart_firewall" via httpd ...
Oct 13 13:30:39 miniupnpd[26535]: shutting down MiniUPnPd
Oct 13 13:30:39 nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
Oct 13 13:30:39 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Oct 13 13:30:39 miniupnpd[22888]: HTTP listening on port 34989
Oct 13 13:30:39 miniupnpd[22888]: Listening for NAT-PMP/PCP traffic on port 5351
Oct 13 13:30:40 adaptive QOS: Applying - Iptable Down Rules
Oct 13 13:30:41 adaptive QOS: Applying - Iptable Up Rules (eth0)
Oct 13 13:30:41 adaptive QOS: TC Modification Delayed Start (5min)
Oct 13 13:31:04 BWDPI: fun bitmap = 1ff
Oct 13 13:31:04 A.QoS: qos_count=0, qos_check=0
Oct 13 13:31:05 A.QoS: qos rule is less than 22
Oct 13 13:31:05 A.QoS: restart A.QoS because set_qos_conf / set_qos_on / setup rule fail
Oct 13 13:31:06 A.QoS: qos_count=0, qos_check=1

Oct 13 13:31:09 miniupnpd[22888]: shutting down MiniUPnPd
Oct 13 13:31:09 nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
Oct 13 13:31:10 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Oct 13 13:31:10 miniupnpd[23344]: HTTP listening on port 58353
Oct 13 13:31:10 miniupnpd[23344]: Listening for NAT-PMP/PCP traffic on port 5351
Oct 13 13:31:11 adaptive QOS: Delayed Start Canceled
Oct 13 13:31:11 adaptive QOS: Applying - Iptable Down Rules
Oct 13 13:31:12 adaptive QOS: Applying - Iptable Up Rules (eth0)
Oct 13 13:31:12 adaptive QOS: TC Modification Delayed Start (5min)
 
Seems like the same error from the past. Just more descriptive now. I’m not on that firmware yet to confirm.

At that point In the log my tc modifications haven’t been applied.
 
Seems like the same error from the past. Just more descriptive now. I’m not on that firmware.

At that point my tc modifications haven’t been applied.
I’ve just done a factory reset and reloaded your script and the same error is there.
I’ve had to slightly lower my upload bandwidth in QOS to get my bufferbloat back in A but everything else appears to be working ok for now.
 
Seems like the same error from the past. Just more descriptive now. I’m not on that firmware yet to confirm.

At that point In the log my tc modifications haven’t been applied.
This is the log for the implementation of your script. TC rules seems to get applied ok.
Oct 13 16:00:34 rc_service: httpd 2184:notify_rc restart_qos;restart_firewall
Oct 13 16:00:37 kernel: Ebtables v2.0 registered
Oct 13 16:00:57 BWDPI: fun bitmap = 1ff
Oct 13 16:00:57 A.QoS: qos_count=0, qos_check=0
Oct 13 16:00:57 kernel: ERR[qos_start:3356] qos_ops is not registered!
Oct 13 16:00:57 A.QoS: set_qos_on fails
Oct 13 16:00:57 A.QoS: restart A.QoS because set_qos_conf / set_qos_on / setup rule fail
Oct 13 16:00:57 kernel: ioctl_iqos_op_switch(1) fail!
Oct 13 16:00:58 A.QoS: qos_count=0, qos_check=1
Oct 13 16:01:02 miniupnpd[2117]: shutting down MiniUPnPd
Oct 13 16:01:02 nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
Oct 13 16:01:02 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Oct 13 16:01:02 miniupnpd[2906]: HTTP listening on port 47497
Oct 13 16:01:02 miniupnpd[2906]: Listening for NAT-PMP/PCP traffic on port 5351
Oct 13 16:01:04 adaptive QOS: Applying - Iptable Down Rules
Oct 13 16:01:04 adaptive QOS: Applying - Iptable Up Rules (eth0)
Oct 13 16:01:05 adaptive QOS: TC Modification Delayed Start (5min)
Oct 13 16:02:12 syslogd started: BusyBox v1.25.1
Oct 13 16:02:12 kernel: klogd started: BusyBox v1.25.1 (2018-10-10 15:45:50 EDT)
Oct 13 16:02:31 rc_service: httpds 2183:notify_rc restart_firewall
Oct 13 16:02:32 nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
Oct 13 16:02:33 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Oct 13 16:02:33 miniupnpd[4066]: HTTP listening on port 36100
Oct 13 16:02:33 miniupnpd[4066]: Listening for NAT-PMP/PCP traffic on port 5351
Oct 13 16:02:34 adaptive QOS: Delayed Start Canceled
Oct 13 16:02:34 adaptive QOS: Applying - Iptable Down Rules
Oct 13 16:02:34 adaptive QOS: Applying - Iptable Up Rules (eth0)
Oct 13 16:02:34 adaptive QOS: TC Modification Delayed Start (5min)
Oct 13 16:02:38 rc_service: httpds 2183:notify_rc restart_firewall
Oct 13 16:02:39 miniupnpd[4066]: shutting down MiniUPnPd
Oct 13 16:02:39 nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
Oct 13 16:02:40 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Oct 13 16:02:40 miniupnpd[4147]: HTTP listening on port 58248
Oct 13 16:02:40 miniupnpd[4147]: Listening for NAT-PMP/PCP traffic on port 5351
Oct 13 16:02:41 adaptive QOS: Delayed Start Canceled
Oct 13 16:02:41 adaptive QOS: Applying - Iptable Down Rules
Oct 13 16:02:41 adaptive QOS: Applying - Iptable Up Rules (eth0)
Oct 13 16:02:41 adaptive QOS: TC Modification Delayed Start (5min)
Oct 13 16:02:45 rc_service: httpds 2183:notify_rc restart_firewall
Oct 13 16:02:46 miniupnpd[4147]: shutting down MiniUPnPd
Oct 13 16:02:46 nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
Oct 13 16:02:47 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Oct 13 16:02:47 miniupnpd[4225]: HTTP listening on port 36462
Oct 13 16:02:47 miniupnpd[4225]: Listening for NAT-PMP/PCP traffic on port 5351
Oct 13 16:02:48 adaptive QOS: Delayed Start Canceled
Oct 13 16:02:48 adaptive QOS: Applying - Iptable Down Rules
Oct 13 16:02:49 adaptive QOS: Applying - Iptable Up Rules (eth0)
Oct 13 16:02:49 adaptive QOS: TC Modification Delayed Start (5min)
Oct 13 16:02:52 rc_service: httpds 2183:notify_rc restart_firewall
Oct 13 16:02:53 miniupnpd[4225]: shutting down MiniUPnPd
Oct 13 16:02:53 nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
Oct 13 16:02:54 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Oct 13 16:02:54 miniupnpd[4304]: HTTP listening on port 36634
Oct 13 16:02:54 miniupnpd[4304]: Listening for NAT-PMP/PCP traffic on port 5351
Oct 13 16:02:57 adaptive QOS: Delayed Start Canceled
Oct 13 16:02:57 adaptive QOS: Applying - Iptable Down Rules
Oct 13 16:02:57 adaptive QOS: Applying - Iptable Up Rules (eth0)
Oct 13 16:02:58 adaptive QOS: TC Modification Delayed Start (5min)
Oct 13 16:03:03 rc_service: httpds 2183:notify_rc restart_firewall
Oct 13 16:03:04 miniupnpd[4304]: shutting down MiniUPnPd
Oct 13 16:03:04 nat: apply nat rules (/tmp/nat_rules_eth0_eth0)
Oct 13 16:03:05 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Oct 13 16:03:05 miniupnpd[4388]: HTTP listening on port 47696
Oct 13 16:03:05 miniupnpd[4388]: Listening for NAT-PMP/PCP traffic on port 5351
Oct 13 16:03:06 adaptive QOS: Delayed Start Canceled
Oct 13 16:03:06 adaptive QOS: Applying - Iptable Down Rules
Oct 13 16:03:07 adaptive QOS: Applying - Iptable Up Rules (eth0)
Oct 13 16:03:07 adaptive QOS: TC Modification Delayed Start (5min)
Oct 13 16:06:22 kernel: htb: htb qdisc 14: is non-work-conserving?
Oct 13 16:08:10 adaptive QOS: Applying TC Down Rules
Oct 13 16:08:10 adaptive QOS: Applying TC Up Rules
Oct 13 16:08:10 adaptive QOS: Modifying TC Class Rates
Oct 13 16:08:10 kernel: HTB: quantum of class 10015 is big. Consider r2q change.
 
Ouch but 6 qos restarts in between before everything settled! Does the same happen after a reboot.

Asus is clearly trying to lock down modifications as new firmware’s come out.
 
Ouch but 6 qos restarts in between before everything settled! Does the same happen after a reboot.

Asus is clearly trying to lock down modifications as new firmware’s come out.
It showed 5 after I rebooted :S
 
Ouch but 6 qos restarts in between before everything settled! Does the same happen after a reboot.

Asus is clearly trying to lock down modifications as new firmware’s come out.
Everything appears to be working as it should though!
 

Attachments

  • BE97CB30-E143-4C8E-AA4B-D661C6B7E902.png
    BE97CB30-E143-4C8E-AA4B-D661C6B7E902.png
    147.7 KB · Views: 451
Random question. Anyone know if its possible to remove leaf classes? Like "Default" and in my case "Others" as well. Jus cusrious ifbit can be done and if thered be any performance benefit? If any i can see small cpu/memory benefit at most.
 
Just a quick gut check here (I'm an English major; please be kind!)

Here are the custom rules I set up per the instructions as I understand them. I chose 192.168.1.128/29 as my range of tunneled IPs, which should give me 192.168.1.128 - 192.168.1.135, or eight VPN device IPs. Is that correct? I then manually assigned my VPN devices in that IP range via manual DHCP and added them to the VPN client rules.

With that in mind, here are the custom rules I added to the script (router is 192.168.1.1, VPN uses 1198 & UDP). Does this make sense? Thank you for any advice.

Code:
Download:
iptables -D POSTROUTING -t mangle -o br0 -d 192.168.1.128/29 -j MARK --set-xmark 0x80000000/0xC0000000  &> /dev/null
iptables -A POSTROUTING -t mangle -o br0 -d 192.168.1.128/29 -j MARK --set-xmark 0x80000000/0xC0000000

Upload:
iptables -D OUTPUT -t mangle -o $wan ! -s 192.168.1.1 -p udp --dport 1198 -j MARK --set-mark ${Downloads_mark_up} &> /dev/null
iptables -A OUTPUT -t mangle -o $wan ! -s 192.168.1.1 -p udp --dport 1198 -j MARK --set-mark ${Downloads_mark_up}
 
I'm having this odd issue where speedtest traffic shows as "Web Surfing" and Apple MacOS & iOS store traffic under "Video & Audio Streaming".

Any idea how to fix this issue?
 
I'm having this odd issue where speedtest traffic shows as "Web Surfing" and Apple MacOS & iOS store traffic under "Video & Audio Streaming".

Any idea how to fix this issue?

Most likely iOS app store data is being identified picked up as iTunes media content. You would have to redirect content identified as iTunes media into something other than video streaming.

Speedtest is most likely being picked up as something else that is causing it to go into web surfing.

Read the appdb / app analysis section and it should explain why this is happening.
 
Last edited:
I'm having this odd issue where speedtest traffic shows as "Web Surfing" and Apple MacOS & iOS store traffic under "Video & Audio Streaming".

Any idea how to fix this issue?
downloads custom section:
${tc} filter add dev br0 protocol all prio 6 u32 match mark 0x8004000A 0xc03fffff flowid ${Downloads}

uploads custom section:
${tc} filter add dev eth0 protocol all prio 6 u32 match mark 0x4004000A 0xc03fffff flowid ${Downloads}

Will correct the iTunes going into video and you can replace "Downloads" to wherever you want to put it, "Others" "Gaming" "Web" etc. I prefer downloads myself but Fresh and I had this conversation a while ago and he prefered it in video due to the music/movie features in iTunes. Are you using a verison of the script you edit and upload yourself or the new one that installs itself from the web? I would imagine you can only edit the manually uploadable version.

actually I think fresh changed a lot of the structure of the new version and this may not entirely be correct lines anymore. I just remembered that from taking apeek at the new script a while ago.

ive bolded the key parts of the lines.. the rest should more closely match the other lines he has in there now.
 
Last edited:
Status
Not open for further replies.

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top