Version notice:
CLIENT_DATA¶
Description¶
For TCP, this event fires when new data arrives from the client after
you issue the TCP::collect command (use
arguments to TCP::collect to control whether
this event fires for each TCP segment received or after a specified
quantity of data has arrived).
For UDP, this event fires each time a datagram arrives from the
client. (Large UDP datagrams may be subject to IP fragmentation at the
source or in transit. The BIG-IP will reassemble fragmented datagrams
before firing this event, as explained in f5 Solution Note f5
SOL17102.)
NOTE ALSO: Per f5 Solution Note f5
SOL14563
it is better to process UDP datagrams in CLIENT_ACCEPTED than in this
event.
Examples¶
when CLIENT_DATA {
if { [UDP::payload 50] contains "XYZ" } {
pool xyz_servers
persist uie "[IP::client_addr]:[UDP::client_port]" 300
}
}
Related Information¶
Available Commands:
- clone - Causes the system to clone traffic to the specified pool or pool member regardless of monitor status.
- forward - Sets the connection to forward IP packets.
- IP::idle_timeout - Returns or sets the idle timeout value.
- ip_ttl - Returns the TTL of the latest IP packet received.
- lasthop - Sets the lasthop of an IP connection.
- listen - Sets up a related ephemeral listener to allow an incoming related connection to be established.
- LSN::address - Set or override translation address.
- LSN::disable - Disable LSN translation.
- LSN::inbound - Disable inbound connections to translation address/port.
- LSN::persistence - Set translation selection mode and persistence timeout.
- LSN::persistence-entry - Create or lookup translation address.
- LSN::pool - Specify LSN pool for current connection.
- LSN::port - Set or override translation port.
- nexthop - Sets the nexthop of an IP connection.
- node - Sends the packet directly to the identified server node.
- peer - Causes the specified iRule commands to be evaluated under the peer’s (opposite) context.
- persist - Causes the system to use the named persistence type to persist the connection.
- pool - Causes the system to load balance traffic to the specified pool or pool member regardless of monitor status.
- session - Utilizes the persistence table to store arbitrary information based on the same keys as persistence.
- TCP::bandwidth - Returns a bandwidth estimate for the peer.
- TCP::client_port - Returns the remote TCP port/service number of the clientside TCP connection.
- TCP::close - Closes the TCP connection.
- TCP::local_port - Returns the local TCP port/service number of a TCP connection.
- TCP::mss - Returns the on-wire Maximum Segment Size (MSS) for a TCP connection.
- TCP::nagle - Enables or disables the Nagle algorithm on the current TCP connection.
- TCP::notify - Causes the USER_REQUEST or USER_RESPONSE event to be raised.
- TCP::offset - Returns the number of bytes currently held in memory via TCP::collect.
- TCP::option - Gets or sets the value of the specified option kind from the TCP header.
- TCP::payload - Returns or replaces TCP data content.
- TCP::release - Releases and flushes collected data. and resumes processing.
- TCP::remote_port - Returns the remote TCP port/service number of a TCP connection.
- TCP::respond - Sends the specified data directly to the peer.
- TCP::rtt - Returns the smoothed round-trip time estimate for a TCP connection.
- TCP::server_port - Returns the remote TCP port/service number of the serverside TCP connection.
- TCP::unused_port - Returns an unused TCP port for the specified IP tuple.
- UDP::client_port - Returns the UDP port/service number of a client system.
- UDP::drop - Drops the current UDP packet without removing the flow from the connection table
- UDP::local_port - Returns the local UDP port/service number.
- UDP::mss - Returns the on-wire Maximum Segment Size (MSS) for a UDP connection.
- UDP::payload - Returns the content or length of the current UDP payload.
- UDP::remote_port - Returns the remote UDP port/service number.
- UDP::respond - Sends data directly to a peer.
- UDP::server_port - Returns the UDP port/service number of a server system.
- UDP::unused_port - Returns an unused UDP port for the specified IP tuple.
Warning
The links to the sample code below are remnants of the old DevCentral wiki and will result in a 404 error. For best results, please copy the link text and search the codeshare directly on DevCentral.
Sample Code:
- BIG-IP Discard Server - Using TCP mblb profile and iRule to create a Null Virtual Server
- DNS Non-English Domain Name Detection - This iRule scans domain name in the question part or the DNS message. If it…
- DNS Flood Protection v1 - This iRule illustrates how to provide flood protection per source IP address.
- DNS Flood Protection v3 - This iRule illustrates how to provide flood protection per source IP address.
- dummy SMTP server - This is basic iRule which acts as a standalone SMTP server. I needed this w…
- FIX Select Pool Based On Sender Comp ID - Financial Information eXchange (FIX) Protocol iRule to select pool based on Sender Comp ID.
- FTP Session Logging - Log FTP connection and username information
- Hunt The Wumpus - For all you “Hunt the Wumpus” fans out there. here’s an iRule clone implemented on top of the FTP protocol.
- LDAP Pool Selection By IP For Mobile Devices - Distributes traffic to different pools based on LOGIN-IP address in LDAP request data.
- LDAP Proxy - An LDAP proxy used send read/write requests to different pools.
- MySQL Proxy - An MySQL proxy used send read/write requests to different pools.
- NAT64 DNS64 - This actually contains 2 iRules. This is a solution that allows client from…
- NAT_iRule - This is a solution that allows client from IPv6 network to communicate to IPv4 network thru BIG-IP.
- RADIUS Load Balancing - An iRule to load balance RADIUS requests.
- SMTP Start TLS - allows either clear text or TLS encrypted communication with SMTP protocol
- SMTP filter and forward proxy - SMTP filter and forward proxy
- SMTP Proxy - This iRule implements a simple SMTP proxy.
- SMTPStartTLS - This iRule allows either clear text or TLS encrypted communication with the LTM initiating the encryption process if it sees the appropriate “starttls” command in the SMTP communication.
- SOCKS5 SSL Persistence - Much requested 2005 iRule contest winner (thanks Adam!)
- SUPL ILP Message Based Load Balancing with Persistence - SUPL ILP message-based load-balancing
- TLS Server Name Indication - Server Name Indication (TLS SNI) allows dynamic selection of clientssl profiles and pools
- Introduced: BIGIP-9.0.0
The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.