Selective SNAT iRule
Hello,
I have LC+LTM to load-balance the outbound traffic across different ISPs, and I want to use different snatpool for the outbound traffic for each ISP; i.e ISP1 will use snatpool ISP1, ISP2 will use snatpool ISP2, etc. I have just used the following iRule but I think this won't work as the address translation is disabled on the VS.
when LB_SELECTED {
switch {[IP::addr [LB::server addr]]} {
"Next-Hop Router's IP for ISP1" { snatpool Snat_ISP1 }
"Next-Hop Router's IP for ISP2" { snatpool Snat_ISP2 }
"Next-Hop Router's IP for ISP3" { snatpool Snat_ISP3 }
}
}
Is there a way to achieve the same goal using the outgoing vlan (each ISP has it's own vlan)? Other suggestion is to have snatpool IPs configured as additional floating IPs on the respective vlan, what do you think ?
Thanks in advance.
TCP179