Appropiate configuration for mwan3 loadbalancing + SQM

I have a triple wan setup in my router with some of the worst ISP's in the world (I'm from Venezuela), two using ADSL and a cablemodem using DOCSIS, the total speed loadbalancing these three connections is some about 3---5.5 Mbps download and 400---600 Kbps upload, depending of the time of the day. My bufferbloat is high (C or D in dslreports) and online gaming/skype experience is not so good. I have sqm + sqm extra-scripts installed in my TP-LINK WR940N V4 router (4 MB flash + 32 RAM), general stability of my router is very good, the image is compiled by myself with the latest version. So my question is: What's the best way to apply SQM cake to the loadbalance of my three connections? Considering that my network speed have some variation the whole day, and I wouldn't like to limit the speed my whole lan, because I watch my CCTV system locally and often I put on a Plex media server in my PC.

mwan3 status:

root@OpenWrt:~# mwan3 status
Interface status:
 interface wan is online and tracking is active
 interface wan2 is online and tracking is active
 interface wan3 is online and tracking is active

Current ipv4 policies:
balanced:
 wan3 (25%)
 wan2 (25%)
 wan (50%)
wan2_only:
 wan2 (100%)
wan2_wan:
 wan2 (100%)
wan3_only:
 wan3 (100%)
wan_only:
 wan (100%)
wan_wan2:
 wan (100%)

Current ipv6 policies:
/usr/sbin/mwan3: line 1214: ip6tables: not found

Directly connected ipv4 networks:
******

Directly connected ipv6 networks:

Active ipv4 user rules:
   17   946 - balanced  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            multiport sports 0:65535 multiport dports 443
  195 14635 - balanced  all  --  *      *       0.0.0.0/0            0.0.0.0/0  

Active ipv6 user rules:

My actual SQM settings:

root@OpenWrt:~# cat /etc/config/sqm

config queue 'wan'
        option enabled '0'
        option interface 'eth0'
        option download '1500'
        option upload '250'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option qdisc_advanced '0'
        option ingress_ecn 'ECN'
        option egress_ecn 'ECN'
        option qdisc_really_really_advanced '0'
        option itarget 'auto'
        option etarget 'auto'
        option linklayer 'atm'
        option overhead '44'
        option linklayer_advanced '1'
        option tcMTU '2048'
        option tcTSIZE '128'
        option linklayer_adaptation_mechanism 'cake'

config queue 'wan2'
        option enabled '0'
        option interface 'eth1.2'
        option download '1000'
        option upload '200'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option qdisc_advanced '0'
        option ingress_ecn 'ECN'
        option egress_ecn 'ECN'
        option qdisc_really_really_advanced '0'
        option itarget 'auto'
        option etarget 'auto'
        option linklayer 'atm'
        option overhead '44'
        option linklayer_advanced '1'
        option tcMTU '2048'
        option tcTSIZE '128'
        option linklayer_adaptation_mechanism 'cake'

config queue 'wan3'
        option enabled '0'
        option interface 'eth1.3'
        option download '800'
        option upload '100'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option qdisc_advanced '0'
        option ingress_ecn 'ECN'
        option egress_ecn 'ECN'
        option qdisc_really_really_advanced '0'
        option itarget 'auto'
        option etarget 'auto'
        option linklayer 'ethernet'
        option overhead '18'
        option linklayer_advanced '1'
        option tcMTU '2048'
        option tcTSIZE '128'
        option linklayer_adaptation_mechanism 'cake'

With this config the router turns unstable, its sqm a high resource
consumer? fq_codel does minor impact on resources? Thanks for reading my question.

1 Like

Did you ever figure this out? Iā€™d like to do something similar. Sqm + mwan3

Hey, sorry for the delayed response, it's very CPU intensive to configure the two interfaces separately as I did in the moment, probably you would need a very powerful router. However you can configure SQM on the LAN interface, that way it'll take effect for all your traffic (when doing this remember to interchange the meaning of upload and download speeds), the only problem with this is that local traffic will also be counted towards SQM, which may produce weird results, if someone knows a workaround for that, let me know.

Greetings! i am doing this too. write me to give you a hand

Hola soy de venezuela, y estoy balanceando 2 lineas de cantv ademas de limitarlas luego de ser sumadas mediante sqm qos, si necesitas ayuda escribeme

1 Like

Hi, did anyone figured out if it was a good idea to use mwan3 with SQM? I am facing difficulty in Load Balancing, especially cellular networks.