Forum Discussion
forwarding traffic from one VIP to Another on same LTM (IRULE explanation)
Hi,
I have requirement to forward to traffic from one VIP to another on same ltm. I have found an IRULE on this forum but wondering if some could could explain "Virtual name" part to me? I.e. what do I need to type in there?
when HTTP_REQUEST {
if { [HTTP::uri] contains "something" }
{
log local0. "internally routing from [virtual name] to (target VS)"
virtual (target VS)
}
also, if you know a better IRULE please share as well.
thanks
Hello Quasin,
- [virtual name] -> gives you the name of the current VS.
- virtual my_vs -> redirects the traffic to this VS (my_vs)
REF - https://clouddocs.f5.com/api/irules/virtual.html
- QasimCirrostratus
thanks Dario_Garrido,
So that name will be populated automatically or I need to type in the name of "this VS i.e. current VS"?
Regards,
Qasim
In link provided you have examples of usage. For example:
when HTTP_REQUEST { # If the current VS name is not "my_vs" if {[virtual name] ne "my_vs"} { # Then, redirect the traffic to a new VS called "my_vs" virtual my_vs } else { # If it is "my_vs", then just write a message in the log log local0. "endless loop avoided" } }
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