Forum Discussion
ciscoarc
Nimbostratus
May 14, 2014[iRule] Pool redirect using hex values
Hi guys,
I'm trying to find out how to do pool redirection using hex values. Has anybody ever tried that?
So I have a packet, for example, I'd like to read the 10th hex value of that whole ...
Kevin_Stewart
Employee
May 14, 2014Try this:
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
grab 15 hex bytes
binary scan [TCP::payload] H15 hex
look at the 10th hex value
switch [string index $hex 10] {
10 { pool poolA }
12 { pool poolB }
}
release the payload
TCP::release
}
This of course assumes that the 10th hex value in EVERY TCP packet, or at least the first in each new TCP session is always a "10" or "12". Otherwise you'd need to employ some form of persistence to manage subsequent requests.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects