I have been trying to implement this ever since I learn the issues about Bufferbloat, after tried more than 20 different ways to set it up over the period of 7 months, finally I was able to set it up the way I wanted. This is mainly for me to remember how-to do it, and if others find it helpful, I am glad I can be of help.
In this how-to, I am going to move the LAN Port 3 of my QOS router to the WAN, and let it get a DHCP address from my ISP's cable modem (even though my ISP said it's not possible), this way, the traffic through it won't be NAT'ed.
The story started about a year ago, my son started to play graphic intensive online video games, and started to complain about the network is "lagging". Being a wireless router guru dad, I showed him a couple of speedtest websites / apps, with acceptable results. Until one day, he was angry and said he would go somewhere else to paly games.
For the simplicity, my network set up can be viewed as this: ISP -> Cable Modem -> Wireless Router (running TomatoUSB), so my first try was to use QOS feature included in Tomato firmware. I find the Tomato's QOS is very complicated, I spent lots of time reading the forum posts, and finally enabled the QOS according to my understanding. The result was my son couldn't even log into the game servers anymore. I am not saying that QOS doesn't work, it's probably my understandings were incorrect.
I need something simpler that just work. One day I found this article while browsing, I then measured my speed with DSL Reports, my connection was so badly affected by Bufferbloat, most of the times, the test couldn't finish.
I bought 3 Linksys EA4500 wireless routers a couple years ago at a yard sale, it's time to put them into use as QOS devices (the bump referred in the article). I didn't want to replace my main wireless router yet, just in case the SQM implementation causes troubles like the QOS I did on Tomato.
Flashed EA4500 with 18.06, and used almost all the default settings, connected it's WAN to my cable modem and LAN port 1 to my main wireless router's WAN port, and enabled SQM / cake / piece_of_cake for it's WAN, and I made it work!!! Bufferbloat were significantly reduced.
I had 3 options to go further with the experiment:
- Just leave it the way it is, but I didn't like it, because my main wireless router (TomatoUSB) is doing NAT, now I have another EA4500 router (QOS device) also doing NAT, double NAT is bad, plus it makes the port forwarding (required by some games) hard and unreliable;
- I could replace my main router with EA4500, but I have a very complicated wireless network setup, my main router has been configured with lots of stuff, such as complex wifi schedule, access rules, plus I have 6 other routers running Wireless Ethernet Bridge to it. Replacing the main router is certainly doable but would have been painful;
- Removing NAT on EA4500, let it work just like a switch, no NAT/DHCP/DNS/Firewall etc.
At the moment, it seemed to me the 3rd option would be the easiest. Oh man, what I mistake I made.