2 How to troubleshoot the subscriber bandwidth allocation?

The absence of bandwidth restrictions indicates there is a problem to solve.

Add the following option to the /etc/dpi/fastdpi.conf file:

plc_trace_ip=109.234.130.131

Reload fastDPI service:

service fastdpi reload

Reload the bandwidth constraints rules:

fdpi_ctrl load --policing rat_HTB.cfg --ip 109.234.130.131

Check all the fastDPI policing settings:

fdpi_ctrl list all --policing

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

The rules are loaded successfully.

Check the statistics log for the given IP. Not empty log indicates the presence of the traffic, otherwise it indicates that the traffic is not routed through the Stingray Service Gateway or the interfaces are not configured properly(in_dev should be oriented towards the subscribers). Let's analyse the stat.log (using the grep output) for the given IP:

grep -A 7 "109.234.130.131" /var/log/dpi/fastdpi_stat.log | more

The outgoing traffic:

[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 %]

The incoming traffic > 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, the outgoing traffic is limited, it is indicated by the non zero Drop entries, so the incoming traffic is routed alternatively and does not fall under the rules loaded in the Stingray Service Gateway.