IP-login binding (bind, bind_multi) [Документация VAS Experts]

Differences

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

Link to this comparison view

en:dpi:dpi_components:platform:subscriber_management:dpi_dynamicip [2024/09/26 15:29] – created - external edit 127.0.0.1en:dpi:dpi_components:platform:subscriber_management:dpi_dynamicip [2026/06/29 09:30] (current) elena.krasnobryzh
Line 1: Line 1:
-====== Support for subscribers with a single IPv4 address and an IPv6 subnet binding or with dynamically assigned IP addresses ======+====== IP-login binding (bind, bind_multi) ======
 {{indexmenu_n>7}} {{indexmenu_n>7}}
-Service and channel management for subscribers with dynamically assigned IP address is performed by codemane (LOGIN), which is specified in the [[en:dpi:dpi_components:platform:subscriber_management:subsman_cmd|control commands]] by corresponding ''--login'' long option. +Service and bandwidth management for subscribers with dynamically assigned IP addresses is performed using logical name (login), which is specified in the [[en:dpi:dpi_components:platform:subscriber_management:subsman_cmd|management commands]] using the corresponding ''--login'' parameter. To support login binding functionality in DPI, it is necessary to [[en:dpi:dpi_components:platform:dpi_admin:admin_db#enabling_the_built-in_database|enable UDR]]. \\ 
-To support the DPI login binding feature you need to [[en:dpi:dpi_components:platform:dpi_admin:admin_db#Activating the built-in database|activate the UDR]].+<note tip>The advantage is that service and policing profiles are assigned to the login and can remain unchanged for a long time, while the subscriber's IP address changes dynamically. As long as bindings are updated promptly, DPI always has up-to-date rules and statistics for the subscriber's IP address.</note>
  
-If the dynamic IP addresses assignment is performed by the Radius server, it is recommended to use the "Radius event monitor", which will automatically transmit to the dpi the information on the IP addresses being assigned and releasedIn this case, the User-Name attribute in the Radius requests is used as a login.+DPI supports two types of IP-login binding: 
 +  * **bind** — Single binding. One login corresponds to exactly one IP address. 
 +  * **bind_multi** — Multiple binding. A subscriber with multiple IP addresses is treated by DPI as a single subscriber: services and bandwidth management are shared across all IP addresses assigned to that subscriberThis is commonly used for corporate subscribers who are allocated a channel and a pool of IP addresses that share the same resources. It is also used when subscriber is assigned a Dual Stack IPv4/IPv6 configuration. When service or policing profiles are changed for such a login, the changes are immediately applied to all IP addresses associated with that login.
  
-To integrate with other platforms, it is necessary to support the custom scripts triggered by the events of IP address assignment and releasing (for example, this feature is present in the standard dhcp linux server). In this casethe IP address and LOGIN binding as well as the deletion of the bind are performed using special commands.+The main semantic differences between ''bind'' and ''bind_multi'' are: 
 +  - ''load --bind'' replaces the IP address previously assigned to the subscriberwhile ''load --bind_multi'' adds a new address 
 +  - ''load --bind'' automatically reassigns an IP address if it is already assigned to another subscriber 
 +  - ''load --bind'' uses less database space
  
-IP address and LOGIN bind+If IP addresses are dynamically assigned by a RADIUS server, it is recommended to use [[en:dpi:dpi_components:radius|]], which automatically transfers information about assigned and released IP addresses to DPI. In this case, the RADIUS User-Name attribute is used as the login. 
 +For integration with other platforms, support for executing custom scripts on IP address assignment and release events is required (for example, this capability is available in the standard Linux DHCP server). 
 + 
 +===== Single binding management commands ===== 
 + 
 +Bind an IP address to a login:
 <code bash> <code bash>
 fdpi_ctrl load --bind --user subscriber_name:ip_address fdpi_ctrl load --bind --user subscriber_name:ip_address
-</code>  +</code>
  
-The example:+Create two different single bindings:
 <code bash> <code bash>
-fdpi_ctrl load --bind --user test_user:191.168.1.1 +fdpi_ctrl load --bind --user test_ipv4:191.168.1.1 
-fdpi_ctrl load --bind --user test_user:2a00:0:0:0:7aac:c0ff:fea7:d4c/64+fdpi_ctrl load --bind --user test_ipv6:2001:470:e5bf:dead::0/64
 </code> </code>
  
-To delete the IP <-> login bind+Replace the IP address associated with login ''test_ipv4'':
 <code bash> <code bash>
-fdpi_ctrl del --bind --login subscriber_name +fdpi_ctrl load --bind --user test_ipv4:191.168.1.2 
-</code>  +</code>
  
-To list the binded subscriber IP address +Remove an IP <-> login binding:
 <code bash> <code bash>
-fdpi_ctrl list --bind --login subscriber_name +fdpi_ctrl del --bind --login test_ipv6 
-</code>  +</code>
  
-To list all the subscribers having binded IP+Display the IP address associated with a subscriber: 
 +<code bash> 
 +fdpi_ctrl list --bind --login test_ipv4 
 +</code> 
 + 
 +Display all subscribers with bound IP addresses:
 <code bash> <code bash>
 fdpi_ctrl list all --bind fdpi_ctrl list all --bind
-</code>  +</code>
  
-The next section discusses the binding of subscribers with an arbitrary IP addresses number+===== Multiple binding management commands ===== 
-An important difference between bind semantics and bind_multi one is: + 
-  ''load --bind'' replaces the address previously assigned to the subscriber, while load --bind_multi adds it +IP addresses can be assigned to a subscriber individually or in blocks: 
-  ''load --bind'' automatically takes the assigned address from another subscriber +<code bash> 
-  ''load --bind'' uses the database more efficiently+192.168.0.1                      single IPv4 address 
 +192.168.0.1-192.168.0.5          range (inclusive) 
 +192.168.0.0/30                   CIDR 
 +192.168.0.1,192.168.0.3          list 
 +2001:db8:2000:1200::/64          IPv6 subnet 
 +</code> 
 + 
 +Bind multiple IP addresses to a single login (each command only adds IP addresses to the login; if an IP address is already present in ''bind_multi'', assigning it again is not considered an error)
 +<code bash> 
 +fdpi_ctrl load --bind_multi --user test:192.168.0.1 
 +fdpi_ctrl load --bind_multi --user test:192.168.0.1-192.168.0.5 
 +fdpi_ctrl load --bind_multi --user test:192.168.0.0/30 
 +fdpi_ctrl load --bind_multi --user test:192.168.0.1,192.168.0.3 
 +fdpi_ctrl load --bind_multi --user test:2001:db8:2000:1200::/64 
 +</code> 
 + 
 +Remove all IP addresses associated with a login: 
 +<code bash> 
 +fdpi_ctrl del --bind_multi --login test 
 +</code> 
 + 
 +Remove one of the IP addresses associated with a login: 
 +<code bash> 
 +fdpi_ctrl del --bind_multi --ip 192.168.0.1 
 +</code> 
 + 
 +Display all IP addresses associated with a subscriber that has multiple IP addresses: 
 +<code bash> 
 +fdpi_ctrl list --bind_multi --login test 
 +</code> 
 + 
 +Display all subscribers with multiple IP addresses: 
 +<code bash> 
 +fdpi_ctrl list all --bind_multi 
 +</code>