Quality of Service: Difference between revisions

From Bondix Wiki
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
Quality of Service allows you to apply different bonding rules for different types of traffic. Traffic can be differentiated via packet type, source and/or destination IP. Bonding rules allow you to set priority or duplication to limiting bandwidth or optimizing for latency.
<center>'''This page is currently work-in-progress!'''</center>
[[File:QoS Editor.png|thumb|The QoS editor with a default rule.]]


===Presets===
==Basics==
Bondix S.A.NE comes with a selection of QoS presets, which can be used for quick configuration. At a glance:
[[File:QoS Editor.png|thumb|right|The QoS editor with a default rule.]]With Bondix Quality of Service settings, you can apply different bonding rules for different types of traffic. Traffic can be differentiated via packet type, source, and/or destination IP. Bonding rules allow for setting priority or duplication to limiting bandwidth or optimizing for latency.
 
===Server: QoS Presets===
On the server side, Bondix S.A.NE comes with a selection of QoS presets which can be used for quick configuration. In effect, Bondix QoS replaces Bondix Tunnel Presets. However, if QoS is to be initiated from the Client, make sure to choose "Custom QoS" in the Tunnel Presets of the General Settings.
 
Here are the Server's QoS presets at a glance:
{| class="wikitable"
{| class="wikitable"
|+
|+
Line 14: Line 18:
|Bonding (No Proxy)
|Bonding (No Proxy)
|Bonding with BondingProxy disabled.
|Bonding with BondingProxy disabled.
|-
|Bonding (QoS)
|A more sophisticated preset including a priority rule for DNS traffic, VoIP and online meetings.
|-
|-
|Packet Duplication
|Packet Duplication
|Default Bonding with packet duplication (1x) enabled.
|Default Bonding with packet duplication (1x) enabled.
|-
|-
|Seamless Failover
|Seamless failover
|Only use one interface as indicated by channel priority or latency.
|Only use one interface as indicated by channel priority or latency.
|-
|-
| Satellite
| Satellite
|A preset for satellite scenarios. Satellite is only used for HTTP(S) traffic, except when no other interfaces are available.
|A preset for satellite scenarios. Satellite is only used for HTTP(S) traffic, except when no other interfaces are available.
|-
|Default QoS
|A more sophisticated preset including a priority rule for DNS traffic, VoIP and online meetings.
|}
|}
A QoS preset consists of one or more traffic groups (QoS group). When a client connects to a server, it sends along its desired QoS configuration, which the server can either use or replace with a different configuration. The server also comes with a QoS preset editor which allows you to create custom presets that can be applied on multiple tunnels.
A QoS preset consists of one or more traffic groups (QoS group). When a client connects to a server, it sends along its desired QoS configuration which the server can either use or replace with a different configuration. The server also comes with a QoS preset editor which allows you to create custom presets that can be applied on multiple tunnels.
<gallery widths=400px heights=260px>
File:Bondix-123101-qos.png|thumb|QoS settings on Bondix Server
File:Bondix-123101-tunnel-qos.png|thumb|QoS presets for Tunnels on Bondix Server
File:Bondix-123101-qos-presets.png|thumb|QoS presets for Tunnels on Bondix Server, list
</gallery>


===Traffic Group===
===Client & Server: Traffic Group===
A traffic group (QoS group) consists of a ruleset of how traffic should be handled, and a list of matching traffic types to which these rules shoule be applied to.
A traffic group (QoS group) consists of a ruleset of how traffic should be handled, and a list of matching traffic types to which these rules shoule be applied to.


