IP::client_addr¶
Description¶
Returns the client IP address of a connection. This command is
equivalent to the command clientside { IP::remote_addr } and to
the BIG-IP 4.X variable client_addr.
From BIG-IP 10.x with route domains enabled if the client is in any
non-default route domain, this command returns the client IP address
in the x.x.x.x%rd. For clients in the default route domain, it returns
just the IPv4 address.
Examples¶
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 10.10.10.10] } {
pool my_pool
}
}
In BIG-IP 10.x with Route Domains:
when CLIENT_ACCEPTED {
# Check if client IP is 10.10.10.10, in route domain 100
if { [IP::addr [IP::client_addr] equals 10.10.10.10%100] } {
pool my_pool
}
}
when CLIENT_ACCEPTED {
# Check if client IP is 10.10.10.10, in any route domain
if { [IP::addr [getfield [IP::client_addr] "%" 1] equals 10.10.10.10] } {
pool my_pool
}
}