Forum Discussion
waterfall_10467
Jul 15, 2012Altostratus
when_lb_failed
Hello,
If a client coming from 192.168.1.0 and 192.168.2.0 networks redirect to node1 else redirect to node2.However, when node1 is down ,move all active and new connections to node2 and aga...
nathe
Jul 16, 2012Cirrocumulus
Will this work for you then?
Create a Data Group for 192.168.1.x and 192.168.2.x clients:
class 192_group {
{
network 192.168.1.0/24
network 192.168.2.0/24
}
}
Create an iRule:
when CLIENT_ACCEPTED {
Check if Client Address is from the specific data group
if { [class match [IP::remote_addr] equals $::192_group]} {
node 192.168.1.10
} else {
node 192.168.1.11
}
}
when LB_FAILED {
pool test_pool
LB::reselect
log local0. "Selected server [LB::server] did not respond. Re-selecting node from test_pool"
}
Most of this taken from: https://devcentral.f5.com/wiki/iRules.node.ashx
If you're on v9.x then use matchclass rather than class match command.
Rgds
N
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects