Archive > 20.1 Legacy Series

Traffic shaper is not working properly for me

<< < (2/2)

mimugmail:
Screenshots of Pipes, Queues and Rules please

moonman:
Here you go.

I have no problem with my upload shaping by the way, but it is only 15Mbit/s pipe.

japtain.cack:
I know this is a bit old, but I've been trying for a year to get traffic shaping to work as well as it did in pfsense. I migrated to opnsense about a year ago and have been less than satisfied with traffic shaping, wireguard, and the latest changes to the traffic graph aren't as informative as they were in the past.

So, I've followed the opnsense guides and am very familiar with the links to the issues posted. Specifically
https://forum.opnsense.org/index.php?topic=7235.0

I've nuked all my settings and started from scratch numerous times thinking I did something wrong.

First, I followed the guide from opnsense. This resulted in an upload/download pipe set to my ISPs bandwidth specifications, upload/download queues, and an upload/download rule

This seemed to help, I did get slightly better speeds when something was using all the bandwidth. To test, I had my desktop download a steam game at full blast and did speed tests on my laptop. I was getting about 3Mbps down on the laptop, sometimes less, but the desktop was still downloading at 75Mbps or so, and was more/less unaffected by the shaping.

However, today, I finally got traffic shaping working for shared internet across all vlans to wan in/out.

Here's what I've come up with. But first, let me describe my layout:

ISP UP/DL:
UP: 40Mbps
DL: 80Mbps

VLANs:
20_LAN, 30_guest, 50_isolated, 100_iot

WANs:
only one, pppoe0

output of ipfw -a list, we only care about the queues so I've only included that output.


--- Code: ---root@opnsense01:~ # ipfw -a list

60001 11698461 17007930989 queue 10001 ip from any to any recv pppoe0 xmit lagg0_vlan20 // a6e70bb8-d78d-476e-a4b3-f05e6b3647ea wan -> opt1: Queue WAN Downd
60002  9321607   996798783 queue 10000 ip from any to any xmit pppoe0 recv lagg0_vlan20 // 5e0c6413-0a1f-47a5-9b32-24a34eb595b8 opt1 -> wan: Queue WAN Uplod
60003   263208   333891849 queue 10001 ip from any to any recv pppoe0 xmit lagg0_vlan50 // 4e016558-e251-4b47-a362-8561b1b8d0b5 wan -> opt2: Queue WAN Downd
60004   277856   104526307 queue 10000 ip from any to any xmit pppoe0 recv lagg0_vlan50 // 6625845a-e8c3-40cd-9546-317cafee4d12 opt2 -> wan: Queue WAN Uplod
60005   115963   116951966 queue 10001 ip from any to any recv pppoe0 xmit lagg0_vlan100 // 77dbdd28-393f-43b5-852b-4dd9d06e8e5b wan -> opt4: Queue WAN Dowd
60006   106041    38089982 queue 10000 ip from any to any xmit pppoe0 recv lagg0_vlan100 // 78f3ca35-32ab-428e-a58a-dce8ad097b15 opt4 -> wan: Queue WAN Upld
60007   103515   142606808 queue 10001 ip from any to any recv pppoe0 xmit lagg0_vlan30 // f2c84d39-63dc-46a1-8882-edab23edb93b wan -> opt3: Queue WAN Downd
60008    63038     4545797 queue 10000 ip from any to any xmit pppoe0 recv lagg0_vlan30 // c09e826e-fa31-4c92-88ce-6cf0b3325a1f opt3 -> wan: Queue WAN Uplod
60009 15393100 21516050871 queue 10001 ip from any to any in via pppoe0 // fcadaed6-e9ae-48b7-8f87-32342024d50f wan: Queue WAN Download
60010  1475091  1576433747 queue 10000 ip from any to any out via pppoe0 // 1b5397b6-e3ea-48f6-9843-20262b5a348e wan: Queue WAN Upload


--- End code ---

I'm only providing the WAN rules and VLAN_20 rule screenshots. The WAN rules are from the opnsense shared bandwidth guide, except I'm using direction rather than IP ranges.

The VLAN rules I created myself and you can duplicate these for any other VLANs you need to include. I'm only providing screenshots for VLAN_20_LAN

Basically what it came down to is creating the WAN up/dl rules AND the specific VLAN up/dl rules. I placed the VLAN rules above the generic WAN rules.

So, once I had the up/dl rules for the WAN AND the VLANs, I'm getting a nice split in traffic when my desktop is downloading and I'm doing a speedtest I get a perfect split; as long as nothing else was downloading of course.

Do you need both set of rules? I asked myself that very question. So I disabled the WAN rules and the problem came back, laptop getting poor up/dl speeds again when the network was saturated.
I turned the WAN rules back on and disabled the VLAN rules, same problem.

Once I turned them all back on, everything is working as expected. I cannot explain this behavior but it appears to be working as expected. I also rebooted between enabling disabling the WAN/VLAN rules when testing this theory, so something getting hung up shouldn't be the case.

TL;DR
Follow the opnsense guide for sharing internet for all users, except for the rules. Then, create WAN up/dl rules similar to mine AND individual up/dl rules per VLAN. Use my screenshots as reference.









GiantJack:
Hi !
I do have VLANs but didn't wanted to do specific shaper on it....but still, I wasn't able to make the traffic shaper on my LAN (without V).

I apply same idea:  I made eachs rules twice, with and without the LAN in interface2, seems to works much better now!
if some are interested, my post is here: https://forum.opnsense.org/index.php?topic=22776.msg108503#msg108503
I will add information about my tests with the idea from japtain.cack

Navigation

[0] Message Index

[*] Previous page

Go to full version