Forum Discussion

George_33482's avatar
Icon for Nimbostratus rankNimbostratus
Jan 24, 2012

link controller load balancing on multiple criteria

Hello,i have a LC and i was requested to perform load balancing based on multiple criteria


1- source ip address


2- destination ip address


3- destination port


4- specific websites


5- specific patern bits in the packet (can this be done?????)



i am using the irule below but it is giving an error "command is not valid in current event context (CLIENT_ACCEPTED)] [HTTP::uri]"



How i can fix this issue??



However, how can i see the utilization of each link? which ip address (source or destination) is using the link?





if {([IP::addr [IP::local_addr] equals ""]) or ([IP::addr [IP::local_addr] equals ""])}{


pool source_ip_pool


snat automap


persist dest_addr




elseif {([ IP::addr [IP::remote_addr] equals ""]) or ([HTTP::uri] equals "")}{


pool boomerange


snat automap




elseif {([TCP::remote_port] equals 20) or ([TCP::remote_port] equals 21)}




pool fw


snat automap


persist dest_add




else {


pool default_pool


persist dest_add






Thank you and Regards,






1 Reply

  • Hi George,



    With a standard Link Controller license, you can't parse the TCP and HTTP and get the HTTP host or URI. You could potentially do this with a combo LC+LTM license. I think the rest of the iRule should work with a LC only license.