just found this reference for v9.x at ask f5
http://support.f5.com/kb/en-us/products/lc_9_x/manuals/product/bigip9_2_2lc/BIG-IP_9_2_2LC_Guide-18-1.htmlwp1191322
which uses this example:
when CLIENT_ACCEPTED {
set uri [HTTP::uri]
if { $uri ends_with ".gif" } {
pool my_pool
} elseif { $uri ends_with ".jpg" } {
pool your_pool
}
}
and use layer 7 (http uri) information in the conditional IF statement. So it seems that you can use layer 7 information, contained in tcp data, as long as you define this "allowed" events in the iRule:
CLIENT_ACCEPTED
CLIENT_DATA
LB_SELECTED
LB_FAILED
SERVER_CONNECTED
SERVER_DATA
RULE_INIT
CLIENT_CLOSED
SERVER_CLOSED
The v11 Config guide uses only CLIENT_ACCEPTED and SERVER_CONNECTED examples. One of those is this one querying TCP information in order to evaluate traffic and take the proper decision:
when CLIENT_ACCEPTED {
if { TCP::port equals 80 } {
node 10.1.2.200 80
}
}
Eventhough is not clear and well defined the scope of iRules for the LC , I think the information above should back up my intention of redirect traffic based on IP addresses.
My bad no to look this information first on ASK f5.