Hi,
Would a qos restart via script update the values once a scripted speedtest updates the up and down rates?
I have implemented the qos restart after the rates are updated but any help on how to check the figures have actually been updated would be appreciated.
tc class show dev br0 | grep "parent 1:1"
tc class show dev eth0 | grep "parent 1:1"
tc class change dev br0 parent 1:1 classid 1:10 htb prio 0 rate ${DownRate0}Kbit ceil ${DownCeil}Kbit burst ${DownBurst0} cburst ${DownCburst0}
tc class change dev br0 parent 1:1 classid 1:11 htb prio 1 rate ${DownRate1}Kbit ceil ${DownCeil}Kbit burst ${DownBurst1} cburst ${DownCburst1}
tc class change dev br0 parent 1:1 classid 1:12 htb prio 2 rate ${DownRate2}Kbit ceil ${DownCeil}Kbit burst ${DownBurst2} cburst ${DownCburst2}
tc class change dev br0 parent 1:1 classid 1:13 htb prio 3 rate ${DownRate3}Kbit ceil ${DownCeil}Kbit burst ${DownBurst3} cburst ${DownCburst3}
tc class change dev br0 parent 1:1 classid 1:14 htb prio 4 rate ${DownRate4}Kbit ceil ${DownCeil}Kbit burst ${DownBurst4} cburst ${DownCburst4}
tc class change dev br0 parent 1:1 classid 1:15 htb prio 5 rate ${DownRate5}Kbit ceil ${DownCeil}Kbit burst ${DownBurst5} cburst ${DownCburst5}
tc class change dev br0 parent 1:1 classid 1:16 htb prio 6 rate ${DownRate6}Kbit ceil ${DownCeil}Kbit burst ${DownBurst6} cburst ${DownCburst6}
tc class change dev br0 parent 1:1 classid 1:17 htb prio 7 rate ${DownRate7}Kbit ceil ${DownCeil}Kbit burst ${DownBurst7} cburst ${DownCburst7}
tc class change dev eth0 parent 1:1 classid 1:10 htb prio 0 rate ${UpRate0}Kbit ceil ${UpCeil}Kbit burst ${UpBurst0} cburst ${UpCburst0}
tc class change dev eth0 parent 1:1 classid 1:11 htb prio 1 rate ${UpRate1}Kbit ceil ${UpCeil}Kbit burst ${UpBurst1} cburst ${UpCburst1}
tc class change dev eth0 parent 1:1 classid 1:12 htb prio 2 rate ${UpRate2}Kbit ceil ${UpCeil}Kbit burst ${UpBurst2} cburst ${UpCburst2}
tc class change dev eth0 parent 1:1 classid 1:13 htb prio 3 rate ${UpRate3}Kbit ceil ${UpCeil}Kbit burst ${UpBurst3} cburst ${UpCburst3}
tc class change dev eth0 parent 1:1 classid 1:14 htb prio 4 rate ${UpRate4}Kbit ceil ${UpCeil}Kbit burst ${UpBurst4} cburst ${UpCburst4}
tc class change dev eth0 parent 1:1 classid 1:15 htb prio 5 rate ${UpRate5}Kbit ceil ${UpCeil}Kbit burst ${UpBurst5} cburst ${UpCburst5}
tc class change dev eth0 parent 1:1 classid 1:16 htb prio 6 rate ${UpRate6}Kbit ceil ${UpCeil}Kbit burst ${UpBurst6} cburst ${UpCburst6}
tc class change dev eth0 parent 1:1 classid 1:17 htb prio 7 rate ${UpRate7}Kbit ceil ${UpCeil}Kbit burst ${UpBurst7} cburst ${UpCburst7}
/jffs/scripts/FreshJR_QOS -init
@Gingernut
Here are my results after disabling FreshJR_QOS
Fresh BOOT (QOS NOT DONE SETTING ITSELF UP)
Code:Feb 22 21:53:43 qos: Applying codel patch Feb 22 21:53:44 kernel: Init chrdev /dev/detector with major 190 Feb 22 21:53:44 kernel: tdts: tcp_conn_max = 8000 Feb 22 21:53:44 kernel: tdts: tcp_conn_timeout = 300 sec Feb 22 21:53:59 kernel: SHN Release Version: 2.0.1 3529123_patch Feb 22 21:53:59 kernel: UDB Core Version: 0.2.14 r3529123 Feb 22 21:53:59 kernel: Init chrdev /dev/idpfw with major 191 Feb 22 21:54:00 kernel: IDPfw: IDPfw is ready Feb 22 21:54:00 kernel: sizeof forward pkt param = 192 Feb 22 21:54:05 kernel: ERR[qos_start:3356] qos_ops is not registered! Feb 22 21:54:05 kernel: ioctl_iqos_op_switch(1) fail! Feb 22 21:54:05 kernel: ERR[qos_start:3356] qos_ops is not registered! Feb 22 21:54:05 kernel: ioctl_iqos_op_switch(1) fail! Feb 22 21:54:05 rc_service: udhcpc 392:notify_rc start_firewall Feb 22 21:54:06 miniupnpd[535]: shutting down MiniUPnPd
Toggle QOS (OFF -> ON) -- messages present but not repeatable upon every toggle
Code:Feb 22 21:56:14 rc_service: httpd 282:notify_rc restart_qos;restart_firewall Feb 22 21:56:35 kernel: ERR[parse_qos_conf:932] Can't set new QoS conf while QoS is started! Feb 22 21:56:35 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!! Feb 22 21:56:35 kernel: ioctl_iqos_op_config() fail! Feb 22 21:56:35 kernel: ERR[qos_start:3344] QoS is already started! Feb 22 21:56:35 kernel: ioctl_iqos_op_switch(1) fail!
Toggle QOS (ON -> OFF) -- no messages
Code:Feb 22 21:58:28 rc_service: httpd 282:notify_rc restart_qos;restart_firewall Feb 22 21:58:49 miniupnpd[1630]: shutting down MiniUPnPd Feb 22 21:58:49 nat: apply nat rules (/tmp/nat_rules_eth0_eth0) Feb 22 21:58:49 custom_script: Running /jffs/scripts/firewall-start (args: eth0) Feb 22 21:58:49 miniupnpd[14019]: HTTP listening on port 57778 Feb 22 21:58:49 miniupnpd[14019]: Listening for NAT-PMP/PCP traffic on port 5351
I still have more debugging ideas, but I am not entirely convinced these messages are coming from my end, since the messages are present without the script running and even a reboot after the removal of the script.
Hi,
I added a new function to simply update the nvram rates and then apply the tc commands as FreshJR recommended.
I am also pulling through the burst and cburst rates applied by ASUS by reading these in, is there a better way to calculate these burst and cburst rates to achieve the best performance for the rates available?
Currently there doesn’t appear to be a simple correlation between rate, category and burst/cburst as two categories with the same rate get different burst rates applied by ASUS.
Thanks and great work on this script!
One thing I have noticed is that the script fails when the router is rebooted
Feb 26 23:23:24 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Feb 26 23:23:27 adaptive QOS: FreshJR FakeTC Started
Feb 26 23:23:27 qos: Applying codel patch
<< RMerlin's fake TC overwrote FreshJR fake TC due to race condition on boot>>
Feb 26 23:24:18 rc_service: udhcpc 435:notify_rc start_firewall
Feb 26 23:24:21 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
Feb 26 23:24:22 adaptive QOS: FreshJR FakeTC Started
<< FreshJR fake TC overwrote RMerlin's fake TC at point in time shortly after, but some QOS commands already been missed at this point >>
Feb 26 23:24:23 adaptive QOS: Parsing QOS config -> (No Change Required)
Feb 26 23:24:25 adaptive QOS: Changing 1:15 class rate
Feb 26 23:24:28 adaptive QOS: Changing 1:16 class rate
Feb 26 23:24:30 adaptive QOS: Applying Custom Upload Rules
Feb 26 23:24:32 adaptive QOS: Changing 1:17 class rate
Feb 26 23:24:33 adaptive QOS: Applying Custom Download Rules
cd C:\putty\
pscp -scp C:\Putty\FreshJR_QOS_beta6.txt admin@192.168.1.1:/jffs/scripts/FreshJR_QOS
pscp -scp C:\Putty\FreshJR_QOS_fakeTC_beta6.txt admin@192.168.1.1:/jffs/scripts/FreshJR_QOS_fakeTC
dos2unix /jffs/scripts/FreshJR_QOS
dos2unix /jffs/scripts/FreshJR_QOS_fakeTC
chmod 0755 /jffs/scripts/FreshJR_QOS
chmod 0755 /jffs/scripts/FreshJR_QOS_fakeTC
sed -i '/FreshJR_QOS/d' /jffs/scripts/firewall-start
/jffs/scripts/FreshJR_QOS install
Hello,
I just install the new script and i'm getting
Feb 28 07:31:25 kernel: ioctl_iqos_op_config() fail!
Feb 28 07:31:25 kernel: ERR[qos_start:3344] QoS is already started!
Feb 28 07:31:25 kernel: ioctl_iqos_op_switch(1) fail!
Feb 28 07:31:28 kernel: ERR[parse_qos_conf:932] Can't set new QoS conf while QoS is started!
Feb 28 07:31:28 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
Feb 28 07:31:28 kernel: ioctl_iqos_op_config() fail!
Feb 28 07:31:28 kernel: ERR[qos_start:3344] QoS is already started!
Feb 28 07:31:28 kernel: ioctl_iqos_op_switch(1) fail!
Feb 28 07:31:32 kernel: ERR[parse_qos_conf:932] Can't set new QoS conf while QoS is started!
Feb 28 07:31:32 kernel: ERR[ioctl_iqos_op_config:3592] parse qos_conf error!!
Feb 28 07:31:32 kernel: ioctl_iqos_op_config() fail!
Feb 28 07:31:32 kernel: ERR[qos_start:3344] QoS is already started!
Feb 28 07:31:32 kernel: ioctl_iqos_op_switch(1) fail!
Waited 20 mins, reboot same problem, disable QOS of course the message stop. after a couple of minutes i got
Feb 28 07:37:48 adaptive QOS: FreshJR fakeTC Running (No Change Required)
Feb 28 07:37:48 adaptive QOS: Parsing QOS config -> (No Change Required)
But when i turn back on the QOS the message is back
any ideas?
Correct. The automatic setting does not work. Do not use it.
For working QOS you have to manually define your limits in the web interface.
It is 80-90% of actual speeds on both upload and download. It varies between ISPs. Experiment with values while checking your buffer bloat.
If your lazy set it to 80% and call it a day.
For me I got away with 93% on download but fell all the way to 80% on upload.
...
...
@maxbraketorque
Yes it WILL limit your internet speeds to the rates you input into to the manual bandwidth setting.
You have 2 options.
(1) Set your rates to 250/12 (I would actually recommend 235/10.5, as you are supposed to go slightly under your max). This will provide traffic prioritization, BUT bufferbloat will exist during the periods your supplied bandwidth is lower than these values.
(2) Set it to 180/11, and never receive buffer bloat.
I find option2 wasteful, as you lose significant bandwidth exhibiting poor network performance when your speeds available are higher than the limit you input since QOS will be dropping many packets unnecessarily.
Option1 seems like the significantly better solution, but it's your call. Experiment and see.
Either way at least you will have prioritization. It seems like your node is conjected, so if you go with less bandwidth, it just means one of your neighbors will just get more.
anyone know of a command I could use to determine what ports are being directed where in putty. like for instance I'm curious if 5223(apple push notifications) and 5228(google play and similar messaging service) are being directed to VOIP or somewhere else already possibly by the FW or this script? Its difficult to generate events for these to determine if theyre working.
filter parent 1: protocol all pref 3 u32 fh 805::800 order 2048 key ht 805 bkt 0 flowid 1:11
mark 0x80000000 0xc03f0000
From /tmp/bwdpi/bwdpi.app.db
4,132,0,Netflix
13,7,0,Speedtest.net
realtc filter add dev br0 protocol all prio 2 u32 match mark 0x80040084 0xc03fffff flowid ${Default} # will stick netflix into defaults
realtc filter add dev br0 protocol all prio 2 u32 match mark 0x800d0007 0xc03fffff flowid ${Default} # will stick speedtest.net into defaults
0x801c -> 0x802b (which is 28-43 decimal)
That's some great newsRMerlin figured out what is causing the errors. There will be an update that should REDUCE the chance of errors.
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!