This is an old revision of the document!
How to change the parameters of an existing and being used pool?
1) To change the limit on a number of sessions:
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 }'
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:
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 }'
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
Please install jq (a utility for working with data in JSON format) for your convenience:
yum install epel-release yum-utils yum-config-manager --disable epel yum --enablerepo epel install jq
After that we will save information about the subscribers of the current pool, delete pool, create one and assign the subscribers to it:
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
Do not forget to change the pool name and its new parameters in the commands given above according to your actual settings.