Forum Discussion

Ricardo_Raza_14's avatar
Ricardo_Raza_14
Icon for Nimbostratus rankNimbostratus
Apr 11, 2018

irule for specific member

Hi I need to do an irule, to choose a specific member when they receive specific IP and send specific destination, this is for a load balancing isp.

 

I have a 3 nodes x.x.x.1 x.x.x.2 x.x.x.3 I have a pool gateway associated with this 3 notes pool_GW I have a default route associated with this pool 0.0.0.0/ GW pool_GW

 

the load balancing work fine, but I need to do when I receive traffico from y.y.y.y select the node x.x.x.1 and send the traffic to z.z.z.z

 

How can I do that

 

1 Reply

  • Hello,

    You need something like that:

    when HTTP_REQUEST {
        if { [IP::addr [IP::client_addr] equals 10.70.64.1/32] } {
            pool MyPool member 1.1.1.1 80
        } elseif {[IP::addr [IP::client_addr] equals 10.70.64.2/32]} {
            pool MyPool member 1.1.1.2 80   
    
        } elseif {[IP::addr [IP::client_addr] equals 10.70.64.3/32]} {
            pool MyPool member 1.1.1.3 80
        } else {
            do nothing
        }
    }
    

    Regards