Forum Discussion
Link Controller iRule commands
Hi guys,
I was wondering if there were kind of a list with the commands we can use when working with a link controller (no LTM at all). I know that is pretty much limited but want to be certain about what can be done in the platform.
the thing i wanna do is to discriminate traffic based on source IP using an irule with the IP::local_addr.
any comment and joke is welcome.
Thx!
hheredia
3 Replies
- What_Lies_Bene1
Cirrostratus
That should be possible based on Hoolio's comments here: https://devcentral.f5.com/community/group/aft/2160955/asg/50. It looks like any commands that operate at L3 or below are supported. - HHeredia_36237
Nimbostratus
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. - HHeredia_36237
Nimbostratus
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
}
}
Even tough 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.
Regards,
hheredia
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com