Forum Discussion

Qasim's avatar
Qasim
Icon for Cirrostratus rankCirrostratus
Jul 12, 2022

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

9 Replies

    • Qasim's avatar
      Qasim
      Icon for Cirrostratus rankCirrostratus

      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"
          }
        }