Hi guys!
I have built myself a script to apply traffic shaping for my internal home network. The intention is to prioritize certain services above others. It’s built by reading the WIKI and posts/examples from others in this forum and blogs.
The firewall rules execute on a hEX, with an almost default configuration. I use DHCP server, LAN bridge (eth2-5) and a PPPOE interface bound to
eth1 for internet.
Additional firewall filter config not inside the script are 2 rules before the default MARK FASTTRACK rule;
- Accept if connection-bytes: 0-2M
- Accept if connection-rate: 0-150k
These rules serve the purpose to prevent fasttracking before connection classification happens within the mangle rules.
In general this works as i imagined, but the PS4 of my brother always soaks up the entire bandwidth with lower classified connection priority. So there are parts of this script i don’t (fully) understand.
Do my queue trees actually work as intended?
I see the amount of bytes that pass each queue, which is lower than the byte count tracked in Firewall>Filter rules. I imagine fasttracked connections are bypassing the queues. I have read about the topic, but find practical implications hard to understand. There is a specific mention about queues and fasttrack in the WIKI, but as i understand it my config should work.
Examples where queues are used to apply shaping don’t contain a full explanation or use simple queues. Linking a recent fleshed out example i could take a look at would be greatly appreciated.
The intention is to mark connections and drop any packets of lower priority when the higher priority queues are full, preferably at full interface speed. For the games priority i’d like to reduce the buffer bloat as well, which i’m still looking into.
I understand there are software and hardware queues, and syncing between them has a latency cost. It’s possible i have to disable fasttrack completely but i don’t understand the effects it could have on the router/network.
I appreciate it if someone knowledgeable would check out my script before i continue expanding it, because i feel that continuing on this shaky foundation will result in more problems later on. Maybe my use of hierarchical queues is overkill, maybe they are wrongly used, maybe additional configuration is required..
I especially made the script public so it could be used as a practical reference source and is updated on occasion.
It can be found here: https://gist.github.com/Bert-Proesmans/c411825380af25facba6070921eb08b0
Thank you in advance,
Bert