====== Subscriber Channel Policing ======
{{indexmenu_n>4}}
[[dpi:dpi_options:opt_bandwidth_mgmt|Product Description]]
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:
fdpi_ctrl load profile --policing rate_10_night.cfg --profile.name тариф_10
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?":
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;
or if a prepared list is available:
fdpi_ctrl load --policing policing.htb.cng --file my_rate10_ip.lst
where ''my_rate10_ip.lst'' contains the list of IPs, for example:
# cat my_rate10_ip.lst
10.64.66.110
10.64.66.112
10.64.66.114
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: service fastdpi reload
- Reload the bandwidth limitation rules: fdpi_ctrl load --policing rat_HTB.cfg --ip 109.234.130.131
- Check: fdpi_ctrl list all --policing
Output: 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
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: grep -A 7 "109.234.130.131" /var/log/dpi/fastdpi_stat.log | more
Outgoing: [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 %]
Incoming > 0: [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 %]
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.