Policing of Virtual Channel (vChannel) [Документация VAS Experts]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:dpi:dpi_options:opt_shaping:shaping_multi [2024/09/26 15:29] – external edit 127.0.0.1en:dpi:dpi_options:opt_shaping:shaping_multi [2025/08/19 15:43] (current) – [Policing Configuration] elena.krasnobryzh
Line 32: Line 32:
 </note> </note>
  
-==== For VLANs====+==== For VLANs ==== 
 +===Method 1===
 <code> <code>
 vchannels_list=100:101-115|200:201:240-250 vchannels_list=100:101-115|200:201:240-250
Line 40: Line 41:
 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> 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":"8bit", "ceil":"1mbit","burst":"8bit","cburst":"500kbit" } ], "description":{ "name":"1M" }}  
 + ],  
 + "stat_lst" : { "total" : 1, "isset" : 1, "noset" : 0}  
 +}</code> Name – the name of the service plan.  
 +  - Deleting a service plan from vchannel: <code bash>fdpi_ctrl del --policing  --vchannel 2 --outformat json  
 +{  
 + "query" : { "cmd":"del", "param":"policing", "all":0, "profile":0},  
 + "lddls" : [  
 + ],  
 + "stat_ld" : { "total" : 1, "ok" : 1, "ierr" : 0, "isset" : 0, "noset" : 0}  
 +}</code>  
 ==== For CIDR ==== ==== For CIDR ====
 Creating ipchannels.txt file: Creating ipchannels.txt file:
Line 72: Line 133:
  
 where vchannel1.cfg - file with policing definition (same as for the general channel,virtual channels and subscriber rate plans) where vchannel1.cfg - file with policing definition (same as for the general channel,virtual channels and subscriber rate plans)
 +
 +<note warning>Using virtual channel (vChannel) policing entails additional internal locks, which reduces system performance to 40G (when using tbf) and to 20G (when using htb) of total traffic on the vChannel, regardless of the number of cores.</note>
  
 **Example of the configuration file:** **Example of the configuration file:**