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.
I still trust you that you can find the problem to fix completely upload and that the traffic works without problems in each category and are not limited the upload to File Transferring category when using VPN client.
 
I still trust you that you can find the problem to fix completely upload and that the traffic works without problems in each category and are not limited the upload to File Transferring category when using VPN client.

No I can't. That limitation was mentioned in the VPN fix post.

I am sure it is possible, but beyond my knowledge. Complain to Asus, or hope someone with more knowledge on this forum can take a shot at fixing it. I am a regular user like you, who was pissed off at how QOS was working, so I kept googling stuff until I figured out how to change the configuration to my liking. I didn't even know how shell scripting worked before I started it, let alone TC or iptables.

Luckily it is only upload and I typically never saturate my upload. (Then again, I dont use VPN client, and QOS for VPN server is still broken :( )
 
Last edited:
Rules mentioned above worked properly with VPN client installed on router. However, when I try VPN client from laptop, traffic goes under "Others". Any idea how to apply the rules to the mentioned situation?
 
For any who may be interested, and I was unable to find any previous discussion, I can confirm that new rules added to FreshJR_QOS
for IPv6 addresses appear to work perfectly. Just remember to use ip6tables instead of iptables. Such as:

For IPv4:
iptables -D POSTROUTING -t mangle -o br0 -d {ipv4_addr}/32 -j MARK --set-mark ${Streaming_mark_down} &> /dev/null
iptables -A POSTROUTING -t mangle -o br0 -d {ipv4_addr}/32 -j MARK --set-mark ${Streaming_mark_down}


For IPv6:
ip6tables -D POSTROUTING -t mangle -o br0 -d {ipv6_addr} -j MARK --set-mark ${Streaming_mark_down} &> /dev/null
ip6tables -A POSTROUTING -t mangle -o br0 -d {ipv6_addr} -j MARK --set-mark ${Streaming_mark_down}
 
For any who may be interested, and I was unable to find any previous discussion, I can confirm that new rules added to FreshJR_QOS
for IPv6 addresses appear to work perfectly. Just remember to use ip6tables instead of iptables. Such as:

For IPv4:
iptables -D POSTROUTING -t mangle -o br0 -d {ipv4_addr}/32 -j MARK --set-mark ${Streaming_mark_down} &> /dev/null
iptables -A POSTROUTING -t mangle -o br0 -d {ipv4_addr}/32 -j MARK --set-mark ${Streaming_mark_down}


For IPv6:
ip6tables -D POSTROUTING -t mangle -o br0 -d {ipv6_addr} -j MARK --set-mark ${Streaming_mark_down} &> /dev/null
ip6tables -A POSTROUTING -t mangle -o br0 -d {ipv6_addr} -j MARK --set-mark ${Streaming_mark_down}
So i have 2 xboxs with ipv6, what will these rules accomoplish?
 
So i have 2 xboxs with ipv6, what will these rules accomoplish?

The provided examples move the traffic for a specific IP address into the Streaming category. I have used them for my streaming boxes (Apple TV, for example). You can use the same example for any category (
${VOIP_mark_down}, ${Gaming_mark_down}, ${Others_mark_down}, ${Web_mark_down}, ${Streaming_mark_down}, ${Downloads_mark_down}, ${Net_mark_down}, ${Default_mark_down}
). I only tested with the IP address, but I imagine rules referencing specific ports and/or destinations would work as well.
 
Hey @FreshJR can you tell me if the manual bandwidth setting we set, supports decimals? Somewhere I read it supports "whole numbers" which would suggest that decimal values don't work. Can you clear this up for me please? Thanks my friend in advance.
 
Hey @FreshJR can you tell me if the manual bandwidth setting we set, supports decimals? Somewhere I read it supports "whole numbers" which would suggest that decimal values don't work. Can you clear this up for me please? Thanks my friend in advance.

You CAN input decimals into WebUI.

It is true that Rates/Ceils are internally parsed as an interger (whole number / no decimals) within TC and that decimals are not allowed.

The thing is that WebUI takes user input in mbps, multiplies it by 1024 to transform it into kbps value, then truncates (cuts off) any decimals present in that kbps value conversion.

As a result you have a kbps values +- 1 kbps, instead of a mbps value +- 1 mbps.

The end results is that internally Rate/Ceils are "whole numbers" as a kbps input. (The decimals mbps input gets converted correctly).

Eg 68.2 mbps will turn into 70,860 kbps instead of 70860.8 kbps.

---

If you are modifying the raw commands send to TC in the ## DO NOT MODIFY SECTION ## make you that only whole numbers are being sent via the raw command. TC does NOT perform the conversion via submitted via the raw command.
 
You CAN input decimals into WebUI.

It is true that Rates/Ceils are internally parsed as an interger (whole number / no decimals) within TC and that decimals are not allowed.

The thing is that WebUI takes user input in mbps, multiplies it by 1024 to transform it into kbps value, then truncates (cuts off) any decimals present in that kbps value conversion.

As a result you have a kbps values +- 1 kbps, instead of a mbps value +- 1 mbps.

The end results is that internally Rate/Ceils are "whole numbers" as a kbps input. (The decimals mbps input gets converted correctly).

Eg 68.2 mbps will turn into 70,860 kbps instead of 70860.8 kbps.

---

If you are modifying the raw commands send to TC in the ## DO NOT MODIFY SECTION ## make you that only whole numbers are being sent via the raw command. TC does NOT perform the conversion via submitted via the raw command.
Thank you sir!!
 
Hi guys, I am pretty new here, and English is not my primary language, I need a little bit of help here.

I installed the script into my ac5300 stock firmware, worked amazingly well but there is something I need to change.
I think all the game clients like Valve steam, Epic game, Battle net etc. should be classified by "Downloads" instead of "Gaming" category.
I read through the script but I am not quite sure what code I should add to redirect those apps to the new cat.

-----------------------------------------------------------------------------------------------------------------------------------------------------
Can someone please give example to me, let say I wanna redirect Valve steam to "Downloads" category.
Currently I know that I need to search and print the info from app.db with cat command ---->/jffs/scripts/FreshJR_QOS -appdb "Valve Steam"

Here is what I got

Valve Steam
Cat: Gaming
Mark: 0x8008006f 0xc03fffff
Prio: 10

I opened up the script and I know I should add some line here, but I don't know exactly what should I replaced with the values that I got.

##DOWNLOAD APP_DB TRAFFIC REDIRECTION RULES START HERE

${tc} filter add dev br0 protocol all prio $1 u32 match mark 0x8000006B 0xc03fffff flowid ${Others} #Snapchat
${tc} filter add dev br0 protocol all prio 15 u32 match mark 0x800D0007 0xc03fffff flowid ${Downloads} #Speedtest.net
${tc} filter add dev br0 protocol all prio 15 u32 match mark 0x800D0086 0xc03fffff flowid ${Downloads} #Google Play
${tc} filter add dev br0 protocol all prio 15 u32 match mark 0x800D00A0 0xc03fffff flowid ${Downloads} #Apple AppStore

AND here for upload as well

##UPLOAD APP_DB TRAFFIC REDIRECTION RULES START HERE

${tc} filter add dev eth0 protocol all prio $1 u32 match mark 0x4000006B 0xc03fffff flowid ${Others} #Snapchat
${tc} filter add dev eth0 protocol all prio 15 u32 match mark 0x400D0007 0xc03fffff flowid ${Downloads} #Speedtest.net
${tc} filter add dev eth0 protocol all prio 15 u32 match mark 0x400D0086 0xc03fffff flowid ${Downloads} #Google Play
${tc} filter add dev eth0 protocol all prio 15 u32 match mark 0x400D00A0 0xc03fffff flowid ${Downloads} #Apple AppStore

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If someone have sometime, please explain to me how exactly should I add the code, or maybe link me to some other post that might have similar explanation.

Thank you very much.
 
For any who may be interested, and I was unable to find any previous discussion, I can confirm that new rules added to FreshJR_QOS
for IPv6 addresses appear to work perfectly. Just remember to use ip6tables instead of iptables. Such as:

If i have enabled IPV6 on my router (rt-ac5300), does the default script without any new rules added work with IPv6 devices on the lan?
Do i only need to worry about IPv6 when adding new rules that specify specific devices/ip's on my lan?
 
If i have enabled IPV6 on my router (rt-ac5300), does the default script without any new rules added work with IPv6 devices on the lan?
Do i only need to worry about IPv6 when adding new rules that specify specific devices/ip's on my lan?

In my testing, I believe it to only be necessary if you are forcing traffic from/to specific local IP addresses into a category. The categorization built into the engine should be capturing traffic correctly whether Ipv4 or Ipv6 (again, by my own testing - your mileage could vary).
 
In my testing, I believe it to only be necessary if you are forcing traffic from/to specific local IP addresses into a category. The categorization built into the engine should be capturing traffic correctly whether Ipv4 or Ipv6 (again, by my own testing - your mileage could vary).

thanks. It all seems to working just fine. Your post just reminded me of IPv6 which i just never considered to check on. Good to know about the rules though and how to specify IPv6.
 
Hey, is there a reason it takes 5 minutes to apply the rules when altered. Can this be changed?
 
Hey, is there a reason it takes 5 minutes to apply the rules when altered. Can this be changed?
It is timed this way to be non-conflict causing.
 
I think all the game clients like Valve steam, Epic game, Battle net etc. should be classified by "Downloads" instead of "Gaming" category.

A rule already exists to route game data file download traffic into "defaults" instead of "gaming".

There are three situations.

1) Game download identified as Gaming --> rerouted into "defaults"

