Sqm on Second Router

So currently I have a router connected to my 2in1 modem/router which is provided by my isp. I understand it’s better to setup sqm on your main router that gets internet from ISP but my router from my isp won’t let me get openwrt so I setup another router connected to it in which I have openwrt. I understand this creates a double nat feature but I need help on how to best set up sqm on that router any advice will help.

I don't think it makes any difference. You can configure sqm as you would if there was one router only, using your tariff speed, not the speed between the 2 routers.
Have you tried to bridge the first router in order to avoid the double nat?

As @trendy said SQM will work with double NAT, but for SQM to de-bloat your WAN look you need to make sure that no machines connect to the ISP router directly, as SQM needs to see all traffic to/from the WAN link to do its job.

1 Like

I have before and sqm was still not helping with my bufferbloat but having double nat right now doesn’t really affect me it’s just that sqm isn’t really lowering the bufferbloat.

You'll have to follow the troubleshooting steps to verify why isn't sqm working.

What about if i ran it on the lan interface? Would that make a difference?

No, the bottleneck is upstream.

On LAN facing interfaces the meaning of Upload and Download flips. That is because, in reality the direction is always in relation to the interface and not the internet, but since the default use-case is SQM on the WAN link, we named the shaper parameters download and upload, that way only people considering non-standard instantiation on a LAN facing interface need to understand this, while normal users can just follow their intuition.
But on OpenWrt instantiating SQM in br-lan will also affect local traffic from the WiFi radios to the LAN switch, which might not be what you are after.

1 Like

So are you saying there’s no way I can run sqm efficiently on that router unless I make it my only router?

If the only thing connected to the primary router is the router runnimg SQM then things will work. So connect the sqm router's WAN port to the ISP router's LAN port and disable wifi in the ISP router and disconnect all other cables from the ISP router's other LAN ports and SQM should work.
You will have double NAT, but SQM does not care. What it does care about is seeing all traffic to/from the internet.

1 Like

Wouldn't the ISP's router suffer from bufferbloat in this case and increase the latency even for the secondary router?

I don't know much about routers but I'm assuming packets from the secondary router should pass through the ISP's router. Therefore, if the ISP's router doesn't have SQM, it will cause bufferbloat at that point which, in turn, will affect the secondary router.

As long as all traffic also travels to the secondary router, the situation does not change considerably, on egress you can still avoid filling either the primary router's or modem's buffers (by setting SQM's upload rate to slightly below the true upload rate) and on download, the most problematic spot most likely is still on your ISP"s end of your access link. So in short as long as the addoitional router does not introduce its own bottleneck it should not matter at all, and if it does, all you need to do is configure SQM to deal with that bottleneck's capacity.

1 Like