Changes

Created page with "{{Template: Networking_device_manual_fw_disclosure | series = {{{series}}} | name = {{{name}}} | fw_version ={{Template: Networking_device_manual_latest_fw | series = {{{se..."
{{Template: Networking_device_manual_fw_disclosure
| series = {{{series}}}
| name = {{{name}}}
| fw_version ={{Template: Networking_device_manual_latest_fw
| series = {{{series}}}
| name = {{{name}}}
}}
}}
{{#ifeq: {{{series}}} | RUT9 |<br><i><b>Note</b>: <b>[[{{{name}}} QoS (legacy WebUI)|click here]]</b> for the old style WebUI (FW version {{Template: Networking_device_manual_latest_fw | series = RUT9XX}} and earlier) user manual page.</i>|}}
{{#ifeq: {{{series}}} | RUT2 |<br><i><b>Note</b>: <b>[[{{{name}}} QoS (legacy WebUI)|click here]]</b> for the old style WebUI (FW version {{Template: Networking_device_manual_latest_fw | series = RUT2XX}} and earlier) user manual page.</i>|}}
__TOC__
==Summary==

<b>Traffic Shaping</b> is a bandwidth management technique used on computer networks which delays some or all datagrams to bring them into compliance with a desired traffic profile. Traffic Shaping is used to optimize or guarantee performance, improve latency, or increase usable bandwidth for some kinds of packets by delaying other kinds.

This manual page provides an overview of the Traffic Shaping pages in {{{name}}} devices.

{{Template:Networking_rutos_manual_basic_advanced_webui_disclaimer
| series = {{{series}}}
}}

==SQM==

The <b>SQM</b> page is used to set up Smart Queue Management (SQM) instances which can limit the download and upload speeds of selected network interfaces.

{{#switch: {{{series}}}
| RUTX | RUTM = <u><b>Note:</b> For SQM to properly work "Software flow offloading" needs to be turned off on this device. This can be done in <b>Network → [[{{{name}}} Firewall#Routing.2FNAT_Offloading|Routing/NAT Offloading]]</b> settings.</u>
| #default =
<u><b>Note:</b> SQM is additional software that can be installed from the <b>System → [[{{{name}}} Package Manager|Package Manager]]</b> page.</u>
}}

The <b>Smart Queue Management</b> section contains a list of existing SQM instances and can be used manage them (edit/delete/enable/disable). By default the list is empty:

[[File:Networking_rutos_manual_traffic_shaping_sqm.png|border|class=tlt-border]]
----
To add a new instance and begin editing, look below to the <b>Add New Instance</b> section and:

<ol>
<li>enter a custom name in the 'Name' field;</li>
<li>click the 'Add' button;</li>
<li>configuration window will open automatically.</li>
</ol>

[[File:Networking_rutos_manual_traffic_shaping_sqm_add_new_sqm_example.png]]

Refer to the sections below for information on editing SQM instances.

===General Setup===
----
The <b>General Setup</b> section is used to set download and upload speed limits for a selected network interface.

[[File:Networking rutos manual traffic shaping sqm general setup73.png|border|class=tlt-border]]

<table class="nd-mantable">
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
<tr>
<td>Enabled</td>
<td>off | on; default: <b>off</b></td>
<td>Turns the SQM configuration on or off.</td>
</tr>
<tr>
<td>Interface name</td>
<td>network interface; default: <b>br-lan (lan)</b></td>
<td>Selects to which interface this SQM configuration will apply. <b>Additional note:</b> consider reading the [[{{{name}}}_Traffic_Shaping#Additional_notes|Additional notes]] section before limiting speeds on selected interfaces.</td>
</tr>
<tr>
<td>Download speed (kbit/s)</td>
<td>integer [0..2147483647]; default: <b>none</b></td>
<td>Limits the download speed (ingress) of the selected interface to the value specified in this field.</td>
</tr>
<tr>
<td>Upload speed (kbit/s)</td>
<td>integer [0..2147483647]; default: <b>none</b></td>
<td>Limits the upload speed (egress) of the selected interface to the value specified in this field.</td>
</tr>
</table>

===Advanced Settings===
----
The <b>Advanced Settings</b> section describes the internal logic of the SQM configuration.

[[File:Networking rutos manual traffic shaping sqm advanced settings73.png|border|class=tlt-border]]

<table class="nd-mantable">
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
<tr>
<td>Queuing disciplines usable on this system</td>
<td>cake | fq_codel; default: <b>cake</b></td>
<td>Queue management logic type. Look to the row below for detailed information.</td>
</tr>
<tr>
<td>Queue setup script</td>
<td>layer_cake.qos | piece_of_cake.qos | simple.qos | simplest.qos | simplest_tbf.qos; default: <b>piece_of_cake.qos</b></td>
<td>Describes the queue management logic.
<ul>
<li><b>cake</b>
<ul>
<li><b>layer_cake.qos</b> - uses the cake qdisc as a replacement for both htb as shaper and fq_codel as leaf qdisc. This exercises cake's diffserv profile(s) as different "layers" of priority.</li>
<li><b>piece_of_cake.qos</b> - uses the cake qdisc as a replacement for both htb as shaper and fq_codel as leaf qdisc. It just does not come any simpler than this, in other words it truly is a "piece of cake".</li>
</ul>
</li>
<li><b>fq_codel</b>
<ul>
<li><b>simple.qos</b> - BW-limited three-tier prioritisation scheme with your qdisc on each queue.</li>
<li><b>simplest.qos</b> - simplest possible configuration: HTB rate limiter with your qdisc attached.</li>
<li><b>simplest_tbf.qos</b> - simplest possible configuration (TBF): TBF rate limiter with your qdisc attached. TBF may give better performance than HTB on some architectures.</li>
</ul>
</li>
</ul>
</td>
</tr>
</table>

===Additional notes===
----
Please consider that limiting the speed of certain interfaces may limit the speed of other interfaces as well. For example, if you limit the download and upload speeds of the default LAN interface (<i>br-lan</i>) to 50 000 kbps (50 Mbps) this will affect the speeds between:

<ul>
<li>Ethernet LAN machines (including the device)</li>
<li>Ethernet LAN machines and WAN<span class="asterisk">*</span></li>
{{#ifeq:{{{wifi}}}|1|<li>WiFi devices<span class="asterisk">**</span></li>
<li>Wifi devices and LAN machines<span class="asterisk">**</span></li>
<li>WiFi devices and WAN<span class="asterisk">**</span></li>|}}
</ul>

<span class="asterisk">*</span> Since LAN machines communicate with WAN servers over the device
which is also considered a LAN machine, LAN-to-WAN and WAN-to-LAN speeds are also affected.

{{#ifeq:{{{wifi}}}|1|<span class="asterisk">**</span> By default, wireless network interfaces
are attached to the default Ethernet LAN network (<i>br-lan</i>). If you wish for WiFi speeds
to remain unaffected, consider creating an additional Ethernet interface and attach your WiFi
interfaces to it. This can done in the following WebUI pages:

<ul>
<li>Network → [[{{{name}}} LAN|Interfaces]] (to create an additional network interface)</li>
<li>Network → [[{{{name}}} Wireless|Wireless]] (to attach WiFi interfaces to Ethernet interfaces)</li>
</ul>
|}}
The table below demonstrates speed changes between some of the main default network interfaces if <b><i>br-lan</i> speed is set to 50 Mbps</b>.

<table class="nd-othertables_3" style="text-align: center;">
<tr>
<th width=150 style="text-align: center;"></th>
<th width=200 style="text-align: center;">Ethernet LAN</th>
{{#ifeq:{{{wifi}}}|1|<th width=200 style="text-align: center;">WiFi LAN</th>|}}
<th width=200 style="text-align: center;">Ethernet WAN</th>
{{#ifeq:{{{mobile}}}|1|<th width=200 style="text-align: center;">Mobile WAN</th>|}}
</tr>
<tr>
<td style="text-align: left; font-weight: bold">Ethernet LAN</td>
<td>50</td>
{{#ifeq:{{{wifi}}}|1|<td>50</td>|}}
<td>50</td>
{{#ifeq:{{{mobile}}}|1|<td>50</td>|}}
</tr>
{{#ifeq:{{{wifi}}}|1|<tr>
<td style="text-align: left; font-weight: bold">WiFi LAN</td>
<td>50</td>
<td>50</td>
<td>50</td>
{{#ifeq:{{{mobile}}}|1|<td>50</td>|}}
|}} </tr>
<tr>
<td style="text-align: left; font-weight: bold">Ethernet WAN</td>
<td>50</td>
{{#ifeq:{{{wifi}}}|1|<td>50</td>|}}
<td>unchanged</td>
{{#ifeq:{{{mobile}}}|1|<td>unchanged</td>|}}
</tr>
{{#ifeq:{{{mobile}}}|1|<tr>
<td style="text-align: left; font-weight: bold">Mobile WAN</td>
<td>50</td>
{{#ifeq:{{{wifi}}}|1|<td>50</td>|}}
<td>unchanged</td>
{{#ifeq:{{{mobile}}}|1|<td>unchanged</td>|}}
|}} </tr>
</table>

Changing the speeds of other network interfaces may also affect more than one interface. However, the Ethernet LAN interface (<i>br-lan</i>) is related to most interfaces. Therefore, it is advised to limit the speeds of other interfaces in order to achieve more precise results (unless, of course, your goal to is to limit the speed of <i>br-lan</i>).
----
Another example to consider is limiting WAN interface speeds since that is the most widely implemented use case and affects less interface-to-interface relationships. For instance, limiting <b>Ethernet WAN (<i>eth1</i>) speed to 50 Mbps</b> would produce the following results:

<table class="nd-othertables_3" style="text-align: center;">
<tr>
<th width=150></th>
<th width=200 style="text-align: center;">Ethernet LAN</th>
{{#ifeq:{{{wifi}}}|1|<th width=200 style="text-align: center;">WiFi LAN</th>|}}
<th width=200 style="text-align: center;">Ethernet WAN</th>
{{#ifeq:{{{mobile}}}|1|<th width=200 style="text-align: center;">Mobile WAN</th>|}}
</tr>
<tr>
<td style="text-align: left; font-weight: bold">Ethernet LAN</td>
<td>unchanged</td>
{{#ifeq:{{{wifi}}}|1|<td>unchanged</td>|}}
<td>50</td>
{{#ifeq:{{{mobile}}}|1|<td>unchanged</td>|}}
</tr>
{{#ifeq:{{{wifi}}}|1|<tr>
<td style="text-align: left; font-weight: bold">WiFi LAN</td>
<td>unchanged</td>
<td>unchanged</td>
<td>50</td>
{{#ifeq:{{{mobile}}}|1|<td>unchanged</td>|}}
</tr>
|}} <tr>
<td style="text-align: left; font-weight: bold">Ethernet WAN</td>
<td>50</td>
{{#ifeq:{{{wifi}}}|1|<td>50</td>|}}
<td>unchanged</td>
{{#ifeq:{{{mobile}}}|1|<td>unchanged</td>|}}
</tr>
{{#ifeq:{{{mobile}}}|1|<tr>
<td style="text-align: left; font-weight: bold">Mobile WAN</td>
<td>unchanged</td>
{{#ifeq:{{{wifi}}}|1|<td>unchanged</td>|}}
<td>unchanged</td>
{{#ifeq:{{{mobile}}}|1|<td>unchanged</td>|}}
</tr>|}}
</table>

Please take caution when using SQM to limit speeds in order to avoid unexpected results.

==QoS==

QoS provides the possibility to prioritize network traffic based on hosts, ports or services and limit download & upload speeds on a selected interface.

This chapter of the user manual provides an overview of the QoS page in {{{name}}} devices.

{{#switch: {{{series}}}
| RUTX | RUTM = <u><b>Note:</b> For QoS to properly work "Software flow offloading" needs to be turned off on this device. This can be done in <b>Network → [[{{{name}}} Firewall#Routing.2FNAT_Offloading|Routing/NAT Offloading]]</b> settings.</u>
| #default =
}}
<u><b>Note:</b> QoS is additional software that can be installed from the <b>System → [[{{{name}}} Package Manager|Package Manager]]</b> page.</u>

===Interfaces===
----
The <b>Interfaces</b> section is used to set up download and upload speed limits on the device's network interfaces.

[[File:Networking_rutos_manual_traffic_shaping_qos_interfaces.png|border|class=tlt-border]]

<table class="nd-othertables">
<tr>
<th style="width: 250px">Field</th>
<th style="width: 250px">Value</th>
<th style="width: 579px">Description</th>
</tr>
<tr>
<td>Calculate overhead</td>
<td>yes | no; default: <b>no</b></td>
<td>Decreases upload and download ratio to prevent link saturation.</td>
</tr>
<tr>
<td>Download speed (kbit/s)</td>
<td>integer; default: <b>none</b></td>
<td>Maximum download speed for the specified interface.</td>
</tr>
<tr>
<td>Upload speed (kbit/s)</td>
<td>integer; default: <b>none</b></td>
<td>Maximum upload speed for the specified interface.</td>
</tr>
<tr>
<td>Enable</td>
<td>yes | no; default: <b>no</b></td>
<td>Turns the rule on or off.</td>
</tr>
</table>

===Classification Rules===
----
The <b>Classification Rules</b> section is used to configure rules that prioritize
certain traffic over other, less important traffic. This traffic can be defined by
a source or destination host, port or a network protocol. Traffic that matches a
rule with higher preference will be handled with higher priority.

Generally, this should be used in cases where you want to isolate certain types
of traffic in order to make sure the {{{name}}} is handling more important traffic
(for example, video streaming, SSH) at a higher priority and less important traffic (FTP, HTTP) at a lower priority.

[[File:Networking rutos manual traffic shaping qos classification rules73.png|border|class=tlt-border]]

<table class="nd-mantable">
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
<tr>
<td>Target</td>
<td>Priority | Express | Normal | Bulk; default: <b>Normal</b></td>
<td>Defines the priority of handling the type of traffic defined in this rule.</td>
</tr>
<tr>
<td>Source host</td>
<td>All | IP | -- Custom --; default: <b>All</b></td>
<td>Host(s) from which data will be transmitted.</td>
</tr>
<tr>
<td>Destination host</td>
<td>All | IP | -- Custom --; default: <b>All</b></td>
<td>Host(s) to which data will be transmitted.</td>
</tr>
<tr>
<td>Protocol</td>
<td>All | TCP | UDP | ICMP | -- Custom --; default: <b>All</b></td>
<td>Data transmission protocol to match the rule.</td>
</tr>
<tr>
<td>Ports</td>
<td>All | integer [1..65535]; default: <b>none</b></td>
<td>Port number(s) to match the rule. You can enter multiple ports by separating them by commas (e.g., <i>22,53,80</i>).</td>
</tr>
</table>


[[Category:{{{name}}} Network section]]

Navigation menu