f5networks.f5_modules.bigip_cgnat_lsn_pool module – Manage CGNAT LSN Pools
Note
This module is part of the f5networks.f5_modules collection (version 1.17.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install f5networks.f5_modules
.
To use it in a playbook, specify: f5networks.f5_modules.bigip_cgnat_lsn_pool
.
New in version 1.0.0: of f5networks.f5_modules
Parameters
Parameter |
Comments |
---|---|
Specifies translation IP addresses available for backup members, which are used by Deterministic translation mode if This is a collection of IP prefixes with their prefix lengths. |
|
Specifies the maximum number of simultaneous translated connections a client or subscriber is allowed to have. Valid range of values is between |
|
User created LSN pool description. |
|
Specifies the set of interfaces on which the source address translation is allowed or disallowed, as determined by the |
|
Specifies how the system handles address translation on the interfaces specified in When set to When set to Choices:
|
|
Enables or disables hairpinning for incoming connections to active translation end-points. Choices:
|
|
Enables or disables ICMP echo on translated addresses. Choices:
|
|
Controls whether or not the BIG-IP system supports inbound connections for each outbound mapping. When When When Choices:
|
|
Specifies the name of the logging profile the pool uses. |
|
Specifies the name of the log publisher that logs translation events. |
|
Specifies the set of translation IP addresses available in the pool. This is a collection of IP prefixes with their prefix lengths. All public-side addresses come from the addresses in this group of subnets. Members of two or more deterministic LSN pools must not overlap. Every external address used for deterministic mapping must occur only in one LSN pool. |
|
Specifies the translation address mapping mode. The The The Choices:
|
|
Specifies the name of the LSN pool to manage. |
|
Device partition on which to manage resources. Default: “Common” |
|
Specifies the timeout duration subsequent to the point when the port block becomes idle. Valid range of values is between |
|
Specifies the timeout for the port block, after which the block is not used for new port allocations. Valid range of values is between The value of |
|
Specifies the number of ports in a block. Valid range of values is between The |
|
Specifies the number of blocks that can be assigned to a single subscriber IP address. |
|
Specifies the timeout duration for a zombie port block, which is a timed out port block with one or more active connections. When the timeout duration expires, connections using the zombie block are killed and the zombie port block becomes an available port block. The value of System ignores this parameter value if |
|
Specifies the persistence settings for LSN translation entries. When When When Choices:
|
|
Specifies the persistence timeout value for LSN translation entries. If a particular mapping is unused for this length of time, the mapping expires and the public-side address/port pair is free for use in other mappings. Valid range of values is between |
|
Specifies the high end of the range of port numbers available for use with translation IP addresses. The Valid range of values is between |
|
Specifies the low end of the range of port numbers available for use with translation IP addresses. The Valid range of values is between |
|
A dict object containing connection details. |
|
Configures the auth provider for to obtain authentication tokens from the remote device. This option is really used when working with BIG-IQ devices. |
|
If You may omit this option by setting the environment variable Previously used variable Choices:
|
|
The password for the user account used to connect to the BIG-IP. You may omit this option by setting the environment variable |
|
The BIG-IP host. You may omit this option by setting the environment variable |
|
The BIG-IP server port. You may omit this option by setting the environment variable Default: 443 |
|
Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|
Configures the transport connection to use when connecting to the remote device. Choices:
|
|
The username to connect to the BIG-IP with. This user must have administrative privileges on the device. You may omit this option by setting the environment variable |
|
If You may omit this option by setting the environment variable Choices:
|
|
Specifies whether the translation addresses are passed to the Advanced Routing Module for advertisement through dynamic routing protocols. Choices:
|
|
When When Choices:
|
Notes
Note
Requires CGNAT is licensed and enabled on BIG-IP.
For more information on using Ansible to manage F5 Networks devices see https://www.ansible.com/integrations/networks/f5.
Requires BIG-IP software version >= 12.
The F5 modules only manipulate the running configuration of the F5 product. To ensure that BIG-IP specific configuration persists to disk, be sure to include at least one task that uses the f5networks.f5_modules.bigip_config module to save the running configuration. Refer to the module’s documentation for the correct usage of the module to save your running configuration.
Examples
- name: Create an lsn pool
bigip_cgnat_lsn_pool:
name: foo
mode: napt
client_conn_limit: 100
log_profile: foo_profile
log_publisher: foo_publisher
members:
- 10.1.1.0/24
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Update lsn pool
bigip_cgnat_lsn_pool:
name: foo
mode: pba
pba_block_size: 128
pba_block_lifetime: 7200
pba_block_idle_timeout: 1800
pba_zombie_timeout: 900
log_profile: foo_profile
log_publisher: foo_publisher
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Remove lsn pool
bigip_cgnat_lsn_pool:
name: foo
state: absent
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The translation IP addresses available for backup members. Returned: changed Sample: [“/Common/10.10.10.0/24”, “/Common/11.11.11.0/25”] |
|
The maximum number of simultaneous translated connections a client or subscriber is allowed to have. Returned: changed Sample: 50 |
|
User created LSN pool description. Returned: changed Sample: “some description” |
|
The set of interfaces on which source address translation is allowed or disallowed. Returned: changed Sample: [“/Common/tunnel1”, “/Common/tunnel2”] |
|
Specifies how the system handles address translation on the egress interfaces. Returned: changed Sample: false |
|
Enables or disables hairpinning for incoming connections to active translation end-points. Returned: changed Sample: true |
|
Enables or disables ICMP echo on translated addresses. Returned: changed Sample: false |
|
Controls BIG-IP system support of inbound connections for each outbound mapping. Returned: changed Sample: “explicit” |
|
The name of the logging profile the pool uses. Returned: changed Sample: “/Common/foo_log_profile” |
|
The name of the log publisher that logs translation events. Returned: changed Sample: “/Common/publisher_1” |
|
The set of translation IP addresses available in the pool. Returned: changed Sample: [“/Common/10.10.10.0/24”, “/Common/11.11.11.0/25”] |
|
Specifies the translation address mapping mode. Returned: changed Sample: “napt” |
|
The timeout duration subsequent to the point when the port block becomes idle. Returned: changed Sample: 3600 |
|
The timeout for the port block. Returned: changed Sample: 7200 |
|
The number of ports in a block. Returned: changed Sample: 128 |
|
The number of blocks that can be assigned to a single subscriber IP address. Returned: changed Sample: 3 |
|
The timeout duration for a zombie port block. Returned: changed Sample: 180 |
|
Specifies the persistence settings for LSN translation entries. Returned: changed Sample: “address” |
|
Specifies the persistence timeout value for LSN translation entries. Returned: changed Sample: 500 |
|
The high end of the range of port numbers available for use with translation IP addresses. Returned: changed Sample: 65535 |
|
The low end of the range of port numbers available for use with translation IP addresses. Returned: changed Sample: 1025 |
|
Specifies whether the translation addresses are advertised through dynamic routing protocols. Returned: changed Sample: true |
Authors
Wojciech Wypior (@wojtek0806)