Forum Discussion

Jace_45978's avatar
Jace_45978
Icon for Nimbostratus rankNimbostratus
Dec 06, 2011

source_address persistence question

looking to add persistence to a VIP for all incoming source addresses with the exception if address = 10.243.0.0/16 or 10.96.0.0/16 I don't want persistence for these two network so they would be round-robin

 

 

i was thinking of something like this but would like confirmation prior to implementing the irule.

 

 

virtual xyz {

 

snat automap

 

pool foo

 

destination 1.1.1.1:http

 

ip protocol tcp

 

persist source_addr

 

profile http tcp

 

rules rule_persist_exception

 

}

 

 

rule rule_persist_exception {

 

when CLIENT_ACCEPTED {

 

if {([IP::addr [IP::remote_addr] equals 10.243.0.0/16]) or

 

([IP::addr [IP::remote_addr] equals 10.96.0.0/16])} {

 

persist none

 

}

 

}

 

}

 

thanks in advance this is by far the best forum on the internet!

 

2 Replies

  • the irule looks fine for me.

     

     

    by the way, if you do not need to parse http header or delayed binding, http profile can be removed from the virtual server.
  • Thanks nitass!

     

    I also have iRule i didn't show in the virtual for HTTP_REQUEST if there are no members available in the pool return a "sorry page" basically that is why the http profile is on the VS

     

    thanks for having a look!