Harald Welte | 292d04d | 2021-04-28 11:36:18 +0200 | [diff] [blame] | 1 | ==== Full example of QoS for osmo-pcu uplink QoS |
| 2 | |
| 3 | In the below example we will show the full set of configuration required |
| 4 | for both DSCP and PCP differentiation of uplink Gb traffic by osmo-pcu. |
| 5 | |
| 6 | What we want to achieve in this example is the following configuration: |
| 7 | |
| 8 | .DSCP and PCP assignments for osmo-bts uplink traffic in this example |
| 9 | [options="header",width="30%",cols="2,1,1"] |
| 10 | |=== |
| 11 | |Traffic |DSCP|PCP |
| 12 | |Gb (NS) | 10| 1 |
| 13 | |=== |
| 14 | |
| 15 | . configure the osmocom program to set the DSCP value |
| 16 | * osmo-pcu.cfg: `dscp 10` in `udp bind` vty node |
| 17 | . configure an egrees QoS map to map from priority to PCP |
| 18 | |
| 19 | .Example Step 1: add related VTY configuration to `osmo-pcu.cfg` |
| 20 | ---- |
| 21 | ... |
| 22 | pcu |
| 23 | gb ip-dscp 10 |
| 24 | gb socket-priority 1 |
| 25 | ... |
| 26 | ---- |
| 27 | |
| 28 | .Example Step 2: egress QoS map to map from DSCP values to priority values |
| 29 | ---- |
| 30 | $ sudo ip link set dev eth0.9<1> type vlan egress-qos-map 0:0 1:1 5:5 6:6 7:7 <2> |
| 31 | ---- |
| 32 | <1> make sure to specify your specific VLAN interface name here instead of `eth0.9`. |
| 33 | <2> create a egress QoS map that maps the priority value 1:1 to the PCP. We also |
| 34 | include the mappings for 5, 6, and 7 from the osmo-bts example here (see |
| 35 | <<userman-osmobts>>). |
| 36 | |
| 37 | NOTE:: The settings of the `ip` command are volatile and only active until |
| 38 | the next reboot (or the network device or VLAN is removed). Please refer to |
| 39 | the documentation of your specific Linux distribution in order to find out how |
| 40 | to make such settings persistent by means of an `ifup` hook whenever the interface |
| 41 | comes up. For CentOS/RHEL 8 this can e.g. be achieved by means of an `/sbin/ifup-local |
| 42 | script` (when using `network-scripts` and not NetworkManager). For Debian or Ubuntu, |
| 43 | this typically involves adding `up` lines to `/etc/network/interfaces` or a `/etc/network/if-up.d` |
| 44 | script. |