Forum Discussion
iRules for SNAT translations with ISP load balancing
I'm looking for a way to create iRules that would have SNAT translations for specific hosts that needed to be sourced with a specific IP address and autosnat all others. For example, Node A must be sourced from public IP 100.1.1.2 using ISP A, node B would be sourced from public IP 200.1.1.3 using ISP B, while all others that did not need to be sourced from a specific IP would use autosnat to load balancing using both ISPs and setting the source IP to the appropriate self-IP based on the ISP connection used. Is this possible and if so what would the iRule look like?
- wscottb13_17908NimbostratusAs a follow up, would the following work? class HostA { host 192.168.1.10 } class HostB { host 192.168.1.11 } class HostC { host 192.168.1.12 } when CLIENT_ACCEPTED { if { [matchclass [IP::client_addr] equals HostA]} { snat 100.0.0.12 use pool ISP_A } elseif { [matchclass [IP::client_addr] equals HostB]} { snat 100.0.0.13 use pool ISP_A } elseif { [matchclass [IP::client_addr] equals HostC]} { snat 200.0.0.11 use pool ISP_B } else {snat automap use pool DefaultGWPool } }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com