Forum Discussion

pavan_Gopparaju's avatar
pavan_Gopparaju
Icon for Nimbostratus rankNimbostratus
May 24, 2017

i-Rule to select a pool based on client IP

Hi,

 

i would like to get help in creating a i-Rule which selects the pool based on client IP address

 

my scenario:

 

i have a vip with pool-A and i want to redirect all the traffic to pool-B if this vip is accessed with client IP's other than 10.0.0.0/24 rang or a list of IP's in my data group list.

 

any help would be appreciated. thanks in advance..!!

 

  • Hi Pavan, Here is a simple rule to send traffic to poolb. if datagroup contains 10.0.0.0/24

    when CLIENT_ACCEPTED {
    if { !([class match [IP::client_addr] equals dg-poolb]) } {
         pool poolB 
       }
    }
    

    I hope this helps

    -=Bhattman=-