ltm rule command LB reselect
iRule(1) BIG-IP TMSH Manual iRule(1)
LB::reselect
Advance to the next available node in a pool.
SYNOPSIS
LB::reselect (clone pool POOL_OBJ (member IP_ADDR)?)?
LB::reselect pool POOL_OBJ (member ((IP_ADDR PORT) |
(IP_TUPLE)))?
LB::reselect snat (automap |
none |
(IP_ADDR (PORT)?))
LB::reselect snatpool SNAT_POOL_OBJ (member IP_ADDR)?
LB::reselect node (IP_ADDR (PORT)?)?
LB::reselect virtual VIRTUAL_SERVER_OBJ
LB::reselect vlan VLAN_OBJ
LB::reselect nexthop (VLAN_OBJ)? (IP_ADDR | MAC_ADDR)
LB::reselect rateclass RATE_CLASS
DESCRIPTION
This command is used to advance to the next available node in a pool,
either using the load balancing settings of that pool, or by specifying
a member explicitly. Note that the reselect may not happen immediately;
it may wait until the current iRule event is completely finished
executing.
There is no reselect retry limit built into the command: You MUST
implement a limiting mechanism in your iRule using logic similar to
that in the examples below. For more information, refer to AskF5
SOL10386 - Using LB::reselect iRules command without a limiting
mechanism may result in a SYN flood
LB::reselect
Selects the next available member in the current pool, based on
pool Load Balancing options
LB::reselect nexthop
Selects the MAC address for the selected IP address as the nexthop
See nexthop for possible additional options
LB::reselect pool
Selects the next available member in the specified pool, based on
the Load Balancing options of that pool
LB::reselect pool
Selects the specified member from the specified pool
LB::reselect rateclass
Selects the specified rate class
LB::reselect virtual
Selects the specified virtual server
LB::reselect vlan
Selects the specified VLAN
RETURN VALUE
VALID DURING
LB_SELECTED LB_QUEUED PERSIST_DOWN LB_FAILED
EXAMPLES
when CLIENT_ACCEPTED {
set def_pool [LB::server pool]
set lb_fails 0
}
when LB_FAILED {
if { $lb_fails < [active_members $def_pool] } {
LB::mode rr
LB::reselect pool $def_pool
} else {
... add failure logic here
}
incr lb_fails
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-9.0.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)