2) Game download unidentified --> rerouted into "others"

3) Game download identified as https web activity --> rerouted into "web surfing"

What you mentioned sounds like non of these three options.
 
Hi guys, I am pretty new here, and English is not my primary language, I need a little bit of help here.

I installed the script into my ac5300 stock firmware, worked amazingly well but there is something I need to change.
I think all the game clients like Valve steam, Epic game, Battle net etc. should be classified by "Downloads" instead of "Gaming" category.
I read through the script but I am not quite sure what code I should add to redirect those apps to the new cat.

-----------------------------------------------------------------------------------------------------------------------------------------------------
Can someone please give example to me, let say I wanna redirect Valve steam to "Downloads" category.
Currently I know that I need to search and print the info from app.db with cat command ---->/jffs/scripts/FreshJR_QOS -appdb "Valve Steam"

Here is what I got

Valve Steam
Cat: Gaming
Mark: 0x8008006f 0xc03fffff
Prio: 10

I opened up the script and I know I should add some line here, but I don't know exactly what should I replaced with the values that I got.

##DOWNLOAD APP_DB TRAFFIC REDIRECTION RULES START HERE

${tc} filter add dev br0 protocol all prio $1 u32 match mark 0x8000006B 0xc03fffff flowid ${Others} #Snapchat
${tc} filter add dev br0 protocol all prio 15 u32 match mark 0x800D0007 0xc03fffff flowid ${Downloads} #Speedtest.net
${tc} filter add dev br0 protocol all prio 15 u32 match mark 0x800D0086 0xc03fffff flowid ${Downloads} #Google Play
${tc} filter add dev br0 protocol all prio 15 u32 match mark 0x800D00A0 0xc03fffff flowid ${Downloads} #Apple AppStore

