Forum Discussion
Chris_Ortiz_251
Nimbostratus
May 03, 2016Poiicy based virtual server
I have a question. We have a virtual server with a policy set to load balance to one pool with a specific URL and all others default to another pool. The problem I have is that the URL based pool r...
May 03, 2016
I assume you mean a Local Traffic Policy? If so, in the "forward" target, you can add an target action using the parameters "snat" or "snatpool" an the same time as you add a pool target.
If you want to use an iRule, you can simply add the "snat" command to the portion of your iRule logic that does the pool selection. The argument to the "snat" command is either "automap", a pool name, or "none".
Here is an example of a Local Traffic Policy that would do a selective SNAT.
ltm policy multi-snat-test {
controls { forwarding }
requires { http }
rules {
rule1 {
actions {
0 {
forward
select
snatpool /Common/SNATPOOL
}
1 {
forward
select
pool THEPOOL
}
}
conditions {
0 {
http-uri
values { /path1 }
}
}
ordinal 1
}
}
strategy first-match
}
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