<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/23927">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">manual: Include QoS chapter and add osmo-bts specific example<br><br>Change-Id: I8fcd524c550b43a851b3094effc215e5203d28be<br>Requires: osmo-gsm-manuals.git Id344c29eda2a9b3e36376302b425e9db1f6c0f28<br>---<br>A doc/manuals/chapters/qos-example.adoc<br>M doc/manuals/osmobts-usermanual.adoc<br>2 files changed, 54 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/27/23927/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..b8c32df</span><br><span>--- /dev/null</span><br><span>+++ b/doc/manuals/chapters/qos-example.adoc</span><br><span>@@ -0,0 +1,52 @@</span><br><span style="color: hsl(120, 100%, 40%);">+==== Full example of QoS for osmo-bts 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 Abis traffic by osmo-bts.</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%);">+|A-bis RSL    |  56|  7</span><br><span style="color: hsl(120, 100%, 40%);">+|A-bis RTP    |  46|  6</span><br><span style="color: hsl(120, 100%, 40%);">+|A-bis OML    |  34|  5</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-bts.cfg: `rtp ip dscp 46` in `bts` vty node</span><br><span style="color: hsl(120, 100%, 40%);">+ * osmo-bts.cfg: `rsl ip dscp 56` in `bts` vty node</span><br><span style="color: hsl(120, 100%, 40%);">+ * osmo-bts.cfg: `oml ip dscp 34` in `bts` 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 56 -j CLASSIFY --set-class 7</span><br><span style="color: hsl(120, 100%, 40%);">+$ sudo iptables -t mangle -I OUTPUT -m dscp --dscp 46 -j CLASSIFY --set-class 6</span><br><span style="color: hsl(120, 100%, 40%);">+$ sudo iptables -t mangle -I OUTPUT -m dscp --dscp 34 -j CLASSIFY --set-class 5</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 include the</span><br><span style="color: hsl(120, 100%, 40%);">+    mapping 1:1 from the osmo-pcu example (see <<userman-osmopcu>>) here.</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/osmobts-usermanual.adoc b/doc/manuals/osmobts-usermanual.adoc</span><br><span>index b1b0747..9ef4960 100644</span><br><span>--- a/doc/manuals/osmobts-usermanual.adoc</span><br><span>+++ b/doc/manuals/osmobts-usermanual.adoc</span><br><span>@@ -30,6 +30,8 @@</span><br><span> </span><br><span> include::{srcdir}/chapters/architecture.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/trx_if.adoc[]</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/23927">change 23927</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-bts/+/23927"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8fcd524c550b43a851b3094effc215e5203d28be </div>
<div style="display:none"> Gerrit-Change-Number: 23927 </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>