Settings and management [Документация VAS Experts]

Differences

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

Link to this comparison view

Next revision
Previous revision
en:dpi:opt_cgnat:сgnat_settings [2024/09/26 15:29] – created - external edit 127.0.0.1en:dpi:opt_cgnat:сgnat_settings [2024/11/29 10:33] (current) elena.krasnobryzh
Line 1: Line 1:
 +{{tag>Services "Service 11" NAT CG-NAT}}
 ====== Settings and management ====== ====== Settings and management ======
 {{indexmenu_n>2}} {{indexmenu_n>2}}
Line 15: Line 16:
 Create named profile that defines CGNAT IP pool parameters: Create named profile that defines CGNAT IP pool parameters:
 <code bash>fdpi_ctrl load profile --service 11  --profile.name test_nat --profile.json '{ "nat_ip_pool" : "5.200.43.0/24,5.200.44.128/25", "nat_tcp_max_sessions" : 2000, "nat_udp_max_sessions" : 2000 }'</code> <code bash>fdpi_ctrl load profile --service 11  --profile.name test_nat --profile.json '{ "nat_ip_pool" : "5.200.43.0/24,5.200.44.128/25", "nat_tcp_max_sessions" : 2000, "nat_udp_max_sessions" : 2000 }'</code>
-A description of the parameters can be found in the [[https://wiki.vasexperts.ru/doku.php?id=en:dpi:opt_cgnat:сgnat_settings&do=edit#parameters_and_possible_values|table]] below.+A description of the parameters can be found in the [[en:dpi:opt_cgnat:сgnat_settings#parameters_and_possible_values|table]] below.
  
 <note important>In case a ''login'' is bound to several IPs, the session counter is separate for each IP address.</note> <note important>In case a ''login'' is bound to several IPs, the session counter is separate for each IP address.</note>
  
-<note>When specifying a range of external IP addresses, you can specify one or more ranges separated by commas; [[en:dpi:opt_cgnat:faq#how_to_change_the_parameters_of_an_existing_and_being_used_pool|also you can dynamically add additional ranges to a previously created pool]].\\+<note>When specifying a range of external IP addresses, you can specify one or more ranges separated by commas; [[en:dpi:faq:cgnat|also you can dynamically add additional ranges to a previously created pool]].\\
 You can exclude reserved addresses from the range (according to the classless addressing convention, these are gateway and broadcast addresses) by adding the "~" symbol to the range definition at the end of the ''cidr'' definition, for example ''5.200.43.0/24~''.</note> You can exclude reserved addresses from the range (according to the classless addressing convention, these are gateway and broadcast addresses) by adding the "~" symbol to the range definition at the end of the ''cidr'' definition, for example ''5.200.43.0/24~''.</note>
  
Line 28: Line 29:
 fdpi_ctrl load profile --service 11  --profile.name test_nat --profile.json '{ "nat_ip_pool" : "5.200.44.0/24", "nat_type" : 1 }' fdpi_ctrl load profile --service 11  --profile.name test_nat --profile.json '{ "nat_ip_pool" : "5.200.44.0/24", "nat_type" : 1 }'
 </code> </code>
-A description of the parameters can be found in the [[https://wiki.vasexperts.ru/doku.php?id=en:dpi:opt_cgnat:сgnat_settings&do=edit#parameters_and_possible_values|table]] below.+A description of the parameters can be found in the [[en:dpi:opt_cgnat:сgnat_settings#parameters_and_possible_values|table]] below.
  
-<note>When specifying a range of external IP addresses, you can specify one or more ranges separated by commas; [[en:dpi:opt_cgnat:faq#how_to_change_the_parameters_of_an_existing_and_being_used_pool|also you can dynamically add additional ranges to a previously created pool]].\\+<note>When specifying a range of external IP addresses, you can specify one or more ranges separated by commas; [[en:dpi:faq:cgnat|also you can dynamically add additional ranges to a previously created pool]].\\
 You can exclude reserved addresses from the range (according to the classless addressing convention, these are gateway and broadcast addresses) by adding the "~" symbol to the range definition at the end of the cidr definition, for example 5.200.43.0/24~\\ :!: Temporary restriction: each of the individual pools in the total pool list must contain at least as many public addresses as the number of worker threads.</note> You can exclude reserved addresses from the range (according to the classless addressing convention, these are gateway and broadcast addresses) by adding the "~" symbol to the range definition at the end of the cidr definition, for example 5.200.43.0/24~\\ :!: Temporary restriction: each of the individual pools in the total pool list must contain at least as many public addresses as the number of worker threads.</note>
  
Line 58: Line 59:
   *''lifetime_flow''   *''lifetime_flow''
   *''lifetime_flow_long''   *''lifetime_flow_long''
-A description of the parameters can be found in the [[https://wiki.vasexperts.ru/doku.php?id=en:dpi:opt_cgnat:сgnat_settings&do=edit#parameters_and_possible_values|table]] below.+A description of the parameters can be found in the [[en:dpi:opt_cgnat:сgnat_settings#parameters_and_possible_values|table]] below.
  
-Starting with version 12.0, it is now possible to select the method of hashing flow by worker threads. When using the new method, address distribution does not depend on the number of worker threads. It is configured by parameter ''rx_dispatcher'' in fastpdi.conf (**restart** of the service is required to save changes). The values of the parameter are described in the [[https://wiki.vasexperts.ru/doku.php?id=en:dpi:opt_cgnat:сgnat_settings&do=edit#parameters_and_possible_values|table]] below.+Starting with version 12.0, it is now possible to select the method of hashing flow by worker threads. When using the new method, address distribution does not depend on the number of worker threads. It is configured by parameter ''rx_dispatcher'' in fastpdi.conf (**restart** of the service is required to save changes). The values of the parameter are described in the [[en:dpi:opt_cgnat:сgnat_settings#parameters_and_possible_values|table]] below.
  
 In order to guarantee NAT (translation) for a private IP address to any public IP address when using NAT 1:1, you must specify the IP address range that is used in NAT 1:1. This is configured by the ''nat_transcode_cidr'' parameter in fastdpi.conf (**restart** of the service is required to save changes), which specifies the CIDR of the public operator addresses. It is possible to specify only 2 CIDRs (in case of using more CIDRs, it is allowed to specify a wider CIDR): In order to guarantee NAT (translation) for a private IP address to any public IP address when using NAT 1:1, you must specify the IP address range that is used in NAT 1:1. This is configured by the ''nat_transcode_cidr'' parameter in fastdpi.conf (**restart** of the service is required to save changes), which specifies the CIDR of the public operator addresses. It is possible to specify only 2 CIDRs (in case of using more CIDRs, it is allowed to specify a wider CIDR):
  
 <code bash>nat_transcode_cidr=201.201.210.0/24,201.210.210.0/29</code> <code bash>nat_transcode_cidr=201.201.210.0/24,201.210.210.0/29</code>
-The description of the parameter can be found in the [[https://wiki.vasexperts.ru/doku.php?id=en:dpi:opt_cgnat:сgnat_settings&do=edit#parameters_and_possible_values|table]] below.\\+The description of the parameter can be found in the [[en:dpi:opt_cgnat:сgnat_settings#parameters_and_possible_values|table]] below.\\
 The ''nat_transcode_cidr'' parameter is **only** relevant when using the new distribution method **AND** using NAT 1:1. In other cases this parameter is not taken into account and is not considered an error. The ''nat_transcode_cidr'' parameter is **only** relevant when using the new distribution method **AND** using NAT 1:1. In other cases this parameter is not taken into account and is not considered an error.
  
 =====Parameters and possible values===== =====Parameters and possible values=====
-^  NAT profile parameters  ^^ +^  NAT profile parameters                                                                                                                                                                ^^ 
-^  Parameter  ^  Value  +^  Parameter                          ^  Value                                                                                                                                            
-| ''nat_ip_pool''\\ string                           | A range of external IP addresses in CIDR format. The pool size should **not be smaller** than [[en:dpi:opt_cgnat:faq#why_an_address_pool_of_at_least_2_or_4_addresses_is_recommended_to_create|the number of worker threads]].                                                                                                                                                                                                                                                      +| ''nat_ip_pool''\\ string            | A range of external IP addresses in CIDR format. The pool size should **not be smaller** than [[en:dpi:faq:cgnat|the number of worker threads]].  
-| ''nat_tcp_max_sessions''\\ integer                 | The maximum number of TCP sessions a subscriber can create.\\ Default: 2000.                                                                                                                                                                                                                                                                                                                                                                                                              +| ''nat_tcp_max_sessions''\\ integer  | The maximum number of TCP sessions a subscriber can create.\\ Default: 2000.                                                                      
-| ''nat_udp_max_sessions''\\ integer                 | The maximum number of UDP sessions a subscriber can create.\\ Default: 2000.                                                                                                                                                                                                                                                                                                                                                                                                              +| ''nat_udp_max_sessions''\\ integer  | The maximum number of UDP sessions a subscriber can create.\\ Default: 2000.                                                                      
-| ''nat_type''\\ integer                             | Sets the type of profile.\\ Choices:\\ ''0'' --- CGNAT;\\ ''1'' --- NAT 1:1.                                                                                                                                                                                                                                                                                                                                                                                                              +| ''nat_type''\\ integer              | Sets the type of profile.\\ Choices:\\ ''0'' --- CGNAT;\\ ''1'' --- NAT 1:1.                                                                      
-| ''nat_ports''\\ string                             | The range of ports used for translation on external addresses.\\ Default: 1024-65535.                                                                                                                                                                                                                                                                                                                                                                                                     |+| ''nat_ports''\\ string              | The range of ports used for translation on external addresses.\\ Default: 1024-65535.                                                             |
  
-^  fastdpi.conf parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ||+^  fastdpi.conf parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ^^
 ^  Parameter                                          Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^ ^  Parameter                                          Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^
 | ''nat_max_profiles''\\ integer                     | Maximum number of profiles with pool parameters.\\ Default: 4.\\ Max: 65000 (if sufficient RAM is available).                                                                                                                                                                                                                                                                                                                                                                             | | ''nat_max_profiles''\\ integer                     | Maximum number of profiles with pool parameters.\\ Default: 4.\\ Max: 65000 (if sufficient RAM is available).                                                                                                                                                                                                                                                                                                                                                                             |
Line 83: Line 84:
 | ''nat_private_cidr''\\ string                      | Specifies additional private address ranges in addition to the standard ranges((Standard ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10)).\\ Max: 4 ranges.                                                                                                                                                                                                                                                                                                             | | ''nat_private_cidr''\\ string                      | Specifies additional private address ranges in addition to the standard ranges((Standard ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10)).\\ Max: 4 ranges.                                                                                                                                                                                                                                                                                                             |
 | ''lifetime_flow''\\ integer                        | Specifies the short queue time in seconds for TCP SYN, FIN, UDP.\\ Default: 60.                                                                                                                                                                                                                                                                                                                                                                                                           | | ''lifetime_flow''\\ integer                        | Specifies the short queue time in seconds for TCP SYN, FIN, UDP.\\ Default: 60.                                                                                                                                                                                                                                                                                                                                                                                                           |
-| ''lifetime_flow_long''\\ integer                   | Specifies the long queue time in seconds for a TCP DATA established connection.\\ Default: 300.                                                                                                                                                                                                                                                                                                                                                                                           +| ''lifetime_flow_long''\\ integer                   | Specifies the long queue time in seconds for a TCP DATA established connection. SSG controls flags in TCP connections (FIN, RST) when connections are closed and connections are put into a short queue.\\ Default: 300.                                                                                                                                                                                                                                                                  
-| ''nat_whp_lifetime''\\ integer                     | Specifies the short queue time in seconds for NAT broadcast for TCP SYN, FIN, UDP. This parameter overrides ''lifetime_flow'' for NAT broadcasts only.\\ Default: 75.                                                                                                                                                                                                                                                                                                                     +| ''nat_whp_lifetime''\\ integer                     | Specifies the short queue time in seconds for NAT broadcast for TCP SYN, FIN, UDP. This parameter overrides ''lifetime_flow'' for NAT broadcasts only. \\ Default: 75.                                                                                                                                                                                                                                                                                                                    
-| ''nat_whp_lifetime_long''\\ integer                | Specifies the long queue time in seconds for NAT broadcast for a TCP DATA established connection. This parameter overrides ''lifetime_flow_long'' for NAT broadcasts only.\\ Default: 375.                                                                                                                                                                                                                                                                                                |+| ''nat_whp_lifetime_long''\\ integer                | Specifies the long queue time in seconds for NAT broadcast for a TCP DATA established connection. This parameter overrides ''lifetime_flow_long'' for NAT broadcasts only. SSG controls flags in TCP connections (FIN, RST) when connections are closed and connections are put into a short queue.\\ Default: 375.                                                                                                                                                                       |
 | ''nat_transcode_cidr''\\ string\\ //Add in 12.0//  | Specifies the CIDR of the operator's public addresses. \\ Only 2 CIDRs can be specified (in case of using more CIDRs, it is acceptable to specify a wider CIDR). The values are used when transcoding public -> private for NAT 1:1. Any public address can be assigned to a private address for NAT 1:1.                                                                                                                                                                                 | | ''nat_transcode_cidr''\\ string\\ //Add in 12.0//  | Specifies the CIDR of the operator's public addresses. \\ Only 2 CIDRs can be specified (in case of using more CIDRs, it is acceptable to specify a wider CIDR). The values are used when transcoding public -> private for NAT 1:1. Any public address can be assigned to a private address for NAT 1:1.                                                                                                                                                                                 |
 | ''rx_dispatcher''\\ integer \\ //Add in 12.0//     | The method of hashing flow by workflow.\\ Choices:\\ ''0'' --- previous method ← (default). ''(IP_SRC+IP_DST)%N ) & IP_MASK''\\ ''1'' --- a method with uniform balancing over an arbitrary number of flows **with** NAT 1:1 support with the requirement to assign specific addresses. ''(CRC(IP_SRC)%N+CRC(IP_DST)%N)%N''\\ ''2'' --- a method with uniform balancing over an arbitrary number of flows **without** NAT 1:1 support with the requirement to assign specific addresses.  | | ''rx_dispatcher''\\ integer \\ //Add in 12.0//     | The method of hashing flow by workflow.\\ Choices:\\ ''0'' --- previous method ← (default). ''(IP_SRC+IP_DST)%N ) & IP_MASK''\\ ''1'' --- a method with uniform balancing over an arbitrary number of flows **with** NAT 1:1 support with the requirement to assign specific addresses. ''(CRC(IP_SRC)%N+CRC(IP_DST)%N)%N''\\ ''2'' --- a method with uniform balancing over an arbitrary number of flows **without** NAT 1:1 support with the requirement to assign specific addresses.  |