Version notice:
LB_SELECTED¶
Description¶
Triggered when the system selects a pool member.
Examples¶
when LB_SELECTED {
# Check if client IP address is 10.0.0.1
if { [IP::addr [IP::client_addr] equals 10.0.0.1] } {
# Apply a snat
snat VIPsnat
}
}
Related Information¶
Available Commands:
- active_members - Returns the number or list of active members in the specified pool.
- 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::client_addr - Returns the client IP address of a connection
- IP::idle_timeout - Returns or sets the idle timeout value.
- IP::local_addr - Returns the IP address of the virtual server the client is connected to or the self-ip LTM is connected from.
- ip_ttl - Returns the TTL of the latest IP packet received.
- lasthop - Sets the lasthop of an IP connection.
- LB::server - Returns information about the currently selected server
- 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.
- session - Utilizes the persistence table to store arbitrary information based on the same keys as persistence.
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:
- HTTP method conversion - This is one way that allows you to convert HTTP method from GET to POST or …
- HTTP retry on 404 pre-9.2.0 - Mimic LB::reselect and HTTP::retry for pre-9.2.0 boxes
- Log Tcp And Http Request Response Info Remotely - Log TCP and HTTP request and response details remotely via High Speed Logging
- MySQL Proxy - An MySQL proxy used send read/write requests to different pools.
- Select pool member based on HTTP query string parameter - Allow clients to manually select a pool member based on a parameter set in the HTTP query string. with persistence.
- Introduced: LTM-9.0.0
- Introduced: GTM-9.2.2
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.