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