These instructions assume you already flashed your router with openWrt.
Figuring out how to flash openWrt is a technical challenge if you’re not very tech savvy.
I’d recommend using a router with openWrt preinstalled (like the nanoPi R4S with friendWrt, or the router I sell here).
I believe the openWrt method is the best because it has the newest SQM algorithm, Cake. OpenWrt is constantly under development and usually has bleeding edge tech. Performance depends on your router’s hardware.
R4S users please enable Packet Steering under Network>Interfaces>Global network options before doing this.
Video guide: https://www.youtube.com/watch?v=pXaEc5zQKQU
Login to your openWrt router (default address is 192.168.1.1). Default login for openWrt is username: root. The password is blank on initial setup.
For this last screenshot I will quote the wiki on https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm
In the Link Layer Adaptation tab, choose the kind of link you have:
- For VDSL – Choose Ethernet, and set per packet overhead to 34 (or 26 if you know you are not using PPPoE)
- For DSL of any other type – Choose ATM, and set per packet overhead to 44
- For Cable – Choose Ethernet, and set per packet overhead to 22
- For true ethernet or Fiber to the Premises – Choose Ethernet, and set per packet overhead to 44
- When in Doubt, it’s better to overestimate – Choose packet overhead 44
After all these steps press “Save & Apply” and now you will never lag due to bufferbloat again! You can test it by visiting https://www.waveform.com/tools/bufferbloat
Calibration and Testing
Run “ping www.google.com -t” in command prompt and then run the speedtest.
If you still have an A rating, with low pings during the speedtest. You can incrementally increase your total bandwidth above the 85% you initially set until pings start to spike higher than desired.
Otherwise if your rating is not good or you are getting bad pings try reducing the max bandwidth limits. (Ex. If 85% is still lagging try 80%.)
Doing this allows you find the sweet spot between getting max bandwidth vs experiencing high pings.
Optional: Advanced Options for cake
These are further tweaks you can try to fine tune cake even further. In the Queue Discipline tab of SQM you can do the following….
This turns on squash_dscp, squash_ingress, ECN on ingress and NOECN on egress. Leave them as defaults as they are good the way they are. For reference, on your WAN port, ingress means download while egress means upload.
Next we are going to disable triple-isolate… and enable per host isolation.
To quote the docs, by default, cake will use triple-isolate: “which will first make sure that no internal or internal host will hog too much bandwidth and then will still guarantee for fairness for each host. In that mode, Cake mostly does the right thing. It would ensure that no single stream and no single host could hog all the capacity of the WAN link. However, it can’t prevent a BitTorrent client – with multiple connections – from monopolizing most of the capacity.”
You can enable per host isolation, which will identify all source/destination information. To enable that,
Add the following to the “Advanced option strings” (in the Interfaces → SQM-QoS page; Queue Discipline tab, look for the Dangerous Configuration options):
For queueing disciplines handling incoming packets from the internet (internet-ingress): nat dual-dsthost ingress
For queueing disciplines handling outgoing packets to the internet (internet-egress): nat dual-srchosthttps://www.reddit.com/r/openwrt/comments/jqmboc/sqm_cake_and_piece_of_cake_makes_idm_download/gbtjc26/