Virtual & iRule

Hi Experts,

We ve following iRule defined and mapped to a wild card VS on which VLAN 20 is enabled.

rule RULE1 {

when CLIENT_ACCEPTED {

if { [IP::addr [IP::local_addr] equals 203.36.135.10] }{

snatpool pool10

pool pool_0

} elseif { [IP::addr [IP::local_addr] equals 139.26.25.12] }{

snatpool pool2

pool pool_0

}

!

Now question is - the IPs in the rule refer to the destination IP when packet is sourced from hosts in VLAN 20 outbound or do they refer to destination IPs in the packet coming into LTM from outside?

thnx-gseek

From here: https://devcentral.f5.com/wiki/iRul…_addr.ashx: "When called in a clientside context, this command returns the IP address of the virtual server the client is connected to. When called in a serverside context it returns the self-ip address or spoofed client IP address LTM is using for the serverside connection. "

thanks Steve for the reply, but how to know if the connection is for clientside or serverside?

No worries, that’ll be dictated by the event, in this case when CLIENT_ACCEPTED :wink: