<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/23929">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">manual: Include QoS chapter and add osmo-pcu specific example<br><br>Change-Id: I4d409b55861f05ba229dc5cb97f99370356e3dbd<br>Requires: osmo-gsm-manuals.git Id344c29eda2a9b3e36376302b425e9db1f6c0f28<br>---<br>A doc/manuals/chapters/qos-example.adoc<br>M doc/manuals/osmopcu-usermanual.adoc<br>2 files changed, 49 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/29/23929/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/doc/manuals/chapters/qos-example.adoc b/doc/manuals/chapters/qos-example.adoc</span><br><span>new file mode 100644</span><br><span>index 0000000..dcbba2a</span><br><span>--- /dev/null</span><br><span>+++ b/doc/manuals/chapters/qos-example.adoc</span><br><span>@@ -0,0 +1,47 @@</span><br><span style="color: hsl(120, 100%, 40%);">+==== Full example of QoS for osmo-pcu uplink QoS</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+In the below example we will show the full set of configuration required</span><br><span style="color: hsl(120, 100%, 40%);">+for both DSCP and PCP differentiation of uplink Gb traffic by osmo-pcu.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+What we want to achieve in this example is the following configuration:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.DSCP and PCP assignments for osmo-bts uplink traffic in this example</span><br><span style="color: hsl(120, 100%, 40%);">+[options="header",width="30%",cols="2,1,1"]</span><br><span style="color: hsl(120, 100%, 40%);">+|===</span><br><span style="color: hsl(120, 100%, 40%);">+|Traffic      |DSCP|PCP</span><br><span style="color: hsl(120, 100%, 40%);">+|Gb (NS)      |  10|  1</span><br><span style="color: hsl(120, 100%, 40%);">+|===</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+. configure the osmocom program to set the DSCP value</span><br><span style="color: hsl(120, 100%, 40%);">+ * osmo-pcu.cfg: `dscp 10` in `udp bind` vty node</span><br><span style="color: hsl(120, 100%, 40%);">+. use a packet filter rule to set the priority based on DSCP</span><br><span style="color: hsl(120, 100%, 40%);">+. configure an egrees QoS map to map from priority to PCP</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.Example Step 2: iptables rules to map from DSCP values to priority values</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+$ sudo iptables -t mangle -I OUTPUT -m dscp --dscp 10 -j CLASSIFY --set-class 1</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+NOTE:: The above-mentioned `iptables` commands only insert the rules</span><br><span style="color: hsl(120, 100%, 40%);">+into the Linux kernel.  They are volatile and will be gone on next boot.</span><br><span style="color: hsl(120, 100%, 40%);">+It is up to you to ensure they are re-installed at every boot, e.g. by</span><br><span style="color: hsl(120, 100%, 40%);">+some kind of init script, systemd unit file, or packet filter rule</span><br><span style="color: hsl(120, 100%, 40%);">+management software like firewalld, ufw, ...</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.Example Step 3: egress QoS map to map from DSCP values to priority values</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+$ sudo ip link set dev eth0.9<1> type vlan egress-qos-map 0:0 1:1 5:5 6:6 7:7 <2></span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+<1> make sure to specify your specific VLAN interface name here instead of `eth0.9`.</span><br><span style="color: hsl(120, 100%, 40%);">+<2> create a egress QoS map that maps the priority value 1:1 to the PCP. We also</span><br><span style="color: hsl(120, 100%, 40%);">+    include the mappings for 5, 6, and 7 from the osmo-bts example here (see</span><br><span style="color: hsl(120, 100%, 40%);">+    <<userman-osmobts>>).</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+NOTE:: The settings of the `ip` command are volatile and only active until</span><br><span style="color: hsl(120, 100%, 40%);">+the next reboot (or the network device or VLAN is removed).  Please refer to</span><br><span style="color: hsl(120, 100%, 40%);">+the documentation of your specific Linux distribution in order to find out how</span><br><span style="color: hsl(120, 100%, 40%);">+to make such settings persistent by means of an `ifup` hook whenever the interface</span><br><span style="color: hsl(120, 100%, 40%);">+comes up.  For CentOS/RHEL 8 this can e.g. be achieved by means of an `/sbin/ifup-local</span><br><span style="color: hsl(120, 100%, 40%);">+script` (when using `network-scripts` and not NetworkManager).  For Debian or Ubuntu,</span><br><span style="color: hsl(120, 100%, 40%);">+this typically involves adding `up` lines to `/etc/network/interfaces` or a `/etc/network/if-up.d`</span><br><span style="color: hsl(120, 100%, 40%);">+script.</span><br><span>diff --git a/doc/manuals/osmopcu-usermanual.adoc b/doc/manuals/osmopcu-usermanual.adoc</span><br><span>index e202e33..0fae72a 100644</span><br><span>--- a/doc/manuals/osmopcu-usermanual.adoc</span><br><span>+++ b/doc/manuals/osmopcu-usermanual.adoc</span><br><span>@@ -21,6 +21,8 @@</span><br><span> </span><br><span> include::./common/chapters/gb.adoc[]</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+include::./common/chapters/qos-dscp-pcp.adoc[]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> include::./common/chapters/vty_cpu_sched.adoc[]</span><br><span> </span><br><span> include::./common/chapters/port_numbers.adoc[]</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/23929">change 23929</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-pcu/+/23929"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I4d409b55861f05ba229dc5cb97f99370356e3dbd </div>
<div style="display:none"> Gerrit-Change-Number: 23929 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>