OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: walkerx on June 11, 2022, 11:06:49 am

Title: QOS with IPv4/IPv6 setup
Post by: walkerx on June 11, 2022, 11:06:49 am
Hi,

I'm on a 310/50 Gfast connection and trying to setup QOS, so have followed the tutorial and also this post - https://forum.opnsense.org/index.php?PHPSESSID=l6ksdi82278q8t3n3a1j8ucvda&topic=7423.0 (https://forum.opnsense.org/index.php?PHPSESSID=l6ksdi82278q8t3n3a1j8ucvda&topic=7423.0)

On following that post and performing a test using the bufferbloat site, it always says my latency is not brilliant.

I've set the download pipe as follows
Bandwidth: 275 Mbit/s
Scheduler: FlowQueue-CoDel
(FQ-)Codel ECN: Enabled

Upload pipe, used same settings but with 45 for the bandwidth

Queues
Download/Upload
Weight: 100
Mask: source
(FQ-)CoDel ECN enabled

Rules
Interface: WAN
Protocol: ip
Source: Ipv4 - Destination: Any (upload rule)
Source: Any - Destination: IPv4 (download rule)
Target: Points to the relevant queues

How do I get these rules to also work with IPv6 addresses and to also improve the latency, etc

thanks in advance
Title: Re: QOS with IPv4/IPv6 setup
Post by: defaultuserfoo on June 11, 2022, 12:44:56 pm
What exactly are the latencies you're trying to improve upon?

This bufferbloat site seems silly because bufferbloat occurs when buffers are exeedingly large, not when buffers are being used to avoid having to drop traffic.  They even don't have that distinction, so what is their purpose?  How exactly are they trying to measure what, and what might they actually be measuring?

What size buffers are being used is mostly out of your control, and they can't measure the sizes of all the buffers your traffic is going through and don't know what's going on with these buffers.  And who is to say what "exeedingly large" is.

It's better not to mess with traffic shaping unless you have a particular problem with congestion that can actually be identified, analysed and improved upon.  Traffic shaping can not overcome insufficient bandwidth.
Title: Re: QOS with IPv4/IPv6 setup
Post by: walkerx on June 11, 2022, 03:51:20 pm
thanks for the reply

it's reporting my latency was over 60ms and not good for online gaming, but there doesn't seem to be an issue when doing online gaming.

Only thing we do notice is that if xbox or pc is downloading they hog the bandwidth, rather than qos kicking in across the devices and can only assume that this is because they using IPv6.

So is there a way to get QOS working for both IPv4 and IPv6
Title: Re: QOS with IPv4/IPv6 setup
Post by: dinguz on June 11, 2022, 05:59:14 pm
In the ‘advanced’ section of the rules menu, you can make rules that select traffic based on direction (in/out), that way it matches both IP4 and IP6 traffic. Perhaps this can help you?
Title: Re: QOS with IPv4/IPv6 setup
Post by: defaultuserfoo on June 11, 2022, 08:54:09 pm
thanks for the reply

it's reporting my latency was over 60ms and not good for online gaming, but there doesn't seem to be an issue when doing online gaming.

Only thing we do notice is that if xbox or pc is downloading they hog the bandwidth, rather than qos kicking in across the devices and can only assume that this is because they using IPv6.

Is it causing issues?  You could limit their bandwidth and then downloads take even longer.  I wanted to limit my xbox some time ago and the best way would have been to limit it in the switch, but due to lack of documentation and unresponsiveness in their forum, it remained impossible to do with the EdgeSwitches from Ubiquity I have.  I only know that the switch can do it, not how to make it so.

Quote
So is there a way to get QOS working for both IPv4 and IPv6

I don't see how you could reasonably do it.  It seems you would need to specify IPv6 addresses for your devices in the rules, and when you don't have an IPv6 network statically assigned to you, you'd have to keep changing the addresses in the rules according to the addresses your devices happen to currently have all the time.

However, that I don't see it doesn't mean anything.  I can only say that internet without static addresses sucks much worse with IPv6 than it does with IPv4, and I don't understand why anyone is giving out dynamic IPv6 addresses at all, rather than static ones.  It should be illegal to give out dynamic IPv6 networks.
Title: Re: QOS with IPv4/IPv6 setup
Post by: walkerx on June 12, 2022, 11:44:18 am
Thanks for the reply

Is it causing issues?  You could limit their bandwidth and then downloads take even longer.  I wanted to limit my xbox some time ago and the best way would have been to limit it in the switch, but due to lack of documentation and unresponsiveness in their forum, it remained impossible to do with the EdgeSwitches from Ubiquity I have.  I only know that the switch can do it, not how to make it so.
It can if multiple users are using the internet (use multiple xbox's, nintendo switches, shield/apple tv's and Sky Q, but yeh I could restrict the port speed via my switches or setup qos for the relevant ports on the switches. We do a lot of streaming/online gaming in our family


Quote
I don't see how you could reasonably do it.  It seems you would need to specify IPv6 addresses for your devices in the rules, and when you don't have an IPv6 network statically assigned to you, you'd have to keep changing the addresses in the rules according to the addresses your devices happen to currently have all the time.

However, that I don't see it doesn't mean anything.  I can only say that internet without static addresses sucks much worse with IPv6 than it does with IPv4, and I don't understand why anyone is giving out dynamic IPv6 addresses at all, rather than static ones.  It should be illegal to give out dynamic IPv6 networks.
I have a static IPv4 and IPv6 from my provider, and set IPv6 to track the WAN interface and use DHCPv6 Server for IPv6 assignment - not sure how to setup IPv6 for static (which I'm not sure is why I can't use ZenArmour) - tried following the help settings for configuring Zen IPv6 but got stuck (looks like uses different ranges in the instructions which was confusing me), so just left with from wan.

But some devices will use IPv6 over IPv4 which is why I would like to get QOS working on it
Title: Re: QOS with IPv4/IPv6 setup
Post by: defaultuserfoo on June 12, 2022, 08:38:10 pm
With so many users all needing as much bandwidth as they can get, you might want to set up some kind of fair queueing, unless that already happens.

I looked at the rules of the traffic shaper, and it seems you should be able to specify an IPv6 address at least when you choose IPv6 as protocol.  Since you're so lucky to have static IPv6 addresses, you could set fixed leases for the devices in the DHCPv6 server for the devices you want to limit if you don't mind the privacy issues IPv6 brings about.
Title: Re: QOS with IPv4/IPv6 setup
Post by: walkerx on June 12, 2022, 11:29:48 pm
currently i have the ipv6 setup to get the info from wan (i've made another post about changing this to static, as not fully up on configuring ipv6 like ipv4 - post is https://forum.opnsense.org/index.php?topic=28718.0 (https://forum.opnsense.org/index.php?topic=28718.0))