SQM Guest Bandwidth restriction

Need to throttle bandwidth to Guest/Shared WIFI (eth0.4), retain all bandwidth for personal WIFI (eth0.1). eth1 is WAN has no associated interface.

I picked up below code from config file (WINSCP).

Appreciate experts to check the below SQM setup is correct. Presently the DSLreport I can see huge drop in internet speed as the graph develops. Youtube buffer bloat happens some of the days.

The average net downlaod speed is around 45mbps though ISP is 120mbps (downlload).
Upload speed provided by ISP is 40 mbps


config queue
	option debug_logging '0'
	option verbosity '5'
	option enabled '1'
	option interface 'eth1'
	option upload '38000'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option download '0'
	option qdisc_advanced '0'
	option linklayer 'none'

config queue
	option debug_logging '0'
	option verbosity '5'
	option squash_dscp '1'
	option squash_ingress '1'
	option ingress_ecn 'ECN'
	option egress_ecn 'NOECN'
	option enabled '1'
	option download '0'
	option upload '45000'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option qdisc_advanced '1'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'dual-srchost'
	option eqdisc_opts 'dual-dsthost ingress'
	option interface 'eth0.4'
	option linklayer 'none'

config queue
	option debug_logging '0'
	option verbosity '5'
	option enabled '1'
	option interface 'eth0.1'
	option download '0'
	option upload '100000'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option linklayer 'ethernet'
	option overhead '44'
	option qdisc_advanced '1'
	option squash_dscp '1'
	option squash_ingress '1'
	option ingress_ecn 'ECN'
	option egress_ecn 'NOECN'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'dual-srchost'
	option eqdisc_opts 'dual-dsthost ingress'


Help my understand this, did you hook up two different APs (one for guest and one for private) to different ports of your router and use VLANs to differentially shape traffic by VLAN, or did you create two SSIDs on a combined wifi router?

SQM setup as below


Mmmh, thanks, complicated set-up.

