Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
20.7 Legacy Series
»
Traffic shaper and ACK packets
« previous
next »
Print
Pages: [
1
]
Author
Topic: Traffic shaper and ACK packets (Read 7541 times)
Waschbuesch
Newbie
Posts: 27
Karma: 4
Traffic shaper and ACK packets
«
on:
May 23, 2020, 11:43:11 am »
Hi there,
I noticed something weird when trying to prioritize ACK packages.
Selecting "tcp (ACK packets only)" in the proto drop-down results in almost all tcp traffic being matched.
Doing something similar in m0n0wall or even the firewall solution that shall not be named, did not result in comparable behavior.
Though, with those solutions I could (and did) specify the packet size to something very small so only empty ACKs where prioritized. That does not seem to be an option in the OPNsense shaper currently?
If "tcp (ACK packets only)" matches any packet having the ACK flag set, then that is not (to me at least) particularly useful...
Logged
AdSchellevis
Administrator
Hero Member
Posts: 907
Karma: 184
Re: Traffic shaper and ACK packets
«
Reply #1 on:
May 23, 2020, 02:59:33 pm »
Hi,
yes, it matches all tcp traffic with ACK set, which is indeed most of the traffic.
M0n0wall used the same technology (tcpflags in ipfw), but offered the option to select or deselect any of them.
It was added a very long time ago (
https://github.com/opnsense/core/issues/528
), but doesn't look very useful indeed.
There are a couple of options, open a feature request to add flags as an option, so you can select which ones need to be set, maybe accompanied by a switch to expect exactly these flags (negate the rest). Selecting both which must be set and which may not be set (like m0n0 did) could also be an option, but in our layout can be a bit confusing.
The other option is to fix the flags on this option to something more logical (tcpflags ack,!psh ?)
Adding flag selection and handling migrations is obviously more work, currently it's not very high on my list of things todo, but we can always discuss if there's a very good reason why we should really want to prioritise this.
Best regards,
Ad
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Traffic shaper and ACK packets
«
Reply #2 on:
May 24, 2020, 10:56:27 am »
I think TCP stacks have gotten smarter so that pure "ACK" priority isn't really useful (anymore). Technically this is neither a bug or a documentation issue as the expectation is clear and the outcome is correct.
Cheers,
Franco
Logged
Waschbuesch
Newbie
Posts: 27
Karma: 4
Re: Traffic shaper and ACK packets
«
Reply #3 on:
May 24, 2020, 03:10:03 pm »
Thanks to both of you for your replies.
@franco I agree that there is currently no discrepancy w/r to the documentation or the behavior. My point was that the functionality as it is defined right now is not particularily useful.
@AdSchellevis I guess my hope would be that eventually the shaper rule editor will allow for a more complete subset of the choices that the FW rule editor offers.
That would not only be true for tcp flags, but also specifying the type of icmp packet instead of picking them all, etc.
But certainly, all of this is just 'nice to have'.
Martin
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Traffic shaper and ACK packets
«
Reply #4 on:
May 25, 2020, 08:34:10 am »
https://github.com/opnsense/core/issues/528
People need to know what they ask for and also follow up on the functionality if it is not adequate.
Cheers,
Franco
Logged
Waschbuesch
Newbie
Posts: 27
Karma: 4
Re: Traffic shaper and ACK packets
«
Reply #5 on:
May 25, 2020, 04:02:28 pm »
Very OT:
There is this one (weirder than average) episode of X-Files where Mulder meets a genie and actually has three wishes.
His first one is: peace on earth
after which he is the only living human being left on the planet.
So, yes. You
should
be specific when you ask for something. ;-)
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Traffic shaper and ACK packets
«
Reply #6 on:
May 25, 2020, 04:14:36 pm »
True. I only want to point out that we talk about things that others did intent otherwise or wasn't completed for one reason or another. Tracking the origin might help going forward. In the case of this filtering a solution that is a bit more clever around ACK packets is probably better than adding lots of filters that only very few people will be able to configure.
At least that would be my preference in this case.
Cheers,
Franco
Logged
Waschbuesch
Newbie
Posts: 27
Karma: 4
Re: Traffic shaper and ACK packets
«
Reply #7 on:
May 25, 2020, 07:42:50 pm »
The current code:
Code:
[Select]
tcpflags ack
Ad suggested:
Code:
[Select]
tcpflags ack,!psh
which I think would be an improvement.
My suggestion would be to try and narrow it down to packets doing nothing but ack by excluding larger payloads. E.g.:
Code:
[Select]
tcpflags ack iplen 52
Shall I open an issue for this?
Logged
AdSchellevis
Administrator
Hero Member
Posts: 907
Karma: 184
Re: Traffic shaper and ACK packets
«
Reply #8 on:
May 25, 2020, 08:25:13 pm »
sure, we can work out the details in the ticket and patch when there's consensus about the improvement, the current feature isn't very useful.
Logged
FingerlessGloves
Full Member
Posts: 114
Karma: 11
Re: Traffic shaper and ACK packets
«
Reply #9 on:
April 07, 2021, 02:57:29 pm »
Where did we get too with this? just getting iplen on the rule to overcome the problem?
Logged
Adventuring through internet pipes
My Blog
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Traffic shaper and ACK packets
«
Reply #10 on:
April 07, 2021, 03:01:37 pm »
Seems so, yes.
https://github.com/opnsense/core/pull/4181
Cheers,
Franco
Logged
FingerlessGloves
Full Member
Posts: 114
Karma: 11
Re: Traffic shaper and ACK packets
«
Reply #11 on:
April 07, 2021, 03:12:42 pm »
Ah, so it looks like only the new iplen was added, instead of/as well as amending the protocol "tcp (ACK packets only)".
Shame it wasn't both 🤭
I've added iplen of 52 and looks much better now, although without the research makes it look like the option is broken..
Thoughts?
Logged
Adventuring through internet pipes
My Blog
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Traffic shaper and ACK packets
«
Reply #12 on:
April 07, 2021, 03:16:55 pm »
Problem is it does what it says, but it's not expected behaviour when the ACK is being piggybacked on the payload.
Maybe makes sense to push this to the option, but that makes verification harder now that iplen is in there.
IMO iplen < 100 is probably sufficient for this to account for some slop in the stack.
Cheers,
Franco
Logged
FingerlessGloves
Full Member
Posts: 114
Karma: 11
Re: Traffic shaper and ACK packets
«
Reply #13 on:
April 07, 2021, 05:00:30 pm »
Yeah I see that side of it too.
Might be worth adding a note or something to the docs instead, if this is the preferred route, since you say its working but not as expected.
Thanks for the clarification, so you would recommend upping the iplen from 52 to 100?
Logged
Adventuring through internet pipes
My Blog
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
20.7 Legacy Series
»
Traffic shaper and ACK packets