Policing for Captive Portal [Документация 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:dpi_options:opt_capture:capt_portal [2020/02/05 17:32] – ↷ Page moved from en:dpi:dpi_options:base_functionality:opt_capture:capt_portal to en:dpi:dpi_options:opt_capture:capt_portal lexx26en:dpi:dpi_options:opt_capture:capt_portal [2024/09/26 15:29] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== How to create Captive Portal ======+====== Policing for Captive Portal ====== 
 +{{indexmenu_n>5}} 
 +First we select the protocols for Captive Portal availability in a separate class, as it is described in [[en:dpi:dpi_options:opt_priority:priority_config|Assignment of priorities]]. 
  
 +<note tip>These protocols typically are http/https/dns/icmp.</note>
 +<code bash>
 +http         cs0
 +https        cs0
 +dns          cs0
 +icmp         cs0
 +default      cs1
 +bittorrent   cs7
 +</code>
 +
 +Next we create the configuration file captive_portal.cfg. It specifies the bandwidth limits in Captive Portal mode for each of 8 classes(([[en:dpi:dpi_options:opt_bandwidth_mgmt|More details on bandwidth control]])).
 +
 +<code bash>
 +htb_inbound_root=rate 1mbit 
 +htb_inbound_class0=rate 8bit ceil 1mbit
 +htb_inbound_class1=rate 8bit ceil 8bit
 +htb_inbound_class2=rate 8bit ceil 8bit
 +htb_inbound_class3=rate 8bit ceil 8bit
 +htb_inbound_class4=rate 8bit ceil 8bit
 +htb_inbound_class5=rate 8bit ceil 8bit
 +htb_inbound_class6=rate 8bit ceil 8bit
 +htb_inbound_class7=rate 8bit ceil 8bit
 +htb_root=rate 1mbit 
 +htb_class0=rate 8bit ceil 1mbit 
 +htb_class1=rate 8bit ceil 8bit
 +htb_class2=rate 8bit ceil 8bit
 +htb_class3=rate 8bit ceil 8bit
 +htb_class4=rate 8bit ceil 8bit
 +htb_class5=rate 8bit ceil 8bit
 +htb_class6=rate 8bit ceil 8bit
 +htb_class7=rate 8bit ceil 8bit
 +</code>
 +
 +  * htb_root - is the root class. It specifies the total bandwidth. The bandwidth is redistributed within this class
 +  * rate - is the lower bandwidth limit
 +  * ceil - is the upper bandwidth limit, that can be borrowed from the root class if available
 +
 +We place a subscriber into Captive Portal when his account runs out of money:
 +<code bash>
 +fdpi_ctrl load --policing captive_portal.cfg --ip 192.168.0.1
 +fdpi_ctrl load --service 5 --ip 192.168.0.1
 +</code>
 +
 +Here we unblock the subscriber upon a deposit to his account:
 +<code bash>
 +fdpi_ctrl load --policing rate_plan1.cfg --ip 192.168.0.1
 +fdpi_ctrl del --service 5 --ip 192.168.0.1
 +</code>