Forum Discussion

Skuba_85554's avatar
Skuba_85554
Icon for Nimbostratus rankNimbostratus
Feb 05, 2010

choosing persistence method

hi

 

 

i'm hoping someone can help me with this irule...

 

 

i have a virtual server which requires 2 different types of persistence depending on where the user is coming from. for example, if the user is on the 192.168.0.0/24 network they need to use cookie persistence, but everyone else should use source address affinity

 

 

it sounds pretty simple, but any advice would be appreciated

 

 

thanks

3 Replies

  • Hi Skuba,

    You can use the persist command (Click here) to specify a persistence method from an iRule:

     
     when CLIENT_ACCEPTED { 
      
         Check the client IP 
        if {[IP::addr [IP::client_addr] equals 192.168.0.0/16]}{ 
      
            Use session cookie persistence 
           persist cookie insert "my_persist_cookie" 0 
        } else { 
            Use source address persistence with a /24 mask and 1 hour timeout 
           persist source_addr mask 255.255.255.0 3600 
        } 
     } 
     

    Aaron
  • thanks hoolio

     

     

    you may find my post interesting re: the java error in the advanced design/config forum

     

     

    cheers!