Subscriber Channel Policing [Документация VAS Experts]

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
en:dpi:faq:dpi:bandwidth [2024/08/05 13:56] elena.krasnobryzhen:dpi:faq:dpi:bandwidth [2024/09/26 15:29] (current) – external edit 127.0.0.1
Line 1: Line 1:
-======bandwidth======+====== Subscriber Channel Policing ====== 
 +{{indexmenu_n>4}} 
 +<note>[[en:dpi:dpi_options:opt_bandwidth_mgmt|Product Description]]</note> 
 +<accordion autoclose> 
 +<accordion-item title="1. How to Change the Tariff Plan for Multiple Subscribers"> 
 +If a named profile is used for setting the tariff plan, simply change the tariff plan settings in this profile. These changes will automatically apply to all subscribers with this tariff plan name: 
 +<code bash>fdpi_ctrl load profile --policing rate_10_night.cfg --profile.name тариф_10</code> 
 + 
 +If the policing profiles are anonymous (without a name), you can switch one tariff to another as follows, using ''rate10.cfg bp'' from question 2 "How to Diagnose Bandwidth Distribution for a Subscriber?": 
 +<code bash>fdpi_ctrl list all --policing | grep 'rrate=1250000(10.00mbit)' |  awk '{ print $1}' > ll.tmp; fdpi_ctrl load --policing policing.htb.cng --file ll.tmp;</code> 
 + 
 +or if a prepared list is available: 
 +<code bash>fdpi_ctrl load --policing policing.htb.cng --file my_rate10_ip.lst</code> 
 +where ''my_rate10_ip.lst'' contains the list of IPs, for example: 
 +<code bash> 
 +  # cat my_rate10_ip.lst 
 +  10.64.66.110 
 +  10.64.66.112 
 +  10.64.66.114 
 +</code> 
 +</accordion-item> 
 + 
 +<accordion-item title="2. How to Diagnose Bandwidth Distribution for a Subscriber"> 
 +Diagnosing the issue of lack of bandwidth limitation: 
 +  - Enable the parameter ''plc_trace_ip=109.234.130.131'' in ''/etc/dpi/fastdpi.conf'' 
 +  - Reload the configuration: <code bash>service fastdpi reload</code> 
 +  - Reload the bandwidth limitation rules: <code bash>fdpi_ctrl load --policing rat_HTB.cfg --ip 109.234.130.131</code> 
 +  - Check: <code bash>fdpi_ctrl list all --policing</code> Output: <code bash>Autodetected fastdpi params : dev='em3', port=29000 
 +connecting 217.74.168.149:29000 ... 
 + 
 +109.234.130.131 HTB     dnlnk_rate=0.00mbit     dnlnk_ceil=0.00mbit 
 +rrate=500000(4.00mbit)  rburst=250000(2.00mbit) rceil=500000(4.00mbit) 
 +rcburst=250000(2.00mbit)        rate0=0.51mbit  ceil0=3.00mbit  rate1=0.01mbit 
 +ceil1=1.00mbit  rate2=0.01mbit  ceil2=1.00mbit  rate3=0.01mbit  
 +ceil3=1.00mbit  rate4=0.01mbit  ceil4=1.00mbit  rate5=0.01mbit  
 +ceil5=1.00mbit  rate6=0.01mbit  ceil6=1.00mbit  rate7=0.01mbit  
 +ceil7=1.00mbit  HTB_INBOUND     rrate=250000(2.00mbit)  
 +rburst=125000(1.00mbit) rceil=375000(3.00mbit)  
 +rcburst=187500(1.50mbit)        rate0=0.51mbit  ceil0=2.00mbit  rate1=0.01mbit  
 +ceil1=1.00mbit  rate2=0.01mbit  ceil2=1.00mbit  rate3=0.01mbit  
 +ceil3=1.00mbit  rate4=0.01mbit  ceil4=1.00mbit  rate5=0.01mbit  
 +ceil5=1.00mbit  rate6=0.01mbit  ceil6=1.00mbit  rate7=0.01mbit  ceil7=1.00mbit</code>Rules are loaded. 
 +  - Check the statistics log for this IP. If there is traffic for this IP, the log is not empty; if it is empty, traffic is not passing through SKAT, or the interface orientation is incorrect (''in_dev'' should face the subscribers). Check: <code bash>grep -A 7 "109.234.130.131" /var/log/dpi/fastdpi_stat.log | more</code>Outgoing:<code bash>    [STAT    ][2014/10/30-19:25:16:441786] HTB : Statistics (IP=109.234.130.131) dscp=7, if 'dna2'
 +                DSCP_actual stats Rcvd: [358187060 bytes][47.73 Mbit/sec] 
 +                                        [232589 pkts ][3,874.07 pkt/sec] 
 +                                  Drop: [354236960 bytes][98.90 %] 
 +                                        [230024 pkts ][98.90 %] 
 +                                  Send: [0 bytes][0.00 Mbit/sec] 
 +                                        [0 pkts ][0.00 pkt/sec] 
 +                                  Esnd: [0 err_pkts][0.00 %]</code>Incoming > 0:<code bash>    [STAT    ][2014/10/30-19:25:16:441793] HTB : Statistics (IP=109.234.130.131) dscp=0, if 'dna3'
 +                DSCP_actual stats Rcvd: [1018 bytes][0.00 Mbit/sec] 
 +                                        [10 pkts ][0.17 pkt/sec] 
 +                                  Drop: [0 bytes][0.00 %] 
 +                                        [0 pkts ][0.00 %] 
 +                                  Send: [828 bytes][0.00 Mbit/sec] 
 +                                        [9 pkts ][0.15 pkt/sec] 
 +                                  Esnd: [0 err_pkts][0.00 %] 
 + 
 +    [STAT    ][2014/10/30-19:25:16:441834] HTB : Statistics (IP=109.234.130.131) dscp=7, if 'dna3'
 +                DSCP_actual stats Rcvd: [0 bytes][0.00 Mbit/sec] 
 +                                        [0 pkts ][0.00 pkt/sec] 
 +                                  Drop: [0 bytes][0.00 %] 
 +                                        [0 pkts ][0.00 %] 
 +                                  Send: [3950100 bytes][0.53 Mbit/sec] 
 +                                        [2565 pkts ][42.72 pkt/sec] 
 +                                  Esnd: [0 err_pkts][0.00 %]</code>Therefore, outgoing traffic is being limited, as indicated by the presence of drops, and incoming traffic is going through an alternative route and not subject to the rules loaded into SKAT. 
 +</accordion-item> 
 +</accordion>