Source IP Address and PORT Translation in BIG-IP
The Source Network Address Translation (SNAT) is an essential concept in F5 BIG-IP devices used to manage the translation of IP addresses for outgoing traffic. SNAT allows the device to change the source IP address of packets as they leave the system, enabling proper routing and response handling for connections from clients to servers.
Let’s break down the key concepts and settings around SNAT and SNAT Pools.
1. SNAT (Source Network Address Translation) Overview
SNAT allows the BIG-IP system to translate the source IP address of a packet as it leaves the system. This is primarily used when the source IP of a client connection needs to be changed to a different IP address for routing purposes or to ensure proper return traffic from the server reaches the client.
SNAT Address Capacity:
SNAT Address Capacity is determined by the number of available IP addresses multiplied by the pool member count.
Formula:
SNAT Address Capacity =
65535 * Pool Member Count
This implies that for each pool member, you can have up to 65535 different translation addresses.
Port Exhaustion:
If too many clients are using the same source IP address and port for outgoing traffic, a situation called Port Exhaustion can occur. This means that there are no more available ports to map the connections, causing connection issues.
To mitigate port exhaustion, SNAT should be configured with a sufficient number of source IP addresses in the SNAT pool.
2. SNAT Pool
A SNAT Pool contains a group of source IP addresses from which the BIG-IP system selects when performing SNAT for outgoing traffic. These addresses are chosen based on a configured method (e.g., least connections) to ensure optimal traffic distribution.
SNAT Pool Behavior:
Least Connections Method: BIG-IP selects an IP address from the SNAT Pool based on the number of active connections associated with each IP address. The system will choose the SNAT address with the least active connections to distribute traffic evenly.
Multiple Egress Networks:
The SNAT Pool can contain addresses from more than one egress network. This allows you to mix addresses from different networks, giving you more flexibility in traffic routing and handling.
3. Auto Map Precedence Order
The Auto Map feature in BIG-IP allows the system to automatically assign an IP address for SNAT. When Auto Map is used, the system follows a specific precedence order to determine the most appropriate source address to use for translation.
The Auto Map Precedence Order is as follows:
Float-IP / Egress VLAN:
The system will first attempt to use a floating IP address from the egress VLAN if one is available. Floating IPs are typically used for high availability and are associated with multiple devices in a failover setup.
Float-IP / Other VLAN:
If no suitable floating IP address is found in the egress VLAN, it will try to use a floating IP from other VLANs.
Non-Float-IP / Egress VLAN:
Next, the system will check for a non-floating IP address within the egress VLAN.
Non-Float-IP / Other VLAN:
If none of the above options are suitable, the system will use a non-floating IP from other VLANs.
Here's a textual graph (or flow chart) summarizing the SNAT Configuration and Auto Map Precedence Order for BIG-IP:
Last updated