-
Notifications
You must be signed in to change notification settings - Fork 748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi Interface shaping using queues leads to halved bandwidth #5573
Comments
It's sort of the same as https://docs.opnsense.org/manual/how-tos/shaper_limit_per_user.html#limit-maximum-internet-bandwidth-users-can-consume but without the masks set in pipes since you don't need user-based limits. What stands out is that you use bi-directional rules which don't work as it should and the correct way to get the limit is to set source / destination for each rule as the documentation lays out. Cheers, |
Thanks for fast reply. I have to add something here, didn't think this may be relevant, but i'm using queues so i can add rules for my "internet of things" network later. So bandwith should be shared between users, depending on weight. I was thinking about using source and destination for my use case too, but unfortunately i wasn't able to select e.g. "GUEST net" like it's possible for firewall rules. So i tried to adapt https://docs.opnsense.org/manual/how-tos/shaper_guestnet.html which seems to work, except the halved bandwith :( Also these rules doesn't seem to be bidirectional to me: When i'm testing download, packet counter for one rule is increasing as expected and during upload the other rule matches. |
It might be best to fiddle a bit with the rules and see which change you need, maybe we miss something, maybe we don't, I'm not 100% sure to be honest. The rules are stored in |
Thanks for this hint, i'll try to change |
Yes. |
I was able to find the real problem. It is no good idea to mix up rules matching interfaces (without src/destination) and rules matching addresses only.
So for download both, rule 60001 and 60003 matched and i think because of this, the packet count twice for pipe --> the bandwith is reduced. Though, the example here is wrong https://docs.opnsense.org/manual/how-tos/shaper_guestnet.html
So only traffic in one direction is shaped when following current example. |
looks like we accepted the wrong fix last year opnsense/docs@680af4f, let me change the docs and close this ticket. |
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
I was trying to limit bandwith networks using pipes with given bandwidth and also some queues so bandwith is shared by weight between different clients.
I tried to defined rules using 2 interfaces, so they work independent of network as ip ranges are meant to change and also ipv6 should be added in near future.
When doing this, bandwith for clients is only halve of the bandwith as defined in pipes.
To Reproduce
Steps to reproduce the behavior, for detailed settings look at screenshots:
All in all setup is similar to https://docs.opnsense.org/manual/how-tos/shaper_guestnet.html, but with queues.
Then test download/upload bandwith for a single client behind GUEST interface with iperf3 or simple speed test.
One can observe, that only half of bandwith of pipes from step 1 is available.
Expected behavior
Bandwith should not be halved, if there is only one client in GUEST net, it should get full bandwith given by pipe.
Describe alternatives you considered
As a workaround rules based on source and destination may be possible, but these networks are meant to change.
Screenshots
pipe up
pipe down
queue up
queue down
rule up
rule down
Additional context
output of
ipfw show
lists these rules:According to https://www.freebsd.org/cgi/man.cgi?ipfw(8) this should apply:
It looks like the
out
modifier is missing so packets are processed twice which leads to halved bandwidth because of using queues.Also changing direction of rule doesn't add any modifier, but only changes interfaces within the rule.
So maybe it's enough to simply add
out
modifier afterdestination
in rule if second interface is selected.Relates to https://forum.opnsense.org/index.php?topic=26913.0
Environment
Software version used and hardware type if relevant, e.g.:
OPNsense 22.1 on X11SBA-LN4F (https://www.supermicro.com/en/products/motherboard/X11SBA-LN4F)
The text was updated successfully, but these errors were encountered: