Forum Discussion
Ryan_M_362715
Altocumulus
Nov 16, 2018Resource Assignment based on Virtual Server?
Hey all,
I have two virtual servers that are associated with the same access policy and need to assign an IP pool based on the virtual server that the user connected to. In my resource assignment,...
Nov 16, 2018
Hey Ryan!
So I did some testing in my lab and I discovered that this is way easier to do with an iRule. I used the following syntax:
when HTTP_REQUEST {
if {[virtual name] equals "/Common/VSTest-01"} {
pool PoolTest-01
}
if {[virtual name] equals "/Common/VSTest-02"} {
pool PoolTest-02
}
}
The behavior was that I authenticated to first virtual server and accessed the back-end server on pool1. Then I killed my record in the hosts file and changed to other VS address. I was automatically switched over to the pool2 without having to log on again. So in my setup I do not use any resource assignment, I let the iRule dictate this.
Let me know how that works out for you 🙂
I hope this helps!
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