Line 39: Line 48:
|-
|-
| style="width: 150px" |Name
| style="width: 150px" |Name
|A short descriptive name that ideally describes the type of traffic you want to assign to this group.
|This is where you give your traffic group a short descriptive name that ideally describes the type of traffic you want to assign to it.
|-
|-
|Score
|Score
| The group's score determines how often it gets the chance to send out data. The minimum value is 1, each additional score point gives the group a bigger slice of available data. Groups with higher score are also get to write their data first.  
| The group's score determines how often it gets the chance to send out data. The minimum value is 1, each additional score point gives the group a bigger slice of available data. Groups with higher score also get to write their data first. View this as a type of priority setting.
|-
|-
|Packet Copies
|Packet Copies
|How many copies of each packet should be made. A value of 0 means no duplication, a value of 1 means that single duplication, and so on. Packet Copies are opportunistic, if not enough interfaces are available to send the amount of configured copies, less copies will be made.
|This value defines how many copies of each packet should be made. A value of 0 means no duplication, a value of 1 means single duplication, and so on. Packet Copies are opportunistic: If not enough interfaces are available to send the amount of configured copies, less copies will be made.
|-
|-
|Latency Offset  
|Latency Offset  
|When channels are selected, latency offset describes the maximum difference the interface with the lowest and highest latency may have. This allows you to exclude slow or unreliable lines should their latency become too high. A value of 0 means no limitation.
|This setting describes the maximum difference that is allowed between the interface with the lowest and the one with the highest latency. With this setting, you can exclude slow or unreliable lines should their latency become too high. A value of 0 means no limitation.
|-
|-
| Max Down (MBit)
|Max Down (MBit)
|The maximum bandwidth allowed downstream in MBit. Downstream always references traffic sent from the server to the client. A value of 0 means no limitation.
|This value defines the maximum bandwidth allowed downstream in MBit. Downstream always refers to traffic sent from the server to the client. A value of 0 means no limitation.
|-
|-
|Max Up (MBit)
|Max Up (MBit)
|The maximum bandwidth allowed upstream in MBit. Upstream always references traffic sent from the client to the server. A value of 0 means no limitation.
|This value defines the maximum bandwidth allowed upstream in MBit. Upstream always refers to traffic sent from the client to the server. A value of 0 means no limitation.
|-
|-
|Max Channel
|Max Channel
|The maximum number of channels that should be used at once for this group. A value of 0 means no limit.  
|This value sets the maximum number of channels that should be used at once for this group. A value of 0 means no limit.  
|-
|-
| Channel Selection
| Channel Selection
|How channels should be selected. Possible Options:
|Here, you can define how channels are selected. These are the possible options:


* Default - The default method which considers configured priority, latency and reliability.
* Default: This is the default method which considers configured priority, latency and reliability.
* Latency - Only consider latency (lowest first)
* Latency: This option only considers latency (lowest first).
* Bandwidth - Only consider available bandwidth (highest first)
* Bandwidth: This option only considers available bandwidth (highest first).
* Priority - Only consider priority.
* Priority: This option only considers priority.
|-
|-
|Bonding Proxy
|Bonding Proxy
|If enabled, matching TCP traffic will be bonded using BondingProxy, which optimizes bonding throughput and efficiency.
|If enabled, matching TCP traffic will be bonded using BondingProxy which optimizes bonding throughput and efficiency.
|-
|-
| Always Distribute
|Always Distribute
|If enabled, traffic is always spread through all interfaces. This is disabled by default as it usually introduces unnecessary jitter, but may be beneficial if you look to spread traffic evenly across multiple interfaces.
|If enabled, traffic is always spread through all interfaces. This is disabled by default as it usually introduces unnecessary jitter but may be beneficial if you're looking to spread traffic evenly across multiple interfaces.
|}
|}


Line 92: Line 101:
|-
|-
|Source
|Source
|The source IP network in CIDR notation. In order to match properly, make sure to disable masquerading on the client. A value of "0.0.0.0/0" means traffic from any source.
|Here, you define the source IP network in CIDR notation. In order to match properly, make sure to disable masquerading on the client. A value of "0.0.0.0/0" means traffic from any source.
|-
|-
|Source Port
|Source Port
|The source port. This can either be a single value (e.g. "80") or a range (e.g. "22-23"). A value of 0 means any port.  
|Here, you define the source port. This can either be a single value (e.g. "80") or a range (e.g. "22-23"). A value of 0 means any port.  
|-
|-
|Destination
|Destination
|The destination IP network in CIDR notation. For individual IPs, make sure to include the network prefix /32. A value of "0.0.0.0/0" means traffic to any destination.
|Here, you give the destination IP network in CIDR notation. For individual IPs, make sure to include the network prefix /32. A value of "0.0.0.0/0" means traffic to any destination.
|-
|-
|Destination Port
|Destination Port
|The destination port. This can either be a single value (e.g. "80") or a range (e.g. "22-23"). A value of 0 means any port.
|Here, you give the destination port. This can either be a single value (e.g. "80") or a range (e.g. "22-23"). A value of 0 means any port.
|-
|-
|DSCP
|DSCP
|[[wikipedia:Differentiated_services|Differentiated Services Code Point]]. A value of -1 means that packets with any DSCP value will match. This value is ignored in combination with Bonding Proxy.
|Here, you specify the DSCP [[wikipedia:Differentiated_services|Differentiated Services Code Point]] value. A value of -1 means that packets with any DSCP value will match. This value is ignored in combination with Bonding Proxy.
|}
|}
Traffic matching rules are sorted by specificity. That means that the most specific rules are checked on first, the broadest rule is checked last.  
Traffic matching rules are sorted by specificity. That means that the most specific rules are checked on first, the broadest rule is checked last.  


