Forum Discussion
What_Lies_Bene1
Oct 01, 2013Cirrostratus
You might be better off using two separate Virtual Servers and the Priority Group Activation feature but if you really must have an iRule;
when CLIENT_ACCEPTED {
If the source IP address is in the internal network;
if { [IP::addr [IP::remote_addr] equals x.x.x.x/xx] } {
continue and check if both Pool members are up
if { [active_members pool_name] > 1 } {
if so, select our prefered pool member for internal traffic;
pool pool_name member x.x.x.x
}
else {
if not, exit and let the standard load balancing method do it's thing
return
}
If not an internal, assume it's an external IP and check if both Pool members are up
elseif { [active_members pool_name] > 1 } {
If so, select our prefered pool member for external traffic;
pool pool_name member x.x.x.x
}
else {
if not, exit and let the standard load balancing method do it's thing
return
}
}
}