I would:

  1. Instantiate SQM on the true wan interface with correct settings for your link, for both upstream and downstream (with the appropriate bell's and whistles), to handle ISP bufferbloat. You could simply try per-internal-IP-fairness, which generally works well for home networks (and if you have few enough guest users, might already be good enough, as no guest will be able to monopolize all bandwidth).

  2. Instantiate additional SQM instance(s) for the guest networks. If all guest come via wlan1.1, I would try to instantiate SQM on that interface, also, I would configure SQM for both upstream and downstream (and also for per-internal-IP fairness, to treat all guests equally). Instantiating a shaper on a bridge is always a bit dicy, especially if you want differential speeds for up and downlink.

  3. no dedicated shaper for the private WLAN, unless you want to be generous to your guests (but then you might be better off, with just SQM on WAN and per-internal-IP fairness).

  4. If I would see the guest traffic as a real problem, I would probably use a dedicated secondary router for the guests, with NAT, in which case all guest traffic will look like coming from one internal IP, and hence all guests will only get 1/(total number of internal hosts active) of the available internet speed.

I would recommend you try 1 and see whether that is not already good enough and only go to 2 if you are unhappy :wink:

Thanks Moeller for quick response
Will try the options suggested and monitor performace for a week or so.

Learning from all experts like you and this forum in particular, I am no way into networking or IT, just a passion to experiment. Appreciate your knowledge and good luck!

What if the instantiation is on VLAN say eth0.3 or eth0.4. Is it same issues as a bridge.

Without going of option 4, possibly a modified option 2 with a secondary router. Just a calrification for my information.

"
BTW implemented option 1 on WAN eth1. With "per-internal-IP-fairness" and "link layer set as = ethernet overhead 44pckt.
Thanks, will monitor it for couple of days.

In theory that should work, but there is another thread here that seems to indicate that there might be issues in sqm's hotplug handling for vlan interfaces...[quote="ranish, post:6, topic:74456"]
Without going of option 4, possibly a modified option 2 with a secondary router. Just a calrification for my information.
[/quote]

Sure, in that case the secondary router would be acting as AP and not do NAT, you could easily instantiate sqm on the APs port that you connect to your main router.

If you post the output of tc -s qdisc and cat /etc/config/sqm I will try to offer comments on potential changes/improvements.

thanks Moeller0

Pasted codes for option1&2 and seperately option1 alone. I am planning to experiment both cases for 3-4 days each.

Option 1 (Wan) & Option 2 (Guest WIFI) instantiated

/etc/config$ cat /etc/config/sqm

config queue
	option debug_logging '0'
	option verbosity '5'
	option enabled '1'
	option interface 'eth1'
	option upload '38000'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option download '120000'
	option qdisc_advanced '1'
	option squash_dscp '1'
	option squash_ingress '1'
	option ingress_ecn 'ECN'
	option egress_ecn 'NOECN'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'nat dual-dsthost ingress'
	option eqdisc_opts 'nat dual-srchost'
	option linklayer 'ethernet'
	option overhead '44'

config queue
	option debug_logging '0'
	option verbosity '5'
	option squash_dscp '1'
	option squash_ingress '1'
	option ingress_ecn 'ECN'
	option egress_ecn 'NOECN'
	option enabled '1'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option qdisc_advanced '1'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'dual-srchost'
	option eqdisc_opts 'dual-dsthost ingress'
	option download '12000'
	option linklayer 'ethernet'
	option overhead '44'
	option interface 'eth0.3'
	option upload '32000'
/root$ tc -s qdisc
qdisc noqueue 0: dev lo root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 8019: dev eth1 root refcnt 9 bandwidth 38Mbit besteffort dual-srchost nat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44 
 Sent 3230081 bytes 8622 pkt (dropped 0, overlimits 8140 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 102912b of 4Mb
 capacity estimate: 38Mbit
 min/max network layer size:           28 /    1440
 min/max overhead-adjusted size:       72 /    1484
 average network hdr offset:           14

                  Tin 0
  thresh         38Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        925us
  av_delay        116us
  sp_delay          9us
  backlog            0b
  pkts             8622
  bytes         3230081
  way_inds          643
  way_miss          357
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          1454
  quantum          1159

qdisc ingress ffff: dev eth1 parent ffff:fff1 ---------------- 
 Sent 14578064 bytes 13955 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc mq 0: dev eth0 root 
 Sent 117043722 bytes 154713 pkt (dropped 0, overlimits 0 requeues 1) 
 backlog 0b 0p requeues 1
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :7 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :6 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :5 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 117043722 bytes 154713 pkt (dropped 0, overlimits 0 requeues 1) 
 backlog 0b 0p requeues 1
  maxpacket 1454 drop_overlimit 0 new_flow_count 3 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-EVPN root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.5 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-RanWIFI root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.4 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-lan root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-vlan3share root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 801d: dev eth0.3 root refcnt 2 bandwidth 32Mbit besteffort dual-dsthost nonat nowash ingress no-ack-filter split-gso rtt 100.0ms noatm overhead 44 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 0b of 4Mb
 capacity estimate: 32Mbit
 min/max network layer size:        65535 /       0
 min/max overhead-adjusted size:    65535 /       0
 average network hdr offset:            0

                  Tin 0
  thresh         32Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay          0us
  av_delay          0us
  sp_delay          0us
  backlog            0b
  pkts                0
  bytes               0
  way_inds            0
  way_miss            0
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            0
  bk_flows            0
  un_flows            0
  max_len             0
  quantum           976

qdisc ingress ffff: dev eth0.3 parent ffff:fff1 ---------------- 
 Sent 4048 bytes 88 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-wan root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth1.2 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc mq 0: dev wlan1 root 
 Sent 209825928 bytes 380672 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan1 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 209053391 bytes 375251 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 74 drop_overlimit 0 new_flow_count 1 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 772537 bytes 5421 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev wlan0 root 
 Sent 1092652727 bytes 943652 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 1092629189 bytes 943589 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 15303 drop_overlimit 0 new_flow_count 4 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 0: dev wlan0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 23538 bytes 63 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev wlan1-1 root 
 Sent 14766373 bytes 13613 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan1-1 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1-1 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 14765405 bytes 13609 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 66 drop_overlimit 0 new_flow_count 1 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1-1 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1-1 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 968 bytes 4 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 801a: dev ifb4eth1 root refcnt 2 bandwidth 120Mbit besteffort dual-dsthost nat wash ingress no-ack-filter split-gso rtt 100.0ms noatm overhead 44 
 Sent 14885694 bytes 13955 pkt (dropped 0, overlimits 11739 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 39680b of 6000000b
 capacity estimate: 120Mbit
 min/max network layer size:           46 /    1440
 min/max overhead-adjusted size:       90 /    1484
 average network hdr offset:           14

                  Tin 0
  thresh        120Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        246us
  av_delay         88us
  sp_delay          2us
  backlog            0b
  pkts            13955
  bytes        14885694
  way_inds          820
  way_miss          342
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            0
  bk_flows            2
  un_flows            0
  max_len         12758
  quantum          1514

qdisc cake 801e: dev ifb4eth0.3 root refcnt 2 bandwidth 12Mbit besteffort dual-srchost nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44 
 Sent 5280 bytes 88 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 576b of 4Mb
 capacity estimate: 12Mbit
 min/max network layer size:           46 /      46
 min/max overhead-adjusted size:       90 /      90
 average network hdr offset:            4

                  Tin 0
  thresh         12Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay          3us
  av_delay          0us
  sp_delay          0us
  backlog            0b
  pkts               88
  bytes            5280
  way_inds            0
  way_miss            1
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            0
  bk_flows            1
  un_flows            0
  max_len            60
  quantum           366


Only Option 1 (Wan) instantiated

/etc/config$  cat /etc/config/sqm

config queue
	option debug_logging '0'
	option verbosity '5'
	option enabled '1'
	option interface 'eth1'
	option upload '38000'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option download '120000'
	option qdisc_advanced '1'
	option squash_dscp '1'
	option squash_ingress '1'
	option ingress_ecn 'ECN'
	option egress_ecn 'NOECN'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'nat dual-dsthost ingress'
	option eqdisc_opts 'nat dual-srchost'
	option linklayer 'ethernet'
	option overhead '44'
/etc/config$ tc -s qdisc
qdisc noqueue 0: dev lo root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 8019: dev eth1 root refcnt 9 bandwidth 38Mbit besteffort dual-srchost nat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44 
 Sent 43601706 bytes 87133 pkt (dropped 1, overlimits 152831 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 278720b of 4Mb
 capacity estimate: 38Mbit
 min/max network layer size:           28 /    1440
 min/max overhead-adjusted size:       72 /    1484
 average network hdr offset:           14

                  Tin 0
  thresh         38Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        2.1ms
  av_delay        763us
  sp_delay         53us
  backlog            0b
  pkts            87134
  bytes        43603160
  way_inds          655
  way_miss          639
  way_cols            0
  drops               1
  marks               0
  ack_drop            0
  sp_flows            0
  bk_flows            1
  un_flows            0
  max_len          1454
  quantum          1159

qdisc ingress ffff: dev eth1 parent ffff:fff1 ---------------- 
 Sent 468965261 bytes 353810 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc mq 0: dev eth0 root 
 Sent 117082295 bytes 154996 pkt (dropped 0, overlimits 0 requeues 1) 
 backlog 0b 0p requeues 1
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :7 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :6 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :5 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 117082295 bytes 154996 pkt (dropped 0, overlimits 0 requeues 1) 
 backlog 0b 0p requeues 1
  maxpacket 1454 drop_overlimit 0 new_flow_count 3 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-EVPN root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.5 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-RanWIFI root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.4 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-lan root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-vlan3share root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 801d: dev eth0.3 root refcnt 2 bandwidth 32Mbit besteffort dual-dsthost nonat nowash ingress no-ack-filter split-gso rtt 100.0ms noatm overhead 44 
 Sent 42 bytes 1 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 448b of 4Mb
 capacity estimate: 32Mbit
 min/max network layer size:           28 /      28
 min/max overhead-adjusted size:       72 /      72
 average network hdr offset:            0

                  Tin 0
  thresh         32Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay          0us
  av_delay          0us
  sp_delay          0us
  backlog            0b
  pkts                1
  bytes              42
  way_inds            0
  way_miss            1
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            0
  un_flows            0
  max_len            42
  quantum           976

qdisc ingress ffff: dev eth0.3 parent ffff:fff1 ---------------- 
 Sent 10166 bytes 221 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-wan root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth1.2 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc mq 0: dev wlan1 root 
 Sent 210217270 bytes 382164 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan1 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 209441157 bytes 376719 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 74 drop_overlimit 0 new_flow_count 1 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 776113 bytes 5445 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev wlan0 root 
 Sent 1092762596 bytes 943958 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan0 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan0 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 1092739058 bytes 943895 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 15303 drop_overlimit 0 new_flow_count 4 ecn_mark 0
  new_flows_len 0 old_flows_len 1
qdisc fq_codel 0: dev wlan0 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan0 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 23538 bytes 63 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev wlan1-1 root 
 Sent 486139504 bytes 352770 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev wlan1-1 parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1-1 parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 486137455 bytes 352761 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 66 drop_overlimit 0 new_flow_count 1 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1-1 parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wlan1-1 parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn 
 Sent 2049 bytes 9 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 801a: dev ifb4eth1 root refcnt 2 bandwidth 120Mbit besteffort dual-dsthost nat wash ingress no-ack-filter split-gso rtt 100.0ms noatm overhead 44 
 Sent 486501699 bytes 353809 pkt (dropped 1, overlimits 262189 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 116392b of 6000000b
 capacity estimate: 120Mbit
 min/max network layer size:           46 /    1440
 min/max overhead-adjusted size:       90 /    1484
 average network hdr offset:           14

                  Tin 0
  thresh        120Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay          3us
  av_delay          1us
  sp_delay          1us
  backlog            0b
  pkts           353810
  bytes       486503153
  way_inds          847
  way_miss          617
  way_cols            0
  drops               1
  marks               0
  ack_drop            0
  sp_flows            0
  bk_flows            1
  un_flows            0
  max_len         12830
  quantum          1514

qdisc cake 801e: dev ifb4eth0.3 root refcnt 2 bandwidth 12Mbit besteffort dual-srchost nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44 
 Sent 13260 bytes 221 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 576b of 4Mb
 capacity estimate: 12Mbit
 min/max network layer size:           46 /      46
 min/max overhead-adjusted size:       90 /      90
 average network hdr offset:            8

                  Tin 0
  thresh         12Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay          3us
  av_delay          1us
  sp_delay          1us
  backlog            0b
  pkts              221
  bytes           13260
  way_inds            0
  way_miss            2
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            0
  bk_flows            1
  un_flows            0
  max_len            60
  quantum           366


Let's start with that and only go into the others if you decide to switch :wink:

/etc/config/sqm looks decent, IMHO the only things worth looking at are:

  1. The bandwidth settings, what values do you robustly and repeatble measure against a close by speedtest server (maybe your ISP's or ookla's speedtest.net, and netflix's fast.com). As first approximation, I would set the achivable net goodput of a reliable speedtest as the gross speed for the shaper.
  2. Encapsulation

That looks like there is some additional encapsulation in play, typically the 1440 value should be 1500 for unadorned ethernet, or 1492 if PPPoE is used, no idea what your ISP uses these 60 bytes for... (this is relevant, as you might need to account for that depending on how your ISP controlls your access speed). Could you post the content of the "Share Your Results" box of https://www.speedguide.net/analyzer.php to get some idea about the encapsulation? Question: Does your ISP also offer IPv6 and what IPv4 address gets assigned to your wan interface? Something starting with 10. ?

  1. The minimal sizes:

indicate that on that interface you see smaller packets than likely can/will be used, so please add the following stanzas to your /etc/config/sqm for option on:

	option linklayer_advanced '1'
	option tcMTU '2047'
	option tcTSIZE '128'
	option linklayer_adaptation_mechanism 'default'
	option tcMPU '88'

We might need to adjust the tcMPU value.

But none of these changes seem urgent...

The OpenWRT router interface WAN6 has data transmission, so it may imply some IPV6 traffic i guess.
image

But nlbwmon dont show any IPV6. Somethng i need to study further.

« SpeedGuide.net TCP Analyzer Results »
Tested on: 2020.09.19 08:19
IP address: 37.210.xx.xx
Client OS/browser: Windows 10 (Chrome 85.0.4183.102)

TCP options string: 020405780103030801010402
MSS: 1400
MTU: 1440
TCP Window: 131584 (not multiple of MSS)
RWIN Scaling: 8 bits (2^8=256)
Unscaled RWIN : 514
Recommended RWINs: 64400, 128800, 257600, 515200, 1030400
BDP limit (200ms): 5263kbps (658KBytes/s)
BDP limit (500ms): 2105kbps (263KBytes/s)
MTU Discovery: ON
TTL: 109
Timestamps: OFF
SACKs: ON
IP ToS: 00000000 (0)

messgae in same page

Please note the ISP encapsulation mode is PPPoE

Donwload speed is about 140mbps and uplaod 38mbps, which i checked in recent past in speedtest.net. DSLreports download is always half that value.

Please note the ISP modem shows 1492 MRU
image

Mmmh, okay that does not look like an IPv6 tunnel is used by your ISP. But the smaller than expected MTU/MSS to remote sites like speedguide indicates a tunnel somewhere along the path but a tunnel with apparently working pMTU discovery, so very unlikely to be your problem....

That might indicate an upstream congestion issue.

@ranish, it seems you found a solution that you are happy with, great!
Could I convince you to sort of close this thread with a short description of your initial challenge and the solution you opted for in the end? That way others finding this thread will have an easier time learning from your experience. Thanks!

This solution worked. i.e have the SQM only in eth1 (Wan). No noticable bufferbloat observed.

By instantiating on wlan 1-1 (guest WiFi) the throttling perculated even to my private WiFI on Wan1. So as suggested by Moeller0 this is indeed not producing desired dividents.

Did not try this option yet, will try in coming weeks and report the findings.

1 Like

Yes, this should work for keeping wan bufferbloat under control, glad it works. Whether that is sufficiently fair to also solve your guest network issue is another question, but it should at least improve things over the starting condition to buy you time to research alternative options.

I am always amazed how well cake's per-internal-IP fairness mode actually behaves. Sure it is not a perfect match for everybody, but it avoids the rather annoying condition that one/a few unresponsive users/applications can make an internet klink pretty much unusable for the rest. :wink:

It should help, especially when parents have online meetings + simultaneouly kids have online classes and the guest had unwittingly let the torrents flow into his dirty pc. Had video meeting disruptions in the past, hope that is settled once and for all.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.