=== Best Practices ===
<gallery widths=400px heights=260px>
File:Bondix-123101-qos.png|thumb|left|QoS settings on Bondix Server
File:Tel-07045-network-bondixsane-qos.png|thumb|left|QoS settings on Bondix Client for Teltonika 07.04.5
File:Tel-07045-network-bondixsane-qos-detail.png|thumb|left|QoS settings on Bondix Client for Teltonika 07.04.5, Traffic Group detail
</gallery>


* Always create a default rule that matches to any traffic. Traffic without an appropriate matching rule will still be transmitted, but performance results may vary.
===Client: Teltonika===
* BondingProxy uses iptables rules to redirect matching TCP traffic. To exclude certain traffic from BondingProxy, create a new group with matching rules and the proxy disabled. This will create appropiate exclusion rules for iptables.  
[[File:Teltonika Preset Selection.png|right]]
If you want to use custom QoS settings on Teltonika routers, make sure that the preset is set to "Custom QoS" and that the assigned server allows Client QoS settings - otherwise the server will override any Client QoS settings. You can see if this is the case under Bondix S.A.NE - Status in the ...


===Configuration on Teltonika===
We recommend pushing QoS presets via the Bondix Server because then they're created and managed in a single place and don't have to manage the QoS settings on all routers individually.
[[File:Teltonika Preset Selection.png|right]]
 
If you want to use custom QoS settings on Teltonika, make sure that the preset is set to "Custom QoS" - otherwise the currently selected preset is used instead. Keep in mind that the server can always override any client QoS settings.
==Compatibility==
Client and server are generally backwards compatible. When a legacy client connects to a QoS-enabled endpoint, the client can still apply its original tunnel preset (which is what QoS replaces). When a QoS-enabled client connects to a legacy server, it will always use the default "Bonding" tunnel preset, or the preset propagated by the legacy server.
 
== Best Practices ==


===Compatibility===
* Always create a default rule that matches to any traffic. Traffic without an appropriate matching rule will still be transmitted but performance results may vary.
Client and server are generally backwards compatible. When a legacy client connects to a QoS enabled endpoint, the client can still apply its original tunnel preset (which is what QoS replaces). When a QoS enabled client connects to a legacy server, it will always use the default "Bonding" tunnel preset, or the preset propagated by the legacy server.
* BondingProxy uses ''iptables'' rules to redirect matching TCP traffic. To exclude certain traffic from BondingProxy, create a new group with matching rules and the proxy disabled. This will create appropiate exclusion rules for ''iptables''.

Latest revision as of 10:47, 9 November 2023

This page is currently work-in-progress!

Basics

The QoS editor with a default rule.

With Bondix Quality of Service settings, you can apply different bonding rules for different types of traffic. Traffic can be differentiated via packet type, source, and/or destination IP. Bonding rules allow for setting priority or duplication to limiting bandwidth or optimizing for latency.

Server: QoS Presets

On the server side, Bondix S.A.NE comes with a selection of QoS presets which can be used for quick configuration. In effect, Bondix QoS replaces Bondix Tunnel Presets. However, if QoS is to be initiated from the Client, make sure to choose "Custom QoS" in the Tunnel Presets of the General Settings.

Here are the Server's QoS presets at a glance:

Preset Description
Bonding This is the default preset - bonding over any interface with BondingProxy enabled.
Bonding (No Proxy) Bonding with BondingProxy disabled.
Packet Duplication Default Bonding with packet duplication (1x) enabled.
Seamless failover Only use one interface as indicated by channel priority or latency.
Satellite A preset for satellite scenarios. Satellite is only used for HTTP(S) traffic, except when no other interfaces are available.
Default QoS A more sophisticated preset including a priority rule for DNS traffic, VoIP and online meetings.

