duBeN_25069
Aug 29, 2013Nimbostratus
irule
Hello,
I have a virtual server with default pool Pool1 configured, containing 2 servers (10.10.10.2/3). Now I'm trying to achieve that if request will come from client with IP 192.168.1.2 it will be ...
Or perhaps something like this:
when HTTP_REQUEST {
if { ( [IP::addr [IP::client_addr] equals 192.168.1.2] ) and [LB::status pool Pool1 member 10.10.10.2 80] eq "up" ) } {
pool Pool1 member 10.10.10.2 80
} elseif { ( [IP::addr [IP::client_addr] equals 192.168.1.3] ) and [LB::status pool Pool1 member 10.10.10.3 80] eq "up" ) } {
pool Pool1 member 10.10.10.3 80
} else {
not technically necessary if the pool is assigned to the VIP
pool pool Pool1
}
}
This basically says, if the client source is this, and the specific pool member is up, then go ahead and send it. Otherwise send the request to whoever is available in the (default) pool.