SQM and ISP's modem router combo

hello my openwrt router is connected to my isp modem router combo that i dont have an option to put into bridge mode..my question is will sqm work properly with a setup like that and if so is there a particular way to set it up

partial bridge mode may hide under names like pass-through or fullcone or dmz
There is nothing special about such setup, if OpenWRT is only device connected to ISP CPE then SQM can be used just like connected to ISP ethernet cable. Only that you have additional device in chain with own milliseconds latency and megabits buffers.

1 Like

True there is going to be a tiny delay for the handling in the network stack/qdisc of the additional device. But when you run SQM the maximal size of the buffers of that device does not really< matter as SQM will manage these well. The pithy description of the causes for bufferbloat is:
over-sized, but under-managed buffer
You can try to fix this from both sides, but simply reducing the buffer size has its draw-backs (buffers act as sort of 'shock absorbers' that can accept packet bursts at above desired output rate and 'pace' them out at the desired rate, that generally is considered useful buffering), blindly reducing buffersize also reduced the utility as shock absorber... that leaves managing the buffers better as the preferable solution and that mostly is what SQM does.

1 Like

theres no ip pass through or bridge or true dmz i dont have that option ..i just turn off the wifi and upnp on the isp router and use the openwrt router..i get open nat type when im connected to the openwrt router...i just wanted to know if when using sqm on that kind of setup if the information passes to the isp router withoutout changing.. like dscp markings and my sqm setup.. if it will remain the same when going out to the internet..

im having problems with my online gaming for a long time now...i get A plus bufferbloat
but my hit registration in the game is bad..could my setup with the isp modem router combo play a part in that problem

Unless you configure cake with the washkeyword cake will not touch the DSCP field. You are aware though that without a TCA/SLA in place, your ISP likely will not treat your DSCPs as anything special, and might either:
a) completely ignore these
b) re-mark these to any other DSCP
c) even treat some DSCPs to worse fate than DSCP zero, e.g. it might delay or even drop packets with specific DSCPs.

1 Like

how to configure cake with washkeyword

There is nothing specific to be done, you just have 6 routers on path in place of 5 commonly encountered.

Let's start with the basics, please post the output of:

  1. cat /etc/config/sqm
  2. ifstatus wan | grep -e device
  3. tc -d qdisc
  4. tc -s qdisc
    see what path MTU is in play, for both IPv4 and IPv6, if tracepath is not yet installed run opkg update ; opkg install iputils-tracepath first
  5. tracepath -b 8.8.8.8
  6. tracepath -b 2001:4860:4860::8888
1 Like

Tricky question, hard to say. Getting reliably great bufferbloat test indicate that sqm is configured decently, but that leaves things like yiur ISP's peering/transit to the gamer servers as potential choke point or overloaded game servers or selection of game servers too far away, issues where local SQM can not really help...

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

config queue 'eth1'
        option enabled '1'
        option interface 'wan'
        option download '50000'
        option upload '50000'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option linklayer 'ethernet'
        option debug_logging '0'
        option verbosity '5'
        option overhead '44'
        option linklayer_advanced '1'
        option tcMTU '2047'
        option tcTSIZE '128'
        option tcMPU '84'
        option linklayer_adaptation_mechanism 'default'

root@OpenWrt:~# tc -d qdisc
qdisc noqueue 0: dev lo root refcnt 2
qdisc mq 0: dev eth0 root
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :7 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :6 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :5 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc noqueue 0: dev lan4 root refcnt 2
qdisc noqueue 0: dev lan3 root refcnt 2
qdisc noqueue 0: dev lan2 root refcnt 2
qdisc noqueue 0: dev lan1 root refcnt 2
qdisc cake 800d: dev wan root refcnt 2 bandwidth 50Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 44 mpu 84
qdisc ingress ffff: dev wan parent ffff:fff1 ----------------
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev phy1-ap0 root refcnt 2
qdisc cake 800e: dev ifb4wan root refcnt 2 bandwidth 50Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 1

it looks like you might not have copied this line fully? I guess it will end with 00ms noatm overhead 44 mpu 84?

