Source IP to Node with backup
All,
I've got the following iRule I use when I want to drive traffic from a source ip to a specific node.
when CLIENT_ACCEPTED { if {[class match [IP::client_addr] equals ipsec_bypass_backup] and [LB::status node 192.168.155.5 up]} { node 192.168.155.5 }
I'd like to add an option to direct traffic to a secondary node is the first is down, and am having problems. Blow is the iRule I'm testing with. It works, but only if I clear the clients connection after the first node fails. If I don't manually clear it, the session will stay on the dead node until it times out.
when CLIENT_ACCEPTED { if {[class match [IP::client_addr] equals ipsec_bypass_backup] and [LB::status node 192.168.155.5 ] eq "up" } { node 192.168.155.5 } elseif {[class match [IP::client_addr] equals ipsec_bypass_backup] and [LB::status node 192.168.157.5 ] eq "up" } { node 192.168.157.5 } }