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.
Output on my DSL reports eth0 still. I think I spotted that TC on upload didnt work so I resorted to iptables. I was lazy and didn't specify an out interface, figured setting a mark wouldn't hurt if it wasn't WAN destined (correct me if that's wrong!)

Code:
iptables -t mangle $ACTION POSTROUTING -p tcp --dport 563 -j MARK --set-mark ${Downloads_mark} 2>/dev/null

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:
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.
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:
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.
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" ]
 
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..........
 
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
 
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!
 
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)

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:
Couldn't do this with Traditional QOS. Great work Fresh!
34444966.png
 
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
 
The “Customize” list with the order mentioned in the first post is recommended.
 
Last edited:
ok, I wasn't clear on that. Thanks very much.
 
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
 
This post is a BETA release intended for users with non typical internet connections.

A majority of QOS users have "eth0" as their interface. This interface works with the original scripts as intended.
It has been found that for any non "eth0" interface SOME custom rules in the QOS script are not working as intended.

PoPPE connection may have "ppp0" as their interface.
Fiber connections may have "vlanXXX" as their interface.

These different interfaces leave some script custom rules partially broken. For users, with non typical interfaces, feel free to TRY using this alternate approach.

Note: This release, uses the COMPATIBLE version of the script as a base. If you are coming from the fast version of the script, you will need to uninstall it before installing this one

--

A quick way to check what interface your internet connections is using is to launch QOS and then look at system log.
You should keep an eye out for this line.

Code:
custom_script: Running /jffs/scripts/firewall-start (args: eth0)

As you can see, on my computer I am using eth0



Script (BETA) for users with non typical internet connections
(users with non "eth0" interfaces)

Changes:
--Implemented custom rules a different way since some TC rules have been found not functioning as intended for non "eth0" interfaces
--Added ability to pass a multi-word query to appdb function instead of being limited to a single word
--Changed wording in template comments hopefully reducing questions as to why custom port rules are not working

For installation, treat as if this was the compatible version with a different name.

This script should work, but as always, report any bugs.

** IF IT HASN'T BEEN CLEAR, THIS IS INTENDED FOR USERS WITH NON eth0 INTERFACES **

--

I would also appreciate if users with non "eth0" interfaces could check if this command

Code:
nvram get wan0_ifname

matches your non "eth0" interface.

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:
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

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.

Turned QoS off then on again and have the following -


Jun 13 14:58:15 custom_script: Running /jffs/scripts/firewall-start (args: ppp0)


so am i ppp0 or eth0?

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:
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.
@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)
 
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
Try disabling asusnat on the tools/other settings page.
 
@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)

Since you have a typical eth0 connection, the compatible/fast versions work as expected.

The alternate wan script is for non-eth0 connections.

I am confused what command you are referring too.
 
Since you have a typical eth0 connection, the compatible/fast versions work as expected.

The alternate wan script is for non-eth0 connections.

I am confused what command you are referring too.

Oops i meant this command?
nvram get wan0_ifname
 
Status
Not open for further replies.

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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