ltm rule command IP remote addrΒΆ

iRule(1)						BIG-IP TMSH Manual						  iRule(1)

IP::remote_addr
       Returns the IP address of the host on the far end of the connection.

SYNOPSIS
       IP::remote_addr (clientside | serverside)?

DESCRIPTION
       Returns the IP address of the host on the far end of the connection. In the clientside context, this is the client IP
       address. In the serverside context this is the node IP address. You can also specify the IP::client_addr and
       IP::server_addr commands, respectively.

       In BIG-IP 10.x with route domains enabled this command returns the remote IP address in the x.x.x.x%rd of the server or
       client (depending on the context) that is in any non-default route domain else it returns just the IP address as expected.

       This command is equivalent to the BIG-IP 4.X variable remote_addr.

RETURN VALUE
       IP address of the host on the far end of the connection

VALID DURING
       CLIENT_ACCEPTED, IP_GTM

EXAMPLES
	when CLIENT_ACCEPTED {
	  if { [IP::addr [IP::remote_addr] equals 206.0.0.0 mask 255.0.0.0] } {
	     pool clients_from_206
	  } else {
	     pool other_clients_pool
	 }
	}

	when SERVER_CONNECTED {
	   log local0. "Node IP address is: [IP::remote_addr]"
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-9.2.2 -- Add to GTM @BIGIP-9.0.0 --First introduced the command.

BIG-IP							    2022-04-12							  iRule(1)