sose_86565
Jan 19, 2009Nimbostratus
SNAT descision based on client ip and link availability
I have 2 ISPs that are being load balanced. I also have a list of internal IP's that we do not want to use SNAT's if ISP-A is online. Can someone validate this iRule for me? The Hosts class is the list of the IP's not to NAT, and the LB-server IP listed is the IP of the link for ISP-A.
class Hosts {
host 128.94.2.9
host 128.94.2.10
host 128.94.2.11
host 128.94.2.12
host 128.94.2.13
host 128.94.2.14
host 128.94.2.15
host 128.94.2.16
host 128.94.2.17
host 128.94.2.18
host 128.94.2.19
host 128.94.2.20
host 128.94.2.23
host 128.94.2.25
host 128.94.2.52
host 128.94.2.53
host 128.94.2.100
host 128.94.2.101
host 128.94.2.103
host 128.94.2.104
}
when LB_SELECTED {
if {[matchclass [IP::client_addr] equals "$::Hosts"} {
if {[LB::server addr] == "128.94.240.254"} {
snat none
}
else {
snat automap
}
}
else {
snat automap
}
}