en:dpi:opt_cgnat:faq:cgnat_faq_5 [Документация 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:opt_cgnat:faq:cgnat_faq_5 [2023/08/28 14:08] – ↷ Page moved from en:dpi:opt_cgnat:cgnat_faq:cgnat_faq_5 to en:dpi:opt_cgnat:faq:cgnat_faq_5 elena.krasnobryzhen:dpi:opt_cgnat:faq:cgnat_faq_5 [2023/08/28 14:19] (current) – removed elena.krasnobryzh
Line 1: Line 1:
-====== How to change the parameters of an existing and being used pool? ====== 
-{{indexmenu_n>5}} 
-1) To change the limit on a number of sessions: 
-<code bash> 
-fdpi_ctrl load profile --service 11  --profile.name test_nat_2000 --profile.json '{ "nat_ip_pool" : "111.111.111.0/24", "nat_tcp_max_sessions" : 2000, "nat_udp_max_sessions" : 2000, "nat_type" : 0 }' 
-</code> 
-The command to create a pool is identical to the previous one but with different ''nat_tcp_max_sessions'' and ''nat_udp_max_sessions'' settings 
- 
-2) To add the additional addresses to the pool: 
-<code bash> 
-fdpi_ctrl load profile --service 11  --profile.name test_nat_2000 --profile.json '{ "nat_ip_pool" : "111.111.111.0/24,222.222.222.0/25", "nat_tcp_max_sessions" : 2000, "nat_udp_max_sessions" : 2000, "nat_type" : 0 }' 
-</code> 
-The command to create a pool is identical to the previous one with an additional pool specified with a comma. 
- 
-3) To reduce the pool 
- 
-<note important>The current version does not support pool size dynamic reduction and deletion addresses from it. 
-To do so you should free the pool, delete it and create it with new parameters.</note> 
- 
-Please install jq (a utility for working with data in JSON format) for your convenience: 
-<code bash> 
-yum install epel-release yum-utils 
-yum-config-manager --disable epel 
-yum --enablerepo epel install jq 
-</code> 
- 
-After that we will save information about the subscribers of the current pool, delete pool, create one and assign the subscribers to it: 
-<code bash> 
-fdpi_ctrl list all --service 11 --profile.name test_nat_4000 --outformat json|jq '.lservices[] | .login | select(. != null)' > save_users.txt 
-fdpi_ctrl list all --service 11 --profile.name test_nat_4000 --outformat json|jq -r '.lservices[] | .ipv4 | select(. != null)' >> save_users.txt 
-fdpi_ctrl del all --service 11 --profile.name test_nat_4000 
-fdpi_ctrl del profile --service 11 --profile.name test_nat_4000 
-fdpi_ctrl load profile --service 11  --profile.name test_nat_4000 --profile.json '{ "nat_ip_pool" : "111.111.111.0/30", "nat_tcp_max_sessions" : 4000, "nat_udp_max_sessions" : 4000, "nat_type" : 0 }' 
-fdpi_ctrl load --service 11 --profile.name test_nat_4000 --file save_users.txt 
-</code> 
-Do not forget to change the pool name and its new parameters in the commands given above according to your actual settings.