Forum Discussion
Does 10.234.133.222 $new_port actually exist in the pool?
I ask this because I think that LB:: commands typically are going to apply to the pool configured on the virtual server, or previously choosen with the "pool" command.
Yours is a truly odd requirement, but I think that the way to accomplish what you wish to accomplish is to make the selection earlier than LB_SELECTED (and not use LB::reselect), and then use the "node" command directly.
So for example, your irule look like:
`when CLIENT_ACCEPTED {
get the relevant port number
Call the node command to point to the IP address and server
}`
Possibly also since you seem to need the IP address of the server that the LTM will normally load balance to, instead of calling LB::reselect in your current irule, call LB::detach instead, and then call "node" to send the traffic to your desired server and IP address.
https://devcentral.f5.com/articles/irules-101-05-selecting-pools-pool-members-and-nodes
- BinaryCanary_19Oct 21, 2014Historic F5 Accountwhen LB_SELECTED { if { [IP::addr [LB::server addr] equals 10.234.133.222] } { set port [clientside {TCP::local_port}] log local0.debug "Port = $port" set new_port [expr {$port + 1}] log local0.debug "New port is $new_port" LB::detach node 10.234.133.222 $new_port } } This is a modification of your original irule, to call LB::detach, and then node . If LB::detach gives you any errors remove it (I haven't verified if LB_SELECTED is fired before or after the server-side connection is established) -- so if LB::detach gives you an error, it is most likely because there is not yet a server-side connection, and thus the command is unnecessary.