A QoS preset consists of one or more traffic groups (QoS group). When a client connects to a server, it sends along its desired QoS configuration which the server can either use or replace with a different configuration. The server also comes with a QoS preset editor which allows you to create custom presets that can be applied on multiple tunnels.

Client & Server: Traffic Group

A traffic group (QoS group) consists of a ruleset of how traffic should be handled, and a list of matching traffic types to which these rules shoule be applied to.

Group Settings

Property Description
Name This is where you give your traffic group a short descriptive name that ideally describes the type of traffic you want to assign to it.
Score The group's score determines how often it gets the chance to send out data. The minimum value is 1, each additional score point gives the group a bigger slice of available data. Groups with higher score also get to write their data first. View this as a type of priority setting.
Packet Copies This value defines how many copies of each packet should be made. A value of 0 means no duplication, a value of 1 means single duplication, and so on. Packet Copies are opportunistic: If not enough interfaces are available to send the amount of configured copies, less copies will be made.
Latency Offset This setting describes the maximum difference that is allowed between the interface with the lowest and the one with the highest latency. With this setting, you can exclude slow or unreliable lines should their latency become too high. A value of 0 means no limitation.
Max Down (MBit) This value defines the maximum bandwidth allowed downstream in MBit. Downstream always refers to traffic sent from the server to the client. A value of 0 means no limitation.
Max Up (MBit) This value defines the maximum bandwidth allowed upstream in MBit. Upstream always refers to traffic sent from the client to the server. A value of 0 means no limitation.
Max Channel This value sets the maximum number of channels that should be used at once for this group. A value of 0 means no limit.
Channel Selection Here, you can define how channels are selected. These are the possible options:
  • Default: This is the default method which considers configured priority, latency and reliability.
  • Latency: This option only considers latency (lowest first).
  • Bandwidth: This option only considers available bandwidth (highest first).
  • Priority: This option only considers priority.
Bonding Proxy If enabled, matching TCP traffic will be bonded using BondingProxy which optimizes bonding throughput and efficiency.
Always Distribute If enabled, traffic is always spread through all interfaces. This is disabled by default as it usually introduces unnecessary jitter but may be beneficial if you're looking to spread traffic evenly across multiple interfaces.

Matching Rules

Matching rules describe the type of traffic you want to assign to a group.

Property Description
Traffic Type Possible options:
  • Any - ignore traffic type
  • TCP
  • UDP
  • TCP & UDP
  • ICMP
  • Other - everything else that is not on this list
Source Here, you define the source IP network in CIDR notation. In order to match properly, make sure to disable masquerading on the client. A value of "0.0.0.0/0" means traffic from any source.
Source Port Here, you define the source port. This can either be a single value (e.g. "80") or a range (e.g. "22-23"). A value of 0 means any port.
Destination Here, you give the destination IP network in CIDR notation. For individual IPs, make sure to include the network prefix /32. A value of "0.0.0.0/0" means traffic to any destination.
Destination Port Here, you give the destination port. This can either be a single value (e.g. "80") or a range (e.g. "22-23"). A value of 0 means any port.
DSCP Here, you specify the DSCP Differentiated Services Code Point value. A value of -1 means that packets with any DSCP value will match. This value is ignored in combination with Bonding Proxy.

Traffic matching rules are sorted by specificity. That means that the most specific rules are checked on first, the broadest rule is checked last.

Client: Teltonika

Teltonika Preset Selection.png

If you want to use custom QoS settings on Teltonika routers, make sure that the preset is set to "Custom QoS" and that the assigned server allows Client QoS settings - otherwise the server will override any Client QoS settings. You can see if this is the case under Bondix S.A.NE - Status in the ...

We recommend pushing QoS presets via the Bondix Server because then they're created and managed in a single place and don't have to manage the QoS settings on all routers individually.

Compatibility

Client and server are generally backwards compatible. When a legacy client connects to a QoS-enabled endpoint, the client can still apply its original tunnel preset (which is what QoS replaces). When a QoS-enabled client connects to a legacy server, it will always use the default "Bonding" tunnel preset, or the preset propagated by the legacy server.

Best Practices

  • Always create a default rule that matches to any traffic. Traffic without an appropriate matching rule will still be transmitted but performance results may vary.
  • BondingProxy uses iptables rules to redirect matching TCP traffic. To exclude certain traffic from BondingProxy, create a new group with matching rules and the proxy disabled. This will create appropiate exclusion rules for iptables.