====== Configuration ======
{{indexmenu_n>2}}
=====Configuring DSCP markup in IP/VLAN/MPLS headers=====
The option is configured or disabled by editing the configuration file **/etc/dpi/fastdpi.conf**.
This is a cold parameter which requires restart of service!
Enable prioritizing markup of a traffic on level:
set_packet_priority=1
* 1 - IP header
* 2 - VLAN/QinQ header
* 3 - MPLS header
set_packet_priority=1 leads to patching of all packets that pass through DPI to set the priority in their headers. This operation takes a lot of resources. Therefore do not switch this flag on until you do not need to use these modified priorities on other network devices.
Configuration parameters from [[en:dpi:dpi_options:opt_priority:priority_config|Assignment of priorities]] are sufficient for internal DPI usage.
===== Configuring DSCP Inheritance and Conversion =====
Not compatible with ''[[dpi:dpi_options:opt_priority:priority_settings#настройка_разметки_dscp_в_ip_vlan_mpls_заголовках|set_packet_priority]]'' — he's a priority..
It is configured in the ''/etc/dpi/fastdpi.conf'' configuration file.
forward_packet_priority=
Bit masks:
* Depending on the direction:
* 1 — conversion is applied to outbound traffic (subs->inet)
* 2 — conversion is applied to outbound traffic (inet->subs)
* Depending on the objects of conversion:
* 4 — Conversion between VLAN and IP
* 8 — IP to IP conversion
If no conversion file is specified (no ''/etc/dpi/dscpfrw.bin'' file), VLAN<->IP conversion is performed without conversion, i.e. the priority that was in the header (3 bits) is transferred to the other header (IP or VLAN) as it is.\\
If a conversion file is specified, a priority conversion is performed according to the rules specified in the file.
====Setting the priority conversion file====
vi test.txt
in cs0 cs1
in cs1 cs2
in cs2 keep
in default cs3
out default keep
out 0x1 0x2
out 0x2 0x3
out cs0 0x3F
cat test.txt|forw2dscp test.bin
cp test.bin /etc/dpi/dscpfrw.bin