Forum Discussion
Jure_48098
Nimbostratus
Dec 11, 2008TNS TCP::payload replace
I'm trying to work out a solution for oracle TNS stream to replace HOST=VS-IP (virtual server IP) into HOST=PM-IP (pool member IP). The problem with TNS is, that it sends the host IP in payload as wel...
hoolio
Cirrostratus
Dec 11, 2008Hi there,
Normally, you wouldn't know the pool member IP address until the LB_SELECTED event. However, you can force the pool member selection using the LB::select command ().
I think it might be possible (and more efficient) to use a stream profile and iRule to do this replacement. Can you try this example? You'll need to add a blank stream profile to the VIP.
when CLIENT_ACCEPTED {
Force selection of a pool member
set selected [LB::select]
Use the selected pool member
eval $selected
Parse the IP address of the selected pool member
set node_ip [lindex $selected 3]
log local0. "\$node_ip: $node_ip"
Set the replacement string. Replace the VIP address with the pool member address.
STREAM::expression "@[IP::local_addr]@$node_ip@"
Enable the stream filter using the above expression
STREAM::enable
}
when STREAM_MATCHED {
This event is for debug only. It can be removed/commented out once you're done testing.
Log when we find a string to replace
log local0. "Found [STREAM::match] in request"
}
Aaron
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
