Both sides previous revisionPrevious revisionNext revision | Previous revision |
en:dpi:dpi_options:opt_shaping:shaping_multi [2020/02/05 17:31] – ↷ Page moved from en:dpi:dpi_options:base_functionality:opt_shaping:shaping_multi to en:dpi:dpi_options:opt_shaping:shaping_multi lexx26 | en:dpi:dpi_options:opt_shaping:shaping_multi [2024/12/25 12:38] (current) – [For VLANs] elena.krasnobryzh |
---|
====== shaping_multi ====== | ====== Policing of Virtual Channel (vChannel) ====== |
| {{indexmenu_n>3}} |
| |
| <note tip>More about VChannels configuration: {{youtube>RPQ3OlRfJXc?}}</note> |
| |
| In case if the operator has several external (uplink) or internal channels often it is needed to control Channel Upper Boundary and limit low priority traffic independently of one another. Channel traffic is usually uneven and channels often are unequal. |
| |
| <note>By using vChannel, you can separate traffic from the common channel based on physical ports / VLANs / CIDRs. Policing and services are applied on vChannel [[en:dpi:dpi_options:opt_bandwidth_mgmt:bandwidth_conf|similarly to subscriber rate plans]]. Channel parameters and restrictions in the channel are configured by a special identifier.</note> |
| |
| {{ :dpi:dpi_options:opt_shaping:shaping_multi:3_type_of_channels_14062023.png?nolink&600 |}} |
| ===== Setting up ===== |
| |
| In the DPI setting **/etc/dpi/fastdpi.conf** there is a parameter to identify the way of channels differentiation: |
| <code>vchannels_type=1</code> |
| where\\ |
| * 1 different NICs will be used for different channels |
| * 2 different VLANs will be used for different channels |
| * 3 they will be defined via CIDR |
| |
| <note>**SSG 12.4+** Added setting ''vchannels_default='' to put traffic unallocated on other channels into a separate channel **(but not 0!)**</note> |
| |
| Next, you need to specify which physical interfaces, VLANs, CIDRs form the virtual channel. |
| |
| ==== For physical interfaces ==== |
| <code> |
| vchannels_list=60-00.0:60-00.1|61-00.0:61-00.1 |
| </code> |
| |
| <note important>Traffic through network interfaces **60-00.0 and 60-00.1 refers to the first virtual channel,** |
| and traffic through **61-00.0 and 61-00.1 refers to the second.** \\ |
| If the Stingray SG has other network interfaces specified in the in_dev/out_dev setting, the traffic through them will refer to the common channel, which is managed and limited in [[en:dpi:dpi_options:opt_shaping:shaping_settings|the configuration file]]. |
| </note> |
| |
| ==== For VLANs ==== |
| ===Method 1=== |
| <code> |
| vchannels_list=100:101-115|200:201:240-250 |
| </code> |
| |
| <note important>**VLAN 100 and 101-115 - virtual channel 1**, **VLAN 200 and 240-250 - virtual channel 2**. |
| Traffic that is not in VLANs defined in vchannels_list will be in common channel as before. It is managed as usual in [[en:dpi:dpi_options:opt_shaping:shaping_settings|configuration file]]</note> |
| |
| ===Method 2=== |
| :!: When applying the settings below, the value set in ''fastdpi.conf'' ([[en:dpi:dpi_options:opt_shaping:shaping_multi#method_1|method 1]]) will be overwritten. However, upon service restart, the parameter value will be applied from the ''fastdpi.conf'' file. |
| - Setting a VLAN list: <code bash>fdpi_cli dpi config set vchannels_list='100|101|102|103' --json |
| [ |
| { |
| result: { |
| result_code: 0, |
| message: "All parameters successfully reloaded" |
| }, |
| params: [ |
| { |
| opt_name: "vchannels_list", |
| result: true, |
| err_msg: "" |
| } |
| ] |
| } |
| ]</code>Where: 100 is vchannel 1, 101 is vchannel 2, and so on. |
| - Retrieving the VLAN list: <code bash>fdpi_cli dpi config get vchannels_list --json |
| [ |
| { |
| result: { |
| result_code: 0 |
| }, |
| params: [ |
| { |
| opt_name: "vchannels_list", |
| opt_value: "100|101|102|103", |
| result: true |
| } |
| ] |
| } |
| ]</code> |
| - Applying a service plan: <code bash>fdpi_ctrl load --policing --profile.name 1M --vchannel 2 --outformat json |
| { |
| "query" : { "cmd":"load", "param":"policing", "all":0, "profile":0}, |
| "lddls" : [ |
| ], |
| "stat_ld" : { "total" : 1, "ok" : 1, "ierr" : 0, "isset" : 0, "noset" : 0} |
| }</code> Where: |
| * ''total'' — the number of executed queries |
| * ''ok'' — the number of successful executions |
| * ''ierr'' — the number of errors |
| * ''isset'' — the number of commands that were issued but not executed due to missing settings or restrictions |
| * ''noset'' — the number of commands that were not executed for other reasons |
| - Checking the applied service plan on vchannel: <code bash>fdpi_ctrl list --policing --vchannel 2 --outformat json |
| { |
| "query" : { "cmd":"list", "param":"policing", "all":0, "profile":0}, |
| "lpolicings" : [ |
| { "nvc":2, "policing":{ "type":"HTB", "outbound":{ "root_rate":"1mbit","root_ceil":"1mbit","root_burst":"500kbit","root_cburst":"500kbit" , "classes" : [ {"cte":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":1, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":2, "rate":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":3, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":4, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":5, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":6, "rate":"8bit", "ceil":"8bit","burst":"8bit" },{"class":7, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" } ]}, "inbound":{ "bw_rate":"0bit", "bw_ceil":"0bit" , "root_rate":"1mbit","root_burst":"500kbit","root_cburst":"500kbit" , "classes" : [ {"class":0, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":1, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":2, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":3, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":4, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":5, "rate":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" },{"class":6, "rate":"8bit", "ceil":"8bit","burst":"8bit","cburst":"8bit" },{"class":7, "rate":" |