I imagine your primary WAN QoS bandwidth settings would overwhelm the LTE backup? Not sure if there is a benefit to trying to make this work if it‘s usually a temporary situation. But send the data next time it happens anyway.Sorry Dave, luckily only a short outage (bandwidth is awful on lte, but better than no internet at all). Will run the command next time it happens (2 home office workers at the moment...).
case $1 in
'0')
case $2 in
'connected')
logger $(date) DSL verbunden
nvram set qos_ibw=92160
nvram set qos_obw=20480
service "restart_qos;restart_firewall"
;;
'disconnected')
logger $(date) DSL getrennt
;;
esac
;;
'1')
case $2 in
'connected')
logger $(date) LTE-Backup verbunden
nvram set qos_ibw=10240
nvram set qos_obw=1024
service "restart_qos;restart_firewall"
;;
'disconnected')
logger $(date) LTE-Backup getrennt
;;
esac
;;
esac
Yes, the errors are because I only expect an “eth” interface name for tc, so I don’t even look for anything like usb0. So I will need to see what the situation looks like with usb0. You can run those commands now and post the results if they include any hint of usb0 in the output.But please don't focus on it, just thought maybe the errors could tell you somehing.
Ok, so that's a valid explanation of courseYes, the errors are because I only expect an “eth” interface name for tc, so I don’t even look for anything like usb0.
If I'm not completely wrong back in time this already worked because you were the one who told me the trick with setting nvram and restarting qos/firewall in wan-event to reinitialize the new bandwidth values. But nevertheless, here we go:So I will need to see what the situation looks like with usb0. You can run those commands now and post the results if they include any hint of usb0 in the output.
admin@router:/tmp/home/root# tc qdisc ls | grep root
qdisc htb 1: dev eth0 root refcnt 2 r2q 10 default 0 direct_packets_stat 521
qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev eth2 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc htb 1: dev br0 root refcnt 2 r2q 10 default 0 direct_packets_stat 32
qdisc pfifo_fast 0: dev wl0.1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev usb0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev tun21 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
admin@router:/tmp/home/root# cat /tmp/bwdpi/dev_wan
eth0
Add those 2 commands to the wan-start script after wan 1 is connected. It might be too soon after QoS restarts to get the results, but it might help catch it automatically. Log the output to a file.Ok, so that's a valid explanation of course
If I'm not completely wrong back in time this already worked because you were the one who told me the trick with setting nvram and restarting qos/firewall in wan-event to reinitialize the new bandwidth values. But nevertheless, here we go:
Code:admin@router:/tmp/home/root# tc qdisc ls | grep root qdisc htb 1: dev eth0 root refcnt 2 r2q 10 default 0 direct_packets_stat 521 qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev eth2 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc htb 1: dev br0 root refcnt 2 r2q 10 default 0 direct_packets_stat 32 qdisc pfifo_fast 0: dev wl0.1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev usb0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev tun21 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 admin@router:/tmp/home/root# cat /tmp/bwdpi/dev_wan eth0
admin@router:/jffs# cat flexqos-failover-log-qdisc
qdisc pfifo_fast 0: dev eth0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev eth2 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev wl0.1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev usb0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
admin@router:/jffs# cat flexqos-failover-log-bwdpi
usb0
I pushed a possible workaround to develop branch if you want to see if it helps next time.Dave, I have some logging for you
Code:admin@router:/jffs# cat flexqos-failover-log-qdisc qdisc pfifo_fast 0: dev eth0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev eth2 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev wl0.1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev usb0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 admin@router:/jffs# cat flexqos-failover-log-bwdpi usb0
No, but while you're running on primary, please post the output of the 2 commands again. I really want to make sure usb0 isn't in dev_wan when it's not primary.Sure, thank you! Switching to dev right now. Should I implement any other logs for you in case a failover happens?
admin@router:/tmp/home/root# tc qdisc ls | grep root
qdisc htb 1: dev eth0 root refcnt 2 r2q 10 default 0 direct_packets_stat 1202
qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev eth2 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc htb 1: dev br0 root refcnt 2 r2q 10 default 0 direct_packets_stat 27
qdisc pfifo_fast 0: dev wl0.1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev usb0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev tun21 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
admin@router:/tmp/home/root# cat /tmp/bwdpi/dev_wan
eth0
You can add this command to wan-start instead of the earlier ones:Code:admin@router:/tmp/home/root# tc qdisc ls | grep root qdisc htb 1: dev eth0 root refcnt 2 r2q 10 default 0 direct_packets_stat 1202 qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev eth2 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc htb 1: dev br0 root refcnt 2 r2q 10 default 0 direct_packets_stat 27 qdisc pfifo_fast 0: dev wl0.1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev usb0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev tun21 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 admin@router:/tmp/home/root# cat /tmp/bwdpi/dev_wan eth0
cat /tmp/bwdpi/dev_wan
realtc qdisc ls | sed -n 's/qdisc htb.*dev \([^b][^r].*\) root.*/\1/p'
May 5 01:06:07 FlexQoS: Applying AppDB rules and TC rates
May 5 01:06:07 FlexQoS: ERROR! Check /tmp/flexqos_tcrules.log
RTNETLINK answers: No such file or directory
Command failed /tmp/flexqos_tcrules:47
RTNETLINK answers: No such file or directory
Command failed /tmp/flexqos_tcrules:48
RTNETLINK answers: No such file or directory
Command failed /tmp/flexqos_tcrules:49
RTNETLINK answers: No such file or directory
Command failed /tmp/flexqos_tcrules:50
RTNETLINK answers: No such file or directory
Command failed /tmp/flexqos_tcrules:51
RTNETLINK answers: No such file or directory
Command failed /tmp/flexqos_tcrules:52
RTNETLINK answers: No such file or directory
Command failed /tmp/flexqos_tcrules:53
RTNETLINK answers: No such file or directory
Command failed /tmp/flexqos_tcrules:54
There has been a timing issue with FlexQoS on reboot and it usually starts too soon for Adaptive QoS to be initialized. I've just pushed a potential fix to the develop branch so that the FlexQoS startup process will wait until the necessary WAN interface is setup in Adaptive QoS.I'm getting this error on boot after upgrading to 1.0.4. It shows the below in the System Log"
Code:May 5 01:06:07 FlexQoS: Applying AppDB rules and TC rates May 5 01:06:07 FlexQoS: ERROR! Check /tmp/flexqos_tcrules.log
and when I pull /tmp/flexqos_tcrules.log it shows:
Code:RTNETLINK answers: No such file or directory Command failed /tmp/flexqos_tcrules:47 RTNETLINK answers: No such file or directory Command failed /tmp/flexqos_tcrules:48 RTNETLINK answers: No such file or directory Command failed /tmp/flexqos_tcrules:49 RTNETLINK answers: No such file or directory Command failed /tmp/flexqos_tcrules:50 RTNETLINK answers: No such file or directory Command failed /tmp/flexqos_tcrules:51 RTNETLINK answers: No such file or directory Command failed /tmp/flexqos_tcrules:52 RTNETLINK answers: No such file or directory Command failed /tmp/flexqos_tcrules:53 RTNETLINK answers: No such file or directory Command failed /tmp/flexqos_tcrules:54
I'm not sure what's going wrong. Any ideas? Thank you!
flexqos develop
flexqos stable
There has been a timing issue with FlexQoS on reboot and it usually starts too soon for Adaptive QoS to be initialized. I've just pushed a potential fix to the develop branch so that the FlexQoS startup process will wait until the necessary WAN interface is setup in Adaptive QoS.
I'm not willing to test it myself by rebooting my router since I'm on the verge of 60 days uptime (up 59 days, 9:17), but if you want to switch to the develop branch and try a reboot, it might resolve the startup issue. You can switch (temporarily) withflexqos develop
To switch back to stable, runflexqos stable
flexqos check
after it fully booted and it said "No TC modifications necessary." If I were to stay on the stable branch (until the next version) does that mean A.QOS/FlexQOS is now working properly? Thank you very much!Yes, as long as the syslog shows that it eventually applies the appdb rules and custom rates correctly, there's no permanent problem. Just startup sequencing issues during a fresh reboot.I try to avoid the the dev branch simply because I work from home and am connected to a virtual desktop 8 hours a day, so I'm a bit nervous about any hiccups in the dev branch. I didflexqos check
after it fully booted and it said "No TC modifications necessary." If I were to stay on the stable branch (until the next version) does that mean A.QOS/FlexQOS is now working properly? Thank you very much!
Correct, for one reason or another it didn't get the yes response, if maybe you accidentally added a space before or after the 1. RunNotice at the end it said "Would you like to restart QoS for modifications to take effect?" and I entered "1" for "Yes" then still got a notice "FlexQoS customizations will not take effect until QoS is restarted." Does that mean it didn't restart?
flexqos restart
to force the QoS restart.You can add this command to wan-start instead of the earlier ones:
Code:cat /tmp/bwdpi/dev_wan realtc qdisc ls | sed -n 's/qdisc htb.*dev \([^b][^r].*\) root.*/\1/p'
admin@router:/jffs# tc qdisc ls | grep root
qdisc htb 1: dev eth0 root refcnt 2 r2q 10 default 0 direct_packets_stat 682
qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev eth2 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc htb 1: dev br0 root refcnt 2 r2q 10 default 0 direct_packets_stat 31
qdisc pfifo_fast 0: dev wl0.1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev usb0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev tun21 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
admin@router:/jffs# cat /tmp/bwdpi/dev_wan
usb0
admin@router:/jffs# realtc qdisc ls | sed -n 's/qdisc htb.*dev \([^b][^r].*\) root.*/\1/p'
eth0
Oct 21 06:25:19 nat: apply nat rules (/tmp/nat_rules_usb0_usb0)
Oct 21 06:25:19 custom_script: Running /jffs/scripts/nat-start
Oct 21 06:25:20 custom_script: Running /jffs/scripts/firewall-start (args: usb0)
Oct 21 06:25:21 custom_script: Running /jffs/scripts/service-event-end (args: restart wan_line)
Oct 21 06:25:25 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=13813) called with 2 args: -start usb0
Oct 21 06:25:25 WAN(1)_Connection: Ethernet link down.
Oct 21 06:25:25 FlexQoS: [*] Killing Delayed Process (pid=12303)
Oct 21 06:25:25 FlexQoS: [*] 12303 admin 1572 S sh /jffs/addons/flexqos/flexqos.sh -start usb0
Oct 21 06:25:27 FlexQoS: Applying iptables static rules
Oct 21 06:25:27 FlexQoS: Applying iptables custom rules
Oct 21 06:25:28 FlexQoS: Flushing conntrack table
Oct 21 06:25:30 FlexQoS: Applying AppDB rules and TC rates
OK, this is interesting since I wasn’t expecting dev_wan to be different than the sed output. So it seems that Adaptive QoS doesn’t use the usb0 interface name with tc during a failover. I won’t trust dev_wan anymore as the primary source of the WAN interface name for tc. But I could potentially trust it for iptables setup if I don’t want to trigger a complete firewall restart. Will have to think about it some more.Manually triggered a failover to get some logs for you while runnin on usb0:
Code:admin@router:/jffs# tc qdisc ls | grep root qdisc htb 1: dev eth0 root refcnt 2 r2q 10 default 0 direct_packets_stat 682 qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev eth2 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc htb 1: dev br0 root refcnt 2 r2q 10 default 0 direct_packets_stat 31 qdisc pfifo_fast 0: dev wl0.1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev usb0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: dev tun21 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 admin@router:/jffs# cat /tmp/bwdpi/dev_wan usb0 admin@router:/jffs# realtc qdisc ls | sed -n 's/qdisc htb.*dev \([^b][^r].*\) root.*/\1/p' eth0
No more errors in syslog:
Code:Oct 21 06:25:19 nat: apply nat rules (/tmp/nat_rules_usb0_usb0) Oct 21 06:25:19 custom_script: Running /jffs/scripts/nat-start Oct 21 06:25:20 custom_script: Running /jffs/scripts/firewall-start (args: usb0) Oct 21 06:25:21 custom_script: Running /jffs/scripts/service-event-end (args: restart wan_line) Oct 21 06:25:25 FlexQoS: /jffs/addons/flexqos/flexqos.sh (pid=13813) called with 2 args: -start usb0 Oct 21 06:25:25 WAN(1)_Connection: Ethernet link down. Oct 21 06:25:25 FlexQoS: [*] Killing Delayed Process (pid=12303) Oct 21 06:25:25 FlexQoS: [*] 12303 admin 1572 S sh /jffs/addons/flexqos/flexqos.sh -start usb0 Oct 21 06:25:27 FlexQoS: Applying iptables static rules Oct 21 06:25:27 FlexQoS: Applying iptables custom rules Oct 21 06:25:28 FlexQoS: Flushing conntrack table Oct 21 06:25:30 FlexQoS: Applying AppDB rules and TC rates
On FlexQoS status page classification is done, speedtest states 10/1 as configured. Looking good so far in my opinion.
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!