root@OpenWrt:~# 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 mq 0: dev eth0 root
 Sent 5166553037 bytes 5523831 pkt (dropped 0, overlimits 0 requeues 36)
 backlog 0b 0p requeues 36
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 5166553037 bytes 5523831 pkt (dropped 0, overlimits 0 requeues 36)
 backlog 0b 0p requeues 36
  maxpacket 1400 drop_overlimit 0 new_flow_count 63 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev lan4 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan3 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan2 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 800d: dev wan root refcnt 2 bandwidth 50Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 44 mpu 84
 Sent 173844584 bytes 263859 pkt (dropped 111, overlimits 263914 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 2431360b of 4Mb
 capacity estimate: 50Mbit
 min/max network layer size:           28 /    1452
 min/max overhead-adjusted size:       84 /    1496
 average network hdr offset:           14

                  Tin 0
  thresh         50Mbit
  target            5ms
  interval        100ms
  pk_delay       1.86ms
  av_delay        200us
  sp_delay          2us
  backlog            0b
  pkts           263970
  bytes       174004020
  way_inds         5352
  way_miss         2797
  way_cols            0
  drops             111
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          5864
  quantum          1514

qdisc ingress ffff: dev wan parent ffff:fff1 ----------------
 Sent 403204422 bytes 365392 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 phy1-ap0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 800e: dev ifb4wan root refcnt 2 bandwidth 50Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100ms noatm overhead 44 mpu 84
 Sent 395476030 bytes 354980 pkt (dropped 10412, overlimits 500032 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 1509062b of 4Mb
 capacity estimate: 50Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       90 /    1544
 average network hdr offset:           14

                  Tin 0
  thresh         50Mbit
  target            5ms
  interval        100ms
  pk_delay       1.34ms
  av_delay        116us
  sp_delay         25us
  backlog            0b
  pkts           365392
  bytes       410731782
  way_inds         6212
  way_miss         2769
  way_cols            0
  drops           10412
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len         26388
  quantum          1514

root@OpenWrt:~#

root@OpenWrt:~# tc -d qdisc
qdisc noqueue 0: dev lo root refcnt 2
qdisc mq 0: dev eth0 root
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :7 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :6 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :5 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc noqueue 0: dev lan4 root refcnt 2
qdisc noqueue 0: dev lan3 root refcnt 2
qdisc noqueue 0: dev lan2 root refcnt 2
qdisc noqueue 0: dev lan1 root refcnt 2
qdisc cake 800d: dev wan root refcnt 2 bandwidth 50Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 44 mpu 84
qdisc ingress ffff: dev wan parent ffff:fff1 ----------------
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev phy1-ap0 root refcnt 2
qdisc cake 800e: dev ifb4wan root refcnt 2 bandwidth 50Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100ms noatm overhead 44 mpu 84
root@OpenWrt:~#

Try adding the following lines to /etc/config/sqm:

        option qdisc_advanced '1'
        option squash_dscp '0'
        option squash_ingress '0'
        option qdisc_really_really_advanced '1'
        option eqdisc_opts 'nat wash'
        option iqdisc_opts 'nat wash

For a potentially even more refined config you could try instead:

        option qdisc_advanced '1'
        option squash_dscp '0'
        option squash_ingress '0'
        option qdisc_really_really_advanced '1'
        option eqdisc_opts 'nat dual-srchost memlimit 4mb wash'
        option iqdisc_opts 'nat dual-dsthost ingress memlimit 4mb'

this will share capacity equally between your internal computers, so that e.g. a torrent client on computer A should not affect on-line gaming on computer B (note torrenting while playing on the same computer is still not recommended/handled).

1 Like
traceroute to 8.8.8.8 (8.8.8.8), 20 hops max, 46 byte packets
 1  192.168.100.1  0.605 ms
 2  100.66.0.1  3.927 ms
 3  172.17.1.136  4.764 ms
 4  172.18.2.86  3.907 ms
 5  172.18.2.1  4.264 ms
 6  190.58.255.153  5.895 ms
 7  63.245.90.152  52.630 ms
 8  74.125.50.210  47.786 ms
 9  *
10  142.251.65.33  47.121 ms
11  8.8.8.8  49.139 ms

tracepath (run from your router), please, unlike traceroute, tracepath will also report the path MTU as part of the trace which is quite convenient....

i dont see anything on my router saying tracepath only traceroute

Yes, that is why I posted this as part of the instructions (re formatted for actually being readable, sorry for hiding it before):
see what path MTU is in play, for both IPv4 and IPv6, if tracepath is not yet installed run
opkg update ; opkg install iputils-tracepath
first