Quality of Service

From Bondix Wiki
Revision as of 22:51, 20 September 2023 by Red (talk | contribs)

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.

The QoS editor with a default rule.

Presets

Bondix S.A.NE comes with a selection of QoS presets, which can be used for quick configuration. 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.
Bonding (QoS) A more sophisticated preset including a priority rule for DNS traffic, VoIP and online meetings.
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.

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.

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 A short descriptive name that ideally describes the type of traffic you want to assign to this group.
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.
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.
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.
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.
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.
Max Channel The maximum number of channels that should be used at once for this group. A value of 0 means no limit.
Channel Selection How channels should be selected. Possible Options:
  • Default - The default method which considers configured priority, latency and reliability.
  • Latency - Only consider latency (lowest first)
  • Bandwidth - Only consider available bandwidth (highest first)
  • Priority - Only consider 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 look 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 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 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 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 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.

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

Configuration on Teltonika

Teltonika Preset Selection.png

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.