W3cubDocs

/Ansible

f5networks.f5_modules.bigip_cgnat_lsn_pool – Manage CGNAT LSN Pools

Note

This plugin is part of the f5networks.f5_modules collection (version 1.12.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

Synopsis

  • Manage CGNAT LSN (Large Scale NAT) Pools.

Parameters

Parameter Choices/Defaults Comments
backup_members
list / elements=string
Specifies translation IP addresses available for backup members, which are used by Deterministic translation mode if deterministic mode translation fails and falls back to napt mode.
This is a collection of IP prefixes with their prefix lengths.
client_conn_limit
integer
Specifies the maximum number of simultaneous translated connections a client or subscriber is allowed to have.
Valid range of values is between 0 and 4294967295 inclusive.
description
string
User created LSN pool description.
egress_interfaces
list / elements=string
Specifies the set of interfaces on which the source address translation is allowed or disallowed, as determined by the egress_intf_enabled setting.
egress_intf_enabled
boolean
    Choices:
  • no
  • yes
Specifies how the system handles address translation on the interfaces specified in egress_interfaces.
When set to yes, source address translation is allowed only on the specified egress_interfaces.
When set to no, source address translation is disabled on the specified egress_interfaces.
harpin_mode
boolean
    Choices:
  • no
  • yes
Enables or disables hairpinning for incoming connections to active translation end-points.
icmp_echo
boolean
    Choices:
  • no
  • yes
Enables or disables ICMP echo on translated addresses.
inbound_connections
string
    Choices:
  • disabled
  • explicit
  • automatic
Controls whether or not the BIG-IP system supports inbound connections for each outbound mapping.
When disabled, system does not support inbound connections for outbound mappings, which prevents Port Control Protocol pcp from functioning.
When explicit, the system supports inbound connections for explicit outbound mappings.
When automatic the system supports inbound connections for every outbound mapping as it gets used.
log_profile
string
Specifies the name of the logging profile the pool uses.
log_publisher
string
Specifies the name of the log publisher that logs translation events.
members
list / elements=string
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.
mode
string
    Choices:
  • napt
  • deterministic
  • pba
Specifies the translation address mapping mode.
The napt mode provides standard address and port translation allowing multiple clients in a private network to access remote networks using the single IP address assigned to their router.
The deterministic address translation mode provides address translation that eliminates the logging of every address mapping, while still allowing internal client address tracking using only an external address and port, and a destination address and port.
The pba mode logs the allocation and release of port blocks for subscriber translation requests, instead of separately logging each translation request.
name
string / required
Specifies the name of the LSN pool to manage.
partition
string
Default:
"Common"
Device partition on which to manage resources.
pba_block_idle_timeout
integer
Specifies the timeout duration subsequent to the point when the port block becomes idle.
Valid range of values is between 0 and 4294967295 inclusive."
pba_block_lifetime
integer
Specifies the timeout for the port block, after which the block is not used for new port allocations.
Valid range of values is between 0 and 4294967295 inclusive.
The value of 0 corresponds to an infinite timeout.
pba_block_size
integer
Specifies the number of ports in a block.
Valid range of values is between 0 and 65535 inclusive.
The pba_block_size value should be less than or equal to the LSN pool range, i.e the range of ports defined by port_range_low and port_range_high values.
pba_client_block_limit
integer
Specifies the number of blocks that can be assigned to a single subscriber IP address.
pba_zombie_timeout
integer
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 0 corresponds to an infinite timeout.
System ignores this parameter value if pba_block_lifetime is 0.
persistence_mode
string
    Choices:
  • address
  • address-port
  • none
Specifies the persistence settings for LSN translation entries.
When address, the translation attempts to reuse the address mapping, but not the port mapping.
When address-port, the translation attempts to reuse both the address and port mapping for subsequent packets sent from the same internal IP address and port.
When none, peristence is disabled.
persistence_timeout
integer
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 0 and 31536000 inclusive.
port_range_high
integer
Specifies the high end of the range of port numbers available for use with translation IP addresses.
The port_range_high must always be higher or equal to port_range_high value.
Valid range of values is between 0 and 65535 inclusive.
port_range_low
integer
Specifies the low end of the range of port numbers available for use with translation IP addresses.
The port_range_low must always be lower or equal to port_range_high value.
Valid range of values is between 0 and 65535 inclusive.
provider
dictionary
added in 1.0.0 of f5networks.f5_modules
A dict object containing connection details.
auth_provider
string
Configures the auth provider for to obtain authentication tokens from the remote device.
This option is really used when working with BIG-IQ devices.
no_f5_teem
boolean
    Choices:
  • no
  • yes
If yes, TEEM telemetry data is not sent to F5.
You may omit this option by setting the environment variable F5_TELEMETRY_OFF.
Previously used variable F5_TEEM is deprecated as its name was confusing.
password
string / required
The password for the user account used to connect to the BIG-IP.
You may omit this option by setting the environment variable F5_PASSWORD.

aliases: pass, pwd
server
string / required
The BIG-IP host.
You may omit this option by setting the environment variable F5_SERVER.
server_port
integer
Default:
443
The BIG-IP server port.
You may omit this option by setting the environment variable F5_SERVER_PORT.
timeout
integer
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.
transport
string
    Choices:
  • rest
Configures the transport connection to use when connecting to the remote device.
user
string / required
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 F5_USER.
validate_certs
boolean
    Choices:
  • no
  • yes
If no, SSL certificates are not validated. Use this only on personally controlled sites using self-signed certificates.
You may omit this option by setting the environment variable F5_VALIDATE_CERTS.
route_advertisement
boolean
    Choices:
  • no
  • yes
Specifies whether the translation addresses are passed to the Advanced Routing Module for advertisement through dynamic routing protocols.
state
string
    Choices:
  • present
  • absent
When state is present, ensures the LSN pool exists.
When state is absent, ensures the LSN pool is removed.

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 Returned Description
backup_members
list / elements=string
changed
The translation IP addresses available for backup members.

Sample:
['/Common/10.10.10.0/24', '/Common/11.11.11.0/25']
client_conn_limit
integer
changed
The maximum number of simultaneous translated connections a client or subscriber is allowed to have.

Sample:
50
description
string
changed
User created LSN pool description.

Sample:
some description
egress_interfaces
list / elements=string
changed
The set of interfaces on which source address translation is allowed or disallowed.

Sample:
['/Common/tunnel1', '/Common/tunnel2']
egress_intf_enabled
boolean
changed
Specifies how the system handles address translation on the egress interfaces.

harpin_mode
boolean
changed
Enables or disables hairpinning for incoming connections to active translation end-points.

Sample:
True
icmp_echo
boolean
changed
Enables or disables ICMP echo on translated addresses.

inbound_connections
string
changed
Controls BIG-IP system support of inbound connections for each outbound mapping.

Sample:
explicit
log_profile
string
changed
The name of the logging profile the pool uses.

Sample:
/Common/foo_log_profile
log_publisher
list / elements=string
changed
The name of the log publisher that logs translation events.

Sample:
/Common/publisher_1
members
list / elements=string
changed
The set of translation IP addresses available in the pool.

Sample:
['/Common/10.10.10.0/24', '/Common/11.11.11.0/25']
mode
string
changed
Specifies the translation address mapping mode.

Sample:
napt
pba_block_idle_timeout
integer
changed
The timeout duration subsequent to the point when the port block becomes idle.

Sample:
3600
pba_block_lifetime
integer
changed
The timeout for the port block.

Sample:
7200
pba_block_size
integer
changed
The number of ports in a block.

Sample:
128
pba_client_block_limit
integer
changed
The number of blocks that can be assigned to a single subscriber IP address.

Sample:
3
pba_zombie_timeout
integer
changed
The timeout duration for a zombie port block.

Sample:
180
persistence_mode
string
changed
Specifies the persistence settings for LSN translation entries.

Sample:
address
persistence_timeout
integer
changed
Specifies the persistence timeout value for LSN translation entries.

Sample:
500
port_range_high
integer
changed
The high end of the range of port numbers available for use with translation IP addresses.

Sample:
65535
port_range_low
integer
changed
The low end of the range of port numbers available for use with translation IP addresses.

Sample:
1025
route_advertisement
boolean
changed
Specifies whether the translation addresses are advertised through dynamic routing protocols.

Sample:
True


Authors

  • Wojciech Wypior (@wojtek0806)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/bigip_cgnat_lsn_pool_module.html