AND here for upload as well

##UPLOAD APP_DB TRAFFIC REDIRECTION RULES START HERE

${tc} filter add dev eth0 protocol all prio $1 u32 match mark 0x4000006B 0xc03fffff flowid ${Others} #Snapchat
${tc} filter add dev eth0 protocol all prio 15 u32 match mark 0x400D0007 0xc03fffff flowid ${Downloads} #Speedtest.net
${tc} filter add dev eth0 protocol all prio 15 u32 match mark 0x400D0086 0xc03fffff flowid ${Downloads} #Google Play
${tc} filter add dev eth0 protocol all prio 15 u32 match mark 0x400D00A0 0xc03fffff flowid ${Downloads} #Apple AppStore

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If someone have sometime, please explain to me how exactly should I add the code, or maybe link me to some other post that might have similar explanation.

Thank you very much.

The actual games should be in download or just the updates ? Ive been passively working with battlenet for wow but havent yet been able to properly seperate wow gaming data from update data so they end up in the same category. The issue with that is you want the gaming data higher priority and updates lower so it doesnt saturate the network when theres an update. For wow ive found placing it in 2nd or 3rd container whichever those are for you works well but isnt a perfect solution
 
A rule already exists to route game data file download traffic into "defaults" instead of "gaming".

There are three situations.

1) Game download identified as Gaming --> rerouted into "defaults"

2) Game download unidentified --> rerouted into "others"

3) Game download identified as https web activity --> rerouted into "web surfing"

What you mentioned sounds like non of these three options.

OK, then please fix me if I miss understood something.

- So right now, even though the "Epic Game" client is already classified as "Gaming" but if I try to download new game or update the new patch they will be classified as defaults("Others" with your script)?
If that is the case can I reroute it to "Downloads"(File transfering) instead?

- The problem is when I downloaded updates and new game from those clients while watching the streaming sites like Youtube , Twitch etc. They are really stutter and buffer (but while playing game, game is fine) . And yes my custom rule now is Gaming>Others>Video and Audio Streaming>Voip.>web surfing> file transfer, Which is understandable since I give Others > Vid streaming.

Then I thought those should be in "Downloads"(File transfering) instead of "Defalts"(Others)
 
The actual games should be in download or just the updates ? Ive been passively working with battlenet for wow but havent yet been able to properly seperate wow gaming data from update data so they end up in the same category. The issue with that is you want the gaming data higher priority and updates lower so it doesnt saturate the network when theres an update. For wow ive found placing it in 2nd or 3rd container whichever those are for you works well but isnt a perfect solution

Yeah for most of the games the updates will take place at the Game clients not in the game itself.

I have never played WOW, but if I dont misunderstood for your case. WOW updates take place in game right? that should be hard to manage.

Hope you will find the solution soon bro.
 
OK, then please fix me if I miss understood something.

- So right now, even though the "Epic Game" client is already classified as "Gaming" but if I try to download new game or update the new patch they will be classified as defaults("Others" with your script)?
If that is the case can I reroute it to "Downloads"(File transfering) instead?

- The problem is when I downloaded updates and new game from those clients while watching the streaming sites like Youtube , Twitch etc. They are really stutter and buffer (but while playing game, game is fine) . And yes my custom rule now is Gaming>Others>Video and Audio Streaming>Voip.>web surfing> file transfer, Which is understandable since I give Others > Vid streaming.

Then I thought those should be in "Downloads"(File transfering) instead of "Defalts"(Others)

Actually, game download traffic should be in “defaults” and not even redirected into others.

The rule is simply if identified as gaming and coming from ports 80,443 then redirect into defaults. This works for most downloads distributed from a server.

If your game uses torrent,p2p for game file distribution then you need to add a port since torrents are never hosted on 80,443.

Your video shouldn’t lag if your limits are correctly set up.
 
Last edited:
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