Local -> Local Traffic Shaping
-
Hi all,
I'm not sure if what I'm hoping to achieve here is possible, or fits within the bounds of 'traffic shaping', but I'm hoping that by asking I'll be pointed in the right direction.
I have a pfSense installation with 1 WAN and 1 physical LAN (consisting of 12 VLANS).
I use my NVIDIA SHIELD to do live gamestreaming from my PC (VLAN20) to the SHIELD (VLAN50). With low network traffic, I get a 1ms response time and gameplay is smooth and faultless.However, things change when there is a bit more network traffic (i.e. wife is streaming a TV show). The latency becomes variable and my games get spikes of lag which make them near unplayable.
After doing a little bit of research, I was thinking that perhaps something like traffic shaping (PRIQ) would assist here. Ideally, I'd just like to set any communication between my PC and the SHIELD to top priority (i.e. between specific IPs on VLAN 20 and 50), and all other traffic as a default second priority. However all of the information I've read online regards bufferbloat and download limiters all requiring a WAN interface, rather than just a simple VLAN -> VLAN solution.
Is Traffic Shaping the way to go here? Or am I on the wrong track?
Thanks in advance!
-
@theskelly Generally traffic shaping works better for uploading, because if you think of the download as a pipe, the ISP fills the pipe so it's full by the time your router sees it. In other words shaping works as traffic exits an interface. You can still set up shaping to prioritize your traffic, and either not set up rules for uploading or prioritize yours for the game uploads.
A limiter will try to cap traffic speeds, but again that's exiting an interface.
It should work for any interfaces, it's just that Internet is typically far slower so that's usually what needs to be shaped.
-
@steveits Thanks for the reply
I completely agree with your point about the internet being the thing that usually requires shaping, which is probably why I can't find anything on local-only shaping! I guess the crux of my situation is that I want latency between two devices on my LAN (separate VLANs, hence the reason they are passing through pfSense) to have as little latency as possible, no matter how much other traffic is whizzing through pfSense.
I've had a crack at implementing it, and here is what I have done thus far.
As I'm new to traffic shaping, I would appreciate any feedback on my attemptI used the wizard to create a PRIQ traffic shaper for VLAN 20, 50 and the WAN. (once created, I just deleted the WAN rules), and ended up with this:
I then created two floating firewall rules (one for each interface) to prioritise the traffic:
Is this all that is required for this to function as expected? Will all other network traffic be de-prioritised relative to my gamestream traffic, or do I need to create other rules for the default queue? Any other points of feedback? (I'm sure there are some gaping holes here my novice brain hasn't identified!)
Thanks again!
-
@theskelly Traffic not assigned a queue will go into the default queue. You can go to Status/Queues and watch them to see if yours is getting into the right queue.
If it isn't working, look at open states and see if the state matches your rule. For instance to de-prioritize a certain web site, it's not a matter of matching traffic from the web site to *, it's from * to the web site, and the reply/download just matches the open state.