Macaron
Jun 27, 2016Nimbostratus
iRule - Source Port persistence for a specific subnet else only source addr persistence
Hi, I need an iRule help. I want to apply source port persistence on a specific subnet (10.1.1.0/24) and for all the other traffic coming to the same VIP, I just want to Source address persistence. I created a datagroup which contain a subnet for port persistence. The thing i am not sure is how to write the else part in iRule for Source address persistence for all the other traffic other then the specific subnet.
when CLIENT_ACCEPTED {
if {[class match [IP::client_addr] equals "datagroup_dg"]}{
set client_ip_port "[IP::client_addr]:[TCP::client_port]"
persist uie $client_ip_port
}
else {
.........
}
}